/* The pages around the app: the landing page (landing.html) and signing in /
   signing up (auth.html). Colors, type and form controls come from style.css,
   so the site and the app always match. */

:root {
  --brand-navy: #1e3a8a;
  --brand-amber: #f5a524;
  --site-width: 72rem;
}

body.site {
  background: var(--color-surface);
}

/* style.css pads the app's <main>; the site's sections run edge to edge. */
.site main {
  padding: 0;
}

.site-wrap {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site a {
  color: var(--color-primary);
}

/* ---- Buttons (links styled as buttons) --------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.site a.btn-primary,
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.site a.btn-primary:hover {
  background: var(--color-primary-hover);
}

.site a.btn-ghost {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.site a.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

/* ---- Header / footer ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4rem;
}

.site a.site-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: 1rem;
}

.site .site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site .site-nav a:hover {
  color: var(--color-text);
}

.site-header-actions {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site .site-footer a {
  color: var(--color-text-muted);
}

/* ---- Hero ------------------------------------------------------------------------ */

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--brand-amber) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-primary-soft), var(--color-surface) 85%);
  padding: 4.5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 750;
  text-wrap: balance;
}

.hero-lede {
  margin: 1.25rem 0 0;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-note {
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

/* The product picture: a stylized Overview card. */
.mock-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.14);
  padding: 1.35rem;
}

:root[data-theme="dark"] .mock-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mock-title {
  font-weight: 700;
}

.mock-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}

.mock-kpis span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.mock-kpis strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.mock-low {
  color: var(--color-warning);
}

.mock-chart {
  width: 100%;
  height: 8.5rem;
  display: block;
  overflow: visible;
}

