:root {
  color-scheme: light;
  --bg: #f6f8f5;
  --surface: #ffffff;
  --ink: #050506;
  --muted: #555d57;
  --faint: #747d76;
  --line: #dce2dd;
  --green: #2fba73;
  --shadow: 0 14px 34px rgba(14, 18, 15, 0.06);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 7%, rgba(47, 186, 115, 0.08), transparent 30%),
    linear-gradient(180deg, #fafbf9 0%, #f6f8f5 58%, #eef2ef 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.container { width: min(980px, calc(100% - 38px)); margin: 0 auto; }
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 22px rgba(14,18,15,0.045);
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.nav {
  width: min(1180px, calc(100% - 36px));
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.nav-links a {
  height: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #131713;
  padding: 0 10px;
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  border-radius: 6px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav-links a:hover {
  background: rgba(47, 186, 115, 0.08);
  color: #1f8a53;
  transform: translateY(-1px);
}
.legal-hero {
  padding: 34px 0 18px;
  text-align: left;
}
.label {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}
.lede {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.legal-card {
  margin: 20px auto 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}
.legal-card h2 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.95rem;
}
.legal-card p { margin: 0 0 12px; }
.legal-card ul { margin: 0 0 16px; padding-left: 20px; }
.legal-card strong { color: var(--ink); }
.seo-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 20px;
  align-items: end;
}
.seo-quick-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 16px;
}
.seo-quick-card span,
.seo-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seo-quick-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.seo-quick-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.seo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.34fr);
  gap: 18px;
  align-items: start;
}
.seo-main {
  display: grid;
  gap: 14px;
}
.seo-section,
.seo-side-card,
.seo-cta,
.seo-faq details,
.seo-form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 24px);
}
.seo-section h2,
.seo-side-card h2,
.seo-cta h2,
.seo-form-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.seo-section h3 {
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.seo-section p,
.seo-section li,
.seo-side-card p,
.seo-side-card li,
.seo-cta p,
.seo-form-card p,
.seo-faq p {
  color: var(--muted);
  font-size: 0.95rem;
}
.seo-section p,
.seo-side-card p,
.seo-cta p,
.seo-form-card p,
.seo-faq p {
  margin: 0 0 12px;
}
.seo-section ul,
.seo-side-card ul {
  margin: 0;
  padding-left: 20px;
}
.seo-section li,
.seo-side-card li {
  margin-bottom: 8px;
}
.seo-stat-grid,
.seo-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.seo-stat,
.seo-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  padding: 12px;
}
.seo-stat span,
.seo-step span {
  display: block;
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.seo-stat strong,
.seo-step strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.05;
}
.seo-stat small,
.seo-step small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}
.seo-side {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 12px;
}
.seo-links {
  display: grid;
  gap: 8px;
}
.seo-links a,
.seo-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}
.seo-links a:hover,
.seo-button:hover {
  border-color: rgba(47, 186, 115, 0.5);
  background: rgba(47, 186, 115, 0.08);
  color: #1f8a53;
}
.seo-button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.seo-button.primary:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.seo-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 2px;
}
.seo-faq {
  display: grid;
  gap: 10px;
}
.seo-faq summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}
.seo-faq details p {
  margin: 9px 0 0;
}
.seo-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.seo-form label {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}
.seo-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.seo-form input[type="email"] {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}
.seo-form input[type="email"]:focus {
  border-color: rgba(47, 186, 115, 0.56);
  box-shadow: 0 0 0 4px rgba(47, 186, 115, 0.1);
  outline: none;
}
.hp-field { display: none; }
.seo-message {
  min-height: 18px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}
