.container {
  width: min(var(--max), calc(100% - 3rem));
  margin-inline: auto;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
}
.rate-strip { background: #eef5f6; border-bottom: 1px solid var(--line); }
.rate-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; min-height: 42px; padding-block: 0.35rem; }
.rate-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.65rem; font-size: 0.82rem; }
.rate-status small { color: var(--muted); font-size: 0.76rem; }
.rate-status span { color: var(--muted); }
.rate-status a { text-decoration: underline; }
.currency-choice { display: flex; align-items: center; gap: 0.25rem; white-space: nowrap; font-size: 0.8rem; }
.currency-choice button { min-height: 40px; min-width: 44px; border: 1px solid #aac3c7; background: #fff; color: #17383f; font-weight: 700; border-radius: 7px; cursor: pointer; }
.currency-choice button[aria-pressed="true"] { background: var(--brand); color: white; border-color: var(--brand); }
.currency-choice button:hover { border-color: var(--brand); }
.currency-choice button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) {
  .rate-inner { flex-wrap: wrap; }
  .rate-status { flex: 1 1 150px; }
  .currency-choice { margin-inline-start: auto; }
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: none;
  white-space: nowrap;
  line-height: 1.15;
}
.brand-name {
  font-weight: 800;
  font-size: 1.4rem;
}
.brand-tagline {
  margin-top: 0.2rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
}
.header-inner > nav,
.footer nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.header-inner > nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.header-inner > nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-inner > nav a:hover {
  color: var(--brand);
}
.header-post {
  min-height: 42px;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
}
.site-menu {
  display: none;
  position: relative;
  flex: none;
}
.site-menu > summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  list-style: none;
  cursor: pointer;
}
.site-menu > summary::-webkit-details-marker {
  display: none;
}
.site-menu > summary svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.site-menu > nav {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  left: 0;
  display: grid;
  gap: 0;
  width: 190px;
  padding: 0.4rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgb(0 0 0 / 14%);
  font-size: 0.9rem;
}
.site-menu > nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 5px;
}
.site-menu > nav a:hover,
.site-menu > nav a:focus-visible {
  background: var(--paper);
}
.auth-page .site-menu {
  display: none;
}
main {
  min-height: 65vh;
  padding-block: 1.5rem 4rem;
}
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.footer p {
  font-size: 0.875rem;
  color: var(--muted);
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.page-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-block: 1.5rem;
}
.page-heading h1,
.section-heading h2 {
  margin-bottom: 0.4rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: start;
}
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.actions form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
@media (max-width: 850px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .header-inner {
    gap: 0.65rem;
    min-height: 64px;
    padding-block: 0.55rem;
  }
  .header-inner > nav {
    display: none;
  }
  .header-post {
    margin-inline-start: auto;
  }
  .site-menu {
    display: block;
  }
  .footer {
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .container {
    width: calc(100% - 2rem);
  }
  .listing-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-tagline {
    font-size: 0.66rem;
  }
  .header-post {
    min-height: 40px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
  .footer nav {
    gap: 1rem;
  }
}