.mock-zero {
  stroke: var(--viz-baseline);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.mock-line {
  fill: none;
  stroke: var(--viz-balance);
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mock-dot {
  fill: var(--viz-balance);
}

.mock-label {
  font-size: 10px;
  fill: var(--color-text-muted);
  font-weight: 600;
}

.mock-advice {
  margin-top: 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--color-success-soft);
  color: var(--color-text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.mock-check {
  color: var(--color-success);
  font-weight: 700;
  margin-right: 0.2rem;
}

/* ---- Switching from another finance app (under the hero) -------------------------- */

.switch-band {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 3rem 0;
}

.switch-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.switch-heading {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.switch-copy {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 36rem;
}

.site a.switch-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

.switch-link::after {
  content: " →";
}

.founder-quote {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--brand-amber);
  border-radius: var(--radius-md);
}

.founder-quote blockquote {
  margin: 0;
}

.founder-quote p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 600;
}

.founder-quote figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.founder-quote figcaption::before {
  content: "— ";
}

/* ---- Sections --------------------------------------------------------------------- */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-heading {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lede {
  margin: 0.75rem 0 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 40rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feature {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: var(--color-surface);
}

.feature-icon {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: none;
}

.steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.steps li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #fff;
  font-weight: 700;
}

:root[data-theme="dark"] .step-num {
  background: var(--color-primary);
}

/* The last step, the forecast: in the amber of the closing "Create your
   account" button and the founder quote's stripe, in both themes. */
.step-num.is-goal,
:root[data-theme="dark"] .step-num.is-goal {
  background: var(--brand-amber);
  color: #1a1200;
}

.steps h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.how-cta {
  margin-top: 2rem;
}

.security {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.security-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.security-list li {
  padding: 1rem 1.15rem 1rem 2.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  line-height: 1.5;
  color: var(--color-text-muted);
  position: relative;
}

.security-list li::before {
  content: "✓";
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--color-success);
  font-weight: 700;
}

.security-list strong {
  color: var(--color-text);
}

.closing {
  background: var(--brand-navy);
  color: #fff;
  padding: 4rem 0;
}

.closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* .btn sets a display, which would beat the hidden attribute. */
.site .btn[hidden] {
  display: none;
}

.invite-request-form {
  display: flex;
  flex-direction: row; /* phones stack forms, which turns the input's flex-basis into its height */
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.invite-request-form[hidden] {
  display: none;
}

.invite-request-form input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
}

.invite-request-status {
  flex-basis: 100%;
  margin-top: 0.25rem;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.demo-error {
  flex-basis: 100%;
  color: var(--color-danger);
}

.closing h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.site .closing a.btn-primary {
  background: var(--brand-amber);
  color: #1a1200;
}

.site .closing a.btn-primary:hover {
  background: #ffb83f;
}

/* ---- Sign in / sign up (auth.html) ------------------------------------------------ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 3rem;
  background: linear-gradient(180deg, var(--color-primary-soft), var(--color-bg) 22rem);
}

.auth-page .site-brand {
  margin-bottom: 1.75rem;
}

.auth-card {
  width: 100%;
  max-width: 27rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.auth-sub {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin: 0;
}

.auth-card label {
  font-size: 0.85rem;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
}

.auth-card button[type="submit"] {
  padding: 0.7rem 1rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* "Trust this browser for 30 days", at the sign-in code. */
.auth-card label.trust-field {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
}

.trust-field[hidden] {
  display: none !important;
}

/* Agreeing to the terms (signup, and the terms screen): laid out like the trust checkbox. */
.auth-card label.auth-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  line-height: 1.45;
}

.auth-check input {
  margin-top: 0.2rem;
  flex: none;
}

.trust-field input {
  margin-top: 0.2rem;
}

.trust-field .field-hint {
  display: block;
  margin-top: 0.15rem;
}

/* Signing in with a passkey, under the login form. */
.passkey-signin {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.passkey-signin[hidden] {
  display: none;
}

.passkey-signin button {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 1rem;
}

/* Account & security: passkeys, and the browsers that skip the code. */
.trusted-browsers {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.trusted-browsers h2 {
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.trusted-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: grid;
  gap: 0.5rem;
}

.trusted-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.field-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.code-input {
  font-size: 1.6rem !important;
  letter-spacing: 0.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 0.5em !important;
}

.auth-error {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-danger-soft);
  color: var(--color-danger);
  font-size: 0.88rem;
}

.auth-info {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-success-soft);
  color: var(--color-success);
  font-size: 0.88rem;
}

.auth-error[hidden],
.auth-info[hidden] {
  display: none;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.auth-links button.link-button {
  color: var(--color-primary);
  text-decoration: none;
  font-size: inherit;
  font-weight: 600;
}

.auth-links button.link-button:disabled {
  color: var(--color-text-muted);
  cursor: default;
}

.auth-foot {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* "Continue with Google": Google's own look (white, the coloured G, dark
   text) in both themes, as its branding rules ask. */
.sso-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

a.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border: 1px solid #747775;
  border-radius: var(--radius-md);
  background: #fff;
  color: #1f1f1f;
  font-weight: 500;
  text-decoration: none;
}

a.google-button:hover {
  background: #f2f2f2;
}

/* Apple's guidelines: black on a light page, white on a dark one. */
a.apple-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border: 1px solid #000;
  border-radius: var(--radius-md);
  background: #000;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

a.apple-button:hover {
  background: #333;
}

:root[data-theme="dark"] a.apple-button {
  border-color: #fff;
  background: #fff;
  color: #000;
}

:root[data-theme="dark"] a.apple-button:hover {
  background: #e6e6e6;
}

a.google-button[hidden],
a.apple-button[hidden] {
  display: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--color-border);
}

/* Their display: flex would otherwise beat the hidden attribute: the signup
   steps showed on every plain sign-in, the app-setup box on every code, and
   an "or" divider with no Google or Apple button above it. */
.wizard-steps[hidden],
.totp-setup[hidden],
.sso-block[hidden] {
  display: none;
}

/* Setting up an authenticator app: the QR code (always dark on white, which
   phone cameras need, in either theme) and the key for typing in by hand. */
.totp-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.totp-qr {
  background: #fff;
  border-radius: var(--radius-md);
  line-height: 0;
}

.totp-secret {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  word-break: break-all;
  user-select: all;
}

/* Sign-in security: pick email or an authenticator app. */
.choice {
  display: flex;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text) !important;
}

.choice:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.choice input {
  margin-top: 0.2rem;
}

.choice strong {
  display: block;
  font-size: 0.95rem;
}

.choice span {
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ---- Small screens ------------------------------------------------------------------ */

/* Pricing (landing page) */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  max-width: 52rem;
}

.price-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: var(--color-surface);
}

.price-card.is-plus {
  border: 2px solid var(--color-primary);
}

.price-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.price {
  margin: 0.5rem 0 1rem;
  color: var(--color-text-muted);
}