.seo-message.error { color: #c83343; }
.seo-note {
  border-left: 3px solid var(--green);
  background: rgba(47, 186, 115, 0.08);
  padding: 10px 12px;
}
.record-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.record-section-head > .record-pill {
  align-self: flex-start;
  justify-self: flex-start;
}
.record-section-head h2,
.record-chart-head h2 {
  margin: 0 0 5px;
}
.record-section-head p,
.record-chart-head p,
.record-projection-note {
  max-width: 660px;
  color: var(--muted);
  font-size: 0.88rem;
}
.record-table-wrap {
  margin: 10px 0 20px;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overscroll-behavior-x: contain;
  scrollbar-color: #cbd5ce #f7f8f6;
  -webkit-overflow-scrolling: touch;
}
.record-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.record-table th,
.record-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}
.record-table th {
  color: var(--faint);
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.record-table tr:last-child td { border-bottom: 0; }
.record-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dcf4e7;
  color: #24774b;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}
.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}
.record-stat {
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  padding: 10px 11px;
}
.record-stat span {
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.record-stat strong {
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1;
  letter-spacing: 0;
}
.record-stat small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
}
.record-event-snapshot {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
  padding: 14px;
}
.record-event-copy span {
  display: block;
  margin-bottom: 5px;
  color: #24774b;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.record-event-copy h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.record-event-copy p,
.record-event-dollar {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.record-event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.record-event-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}
.record-event-metric span {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.record-event-metric strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1;
}
.record-event-metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}
.record-event-dollar {
  border-left: 3px solid var(--green);
  background: rgba(47, 186, 115, 0.08);
  padding: 9px 10px;
}
.record-break-even {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.15fr) 28px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}
.break-even-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}
.break-even-card.is-key {
  border-color: rgba(47, 186, 115, 0.38);
  background: linear-gradient(180deg, rgba(47, 186, 115, 0.12), rgba(255, 255, 255, 0.96));
}
.break-even-card span {
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.break-even-card strong {
  color: var(--ink);
  font-size: clamp(0.98rem, 1.7vw, 1.22rem);
  line-height: 1;
}
.break-even-card small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}
.break-even-arrow {
  position: relative;
  min-height: 100%;
}
.break-even-arrow::before,
.break-even-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  background: #cfd8d0;
  transform: translateY(-50%);
}
.break-even-arrow::before {
  left: 2px;
  right: 8px;
  height: 2px;
  border-radius: 999px;
}
.break-even-arrow::after {
  right: 2px;
  width: 8px;
  height: 8px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.record-dummies {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) minmax(0, 1fr);
  gap: 14px;
  margin: 12px 0 20px;
  border: 1px solid #eadf9a;
  border-radius: 8px;
  background: #fff9d8;
  padding: 14px;
}
.record-dummies span {
  display: block;
  margin-bottom: 5px;
  color: #8c6d12;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.record-dummies h2 {
  margin: 0;
  color: #1d1a0a;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.record-dummies p {
  margin: 0;
  color: #4f4315;
  font-size: 0.88rem;
}
.record-performance {
  margin: 18px 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.record-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}