.price strong {
  font-size: 1.6rem;
  color: var(--color-text);
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.price-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.45;
  font-size: 0.94rem;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.price-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

.pricing-fine {
  max-width: 52rem;
  margin: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.pricing-fine[hidden] {
  display: none;
}

/* ---- How we compare (landing) ---------------------------------------------------- */

.compare-wrap {
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.compare-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.compare-table tbody th {
  font-weight: 600;
}

.compare-table .is-us {
  background: var(--color-primary-soft);
  font-weight: 600;
}

.compare-table thead .is-us {
  color: var(--color-primary);
}

/* ---- Questions (landing) ------------------------------------------------------------ */

.faq {
  margin-top: 2rem;
  max-width: 48rem;
  display: grid;
  gap: 0.75rem;
}

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: 0.9rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 0.6rem 0 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.mock-caption {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: right;
}

.closing-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 880px) {
  .hero-inner,
  .security,
  .switch-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .switch-inner {
    gap: 1.75rem;
  }
  .feature-grid,
  .steps,
  .steps-4 {
    grid-template-columns: 1fr 1fr;
  }
  .site-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .site-wrap {
    padding: 0 1rem;
  }
  .hero {
    padding: 3rem 0;
  }
  .section {
    padding: 3.5rem 0;
  }
  .switch-band {
    padding: 2.5rem 0;
  }
  .feature-grid,
  .steps,
  .steps-4 {
    grid-template-columns: 1fr;
  }
  /* Both header buttons stay on a phone, smaller: Log in matters most to
     people coming back, and the hero has its own sign-up button. */
  .site-header-actions {
    gap: 0.4rem;
  }
  .site-header-actions .btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
  }
  .auth-card {
    padding: 1.5rem 1.25rem;
  }
}

/* Very narrow phones: only Log in fits beside the name. */
@media (max-width: 359px) {
  .site-header-actions .btn-primary:not(:only-child) {
    display: none;
  }
}

/* Signing up during the private beta. */
.auth-beta {
  margin: -0.75rem 0 1.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-beta[hidden],
.hero-note[hidden] {
  display: none;
}

/* ---- Privacy, Terms and Help pages --------------------------------------------------------- */

/* main.legal: beats ".site main" above, which would otherwise take away the
   side gutter too and run the text edge to edge on a phone. */
.site main.legal {
  max-width: 46rem;
  padding: 2.5rem 1.25rem 4rem;
  line-height: 1.65;
}

.legal h1 {
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.legal .legal-date {
  color: var(--color-text-muted);
  margin-top: 0;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.5rem;
}

.legal h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.25rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal ol {
  padding-left: 1.5rem;
}

/* ---- Help (help.html): the legal pages' layout, plus a row of topics ---------------- */

.help-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.help-topics a {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.9rem;
  text-decoration: none;
}

.help-topics a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* A jump to a topic leaves its heading clear of the top edge. */
.help h2 {
  scroll-margin-top: 1.5rem;
}

/* Sign-in page: links to the legal pages under the card. */
.auth-legal {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1.25rem;
}

.auth-legal a {
  color: inherit;
}

/* Security choice: the consent wording under the mobile number. */
.auth-fine {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.auth-fine a {
  color: inherit;
}

/* Deleting an account: the one red button. */
.auth-card button.danger-button {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}

/* Delete your account: download a copy first. */
.delete-export {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  font-size: 0.9rem;
}

.delete-export p {
  margin: 0;
}

.delete-export-links {
  margin-top: 0.4rem !important;
}

.delete-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Landing page footer: links to TallyBeacon's social profiles. */
.site-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-social a {
  color: var(--color-text-muted);
  display: inline-flex;
}

.site-social a:hover,
.site-social a:focus-visible {
  color: var(--color-primary);
}

/* Keys in the help page's keyboard shortcuts. */
.help kbd,
main kbd {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border, #cbd5e1);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: inherit;
  font-size: 0.85em;
  line-height: 1.5;
}

/* ---- Switching guides (switch.html, guide-*.html): the legal pages' layout ---------- */

/* The answer up top: what to do and how long it takes. */
.guide-answer {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--brand-amber);
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
}

.guide-answer p {
  margin: 0;
}

.guide-figure {
  margin: 1rem 0 1.5rem;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* A small screenshot (a dialog captured at 1x): its own size, not stretched. */
.guide-figure.is-small img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.guide-figure.is-small figcaption {
  text-align: center;
}

.guide-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* The steps: each a numbered heading and what to do. */
.guide-steps {
  padding-left: 1.5rem;
}

.guide-steps > li {
  margin-bottom: 1rem;
}

/* "What carries over": scrolls sideways on a phone rather than squeezing. */
.guide-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.guide-table th,
.guide-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.guide-table thead th {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.guide-cta {
  margin: 2rem 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
}

.guide-cta p {
  margin: 0 0 0.75rem;
}

.guide-faq details {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0;
}

.guide-faq summary {
  font-weight: 600;
  cursor: pointer;
}

.guide-faq details p {
  margin: 0.5rem 0 0.25rem;
}

.guide-fine {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* The switching hub: one card per guide. */
.guide-list {
  list-style: none;
  padding: 0 !important;
  display: grid;
  gap: 0.75rem;
}

.guide-list li {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.guide-list a {
  font-weight: 600;
}

.guide-list p {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
}

/* The comparison's table: TallyBeacon's column first, and wide enough to read. */
.guide-compare {
  min-width: 44rem;
}

.guide-compare thead th:nth-child(2) {
  color: var(--color-primary);
}

/* "Try the demo" (demo.js) replaces the signup link; both set display. */
.guide-cta .btn[hidden],
.guide-cta p[hidden] {
  display: none;
}