.record-chart-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 230px;
}
.record-chart-meta span {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}
.record-chart-meta strong { color: var(--ink); }
.record-chart {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.record-chart svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}
.record-chart-bg { fill: #fbfcfb; }
.record-chart-gridline line {
  stroke: #e4e9e4;
  stroke-width: 1;
}
.record-chart-gridline text,
.record-chart-x {
  fill: var(--faint);
  font-size: 11px;
  font-weight: 800;
}
.record-chart-axis {
  stroke: #aeb8b1;
  stroke-width: 1.2;
}
.record-chart-line {
  fill: none;
  stroke: #0a0b0a;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.record-chart-projection {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.2;
  stroke-dasharray: 7 7;
  stroke-linecap: round;
}
.record-chart-dot {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 1.2;
}
.record-chart-dot.is-negative {
  fill: #c83343;
}
.record-chart-end {
  fill: #0a0b0a;
  stroke: #fff;
  stroke-width: 2;
}
.record-chart-projected-dot {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 2.4;
}
.record-chart-label {
  fill: #0a0b0a;
  font-size: 12px;
  font-weight: 900;
}
.record-chart-label.is-projected { fill: #24774b; }
.record-projection-note {
  margin: 9px 0 0;
  font-size: 0.78rem;
}
.record-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}
.record-analysis-card {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.record-analysis-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.92rem;
}
.record-analysis-card ul {
  margin: 0;
  padding-left: 18px;
}
.record-analysis-card li { margin: 0 0 7px; }
.record-subtitle {
  margin: 24px 0 9px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
}
.record-table.is-full { min-width: 1080px; }
.record-table.is-breakdown { min-width: 680px; }
.record-table tr.is-loss { background: #fffafa; }
.record-table .positive {
  color: #1f8a53;
  font-weight: 900;
  white-space: nowrap;
}
.record-table .negative {
  color: #c83343;
  font-weight: 900;
  white-space: nowrap;
}
.record-table td:nth-child(4),
.record-table td:nth-child(6) { white-space: nowrap; }
.record-pill.is-loss {
  background: #ffe6e9;
  color: #c83343;
}
@media (max-width: 760px) {
  .seo-hero-grid,
  .seo-layout,
  .seo-cta {
    grid-template-columns: 1fr;
  }
  .seo-side {
    position: static;
  }
  .seo-stat-grid,
  .seo-step-grid {
    grid-template-columns: 1fr;
  }
  .seo-form-row {
    grid-template-columns: 1fr;
  }
  .seo-form .seo-button {
    width: 100%;
  }
  .record-section-head,
  .record-chart-head {
    display: grid;
  }
  .record-dummies {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .record-chart-meta {
    justify-content: flex-start;
    min-width: 0;
  }
  .record-chart {
    overflow-x: hidden;
  }
  .record-chart svg {
    min-width: 0;
  }
  .record-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .record-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .record-break-even {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .break-even-arrow {
    min-height: 16px;
  }
  .break-even-arrow::before {
    left: 50%;
    right: auto;
    top: 1px;
    bottom: 4px;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
  }
  .break-even-arrow::after {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 0;
    transform: translateX(-50%) rotate(90deg);
  }
  .record-analysis-grid {
    grid-template-columns: 1fr;
  }
  .record-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
  }
  .record-table th,
  .record-table td {
    padding: 9px 10px;
    font-size: 0.8rem;
  }
  .record-table th {
    font-size: 0.6rem;
  }
  .record-table.is-breakdown {
    min-width: 560px;
  }
  .record-table.is-full {
    min-width: 820px;
  }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
  color: var(--faint);
  font-size: 0.78rem;
}
.footer a { color: var(--ink); font-weight: 800; }

@media (max-width: 640px) {
  .record-event-snapshot {
    padding: 12px;
  }
  .record-event-grid {
    grid-template-columns: 1fr;
  }
  .container,
  .nav {
    width: min(100% - 22px, 980px);
  }

  .nav {
    min-height: 40px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 4px 0;
  }

  .brand {
    min-width: max-content;
    font-size: 0.82rem;
  }

  .nav-links {
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  .nav-links a {
    flex: 0 0 auto;
    height: 28px;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    padding: 0 8px;
    font-size: clamp(0.52rem, 2.35vw, 0.62rem);
    font-weight: 800;
  }

  .legal-hero { padding-top: 28px; }
}

/* Shared legal/SEO polish lock: keeps standalone pages aligned with the app header. */
body:not(.record-page) .topbar {
  min-height: 0;
}

body:not(.record-page) .topbar .container.nav {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

body:not(.record-page) .topbar .brand {
  min-width: max-content;
  font-size: 0.96rem;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1;
}

body:not(.record-page) .topbar .nav-links {
  min-width: 0;
  justify-content: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body:not(.record-page) .topbar .nav-links::-webkit-scrollbar {
  display: none;
}

body:not(.record-page) .topbar .nav-links a {
  height: 30px;
  min-height: 30px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  body:not(.record-page) .topbar .container.nav {
    width: min(100% - 12px, 980px);
    min-height: 40px;
    gap: 6px;
    padding: 4px 0;
  }

  body:not(.record-page) .topbar .brand {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  body:not(.record-page) .topbar .nav-links {
    gap: 5px;
  }

  body:not(.record-page) .topbar .nav-links a {
    height: 28px;
    min-height: 28px;
    padding: 0 7px;
    font-size: clamp(0.52rem, 2.35vw, 0.6rem);
    line-height: 1;
  }
}

/* Record page header: match the compact button logic used on the index page. */
.record-page .header-buttons {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.record-page .record-mobile-actions {
  display: none;
}

@media (min-width: 681px) {
  .record-page .topbar {
    min-height: 0;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #dce2dd;
    box-shadow: 0 8px 22px rgba(14, 18, 15, 0.045);
  }

  .record-page .topbar .container.nav {
    width: min(100% - 36px, 1180px);
    min-height: 42px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 6px 0;
  }

  .record-page .topbar .brand {
    min-width: max-content;
    width: auto;
    color: #050506;
    font-size: 0.96rem;
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1;
    white-space: nowrap;
  }

  .record-page .topbar .brand span {
    white-space: nowrap;
  }

  .record-page .topbar .header-buttons {
    width: 100%;
    justify-self: end;
  }

  .record-page .topbar .desktop-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
  }

  .record-page .topbar .desktop-nav a {
    width: auto;
    min-width: 0;
    height: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce2dd;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.82);
    color: #303632;
    padding: 0 10px;
    box-shadow: none;
    font-size: 0.64rem;
    font-weight: 820;
    letter-spacing: 0.02em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .record-page .topbar .desktop-nav a[href="checkout.html"] {
    border-color: #050506;
    background: #050506;
    color: #ffffff;
  }

  .record-page .topbar .desktop-nav a:hover {
    border-color: rgba(47, 186, 115, 0.45);
    background: rgba(47, 186, 115, 0.08);
    color: #1f8a53;
    transform: translateY(-1px);
  }

  .record-page .topbar .desktop-nav a[href="checkout.html"]:hover {
    border-color: #050506;
    background: #050506;
    color: #ffffff;
  }
}

@media (max-width: 680px) {
  .record-page .topbar .container.nav {
    width: min(100% - 12px, 1180px);
    min-height: 34px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 4px 0;
  }

  .record-page .topbar .brand {
    min-width: max-content;
    color: #050506;
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
  }

  .record-page .topbar .desktop-nav {
    display: none;
  }

  .record-page .topbar .header-buttons {
    width: 100%;
    min-width: 0;
  }

  .record-page .record-mobile-actions {
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
  }

  .record-page .top-button {
    width: auto;
    min-width: 0;
    height: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce2dd;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.86);
    color: #303632;
    padding: 0 6px;
    font-size: clamp(0.48rem, 2.15vw, 0.56rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .record-page .top-button.primary {
    border-color: #050506;
    background: #050506;
    color: #ffffff;
  }

  .record-page .top-button:hover {
    border-color: rgba(47, 186, 115, 0.45);
    background: rgba(47, 186, 115, 0.08);
    color: #1f8a53;
    transform: translateY(-1px);
  }

  .record-page .top-button.primary:hover {
    border-color: #050506;
    background: #050506;
    color: #ffffff;
  }
}

@media (max-width: 380px) {
  .record-page .topbar .container.nav {
    width: min(100% - 8px, 1180px);
    gap: 4px;
  }

  .record-page .topbar .brand {
    font-size: 0.76rem;
  }

  .record-page .record-mobile-actions {
    gap: 3px;
  }

  .record-page .top-button {
    height: 22px;
    min-height: 22px;
    padding-inline: 4px;
    font-size: clamp(0.43rem, 2.35vw, 0.5rem);
  }
}
