/* MassGrowth Markets client area. White paper, navy-graphite ink, steel for actions, silver for structure. */
:root {
  --paper: #ffffff;
  --ink: #182230;
  --ink-2: #4a5566;
  --steel: #3d5a80;
  --steel-deep: #2c4566;
  --blue: #00508f; /* the logo's blue, as on massgrowth.co: focus rings and fields in focus */
  /* Actions as on massgrowth.co: ink buttons and links (steel stays for the certificate and the terminal's own marks). */
  --action: #182230;
  --action-deep: #0c1420;
  --silver-1: #f2f4f7;
  --silver-2: #d5dae1;
  --silver-3: #8c96a3;
  --gain: #13795b;
  --loss: #b42318;
  --metal: linear-gradient(135deg, #fbfcfd 0%, #d9dee5 38%, #a7b0bc 62%, #eef1f4 100%);
  --radius-s: 6px;
  --radius-m: 10px;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2.125rem;
  /* The page's side margin: the content fills the window on a computer as on a phone (Chris, 21 Oct). */
  --gutter: clamp(16px, 4vw, 64px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* On a phone or tablet a field under 16px makes the browser zoom in when it is touched, and a double tap
   zooms too: every field is 16px there, and a double tap never zooms (pinching still does) (Chris, 21 Oct).
   A tap draws no grey box over what was tapped (the logo and name, a link, a button); it still works, and
   the keyboard's focus ring stays (Chris, 21 Oct). */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 "IBM Plex Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* The page container takes focus after each route change (screen readers start there); it needs no ring. */
#view:focus, #view:focus-visible { outline: none; }
/* The waitlist: the interest choice, and a field only bots fill in (kept off screen, not just hidden). */
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.panel > p + .form { margin-top: 14px; }
.choice legend { padding: 0; margin-bottom: 6px; font-size: var(--step--1); color: var(--ink-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.was { color: var(--silver-3); font-size: var(--step-0); font-weight: 400; margin-left: 6px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: var(--step-3); line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); line-height: 1.2; }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0; max-width: 68ch; }

/* ---- bar */
.bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--silver-2);
  backdrop-filter: saturate(1.4) blur(8px);
}
/* The firm's mark as massgrowth.co's bar sets it: the logo, and the name in the storefront's graphite, one colour
   with "MassGrowth" beside it (Chris, 21 Oct: the signed-in bar's name was two colours). */
.mark { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem); letter-spacing: -0.01em; white-space: nowrap; }
.mark:hover { color: var(--ink-2); }
.mark img { height: 40px; width: auto; display: block; }
/* The firm's name as massgrowth.co sets it: "MassGrowth" in brushed graphite (no sheen here, the pages redraw). */
.metal {
  color: var(--ink);
  background-image: linear-gradient(180deg, #7a8594 0%, #3e4a5b 52%, #5c6878 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) { .metal { -webkit-text-fill-color: CanvasText; background: none; } }
.mark .mono {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--metal); color: var(--ink); font-size: 0.8125rem; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.18);
}
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: var(--step--1); }

/* ---- page */
main { padding: 40px var(--gutter) 80px; outline: none; }
/* The foot of every page: the firm's documents and its registration, quiet. */
.site-foot { padding: 20px var(--gutter) 32px; border-top: 1px solid var(--silver-2); display: grid; gap: 8px; font-size: var(--step--1); color: var(--silver-3); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot p { margin: 0; max-width: 720px; }
.start-now { margin: 0 0 16px; max-width: 720px; }
/* The store's discount code: a field and Apply on one line, what it takes off under it. */
.code-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 0 0 12px; max-width: 520px; }
.code-form label { flex: 1 1 200px; }
.code-form input { text-transform: uppercase; letter-spacing: 0.04em; }
.code-form button { min-height: 44px; }
.code-form button.quiet { min-height: 44px; padding: 0 4px; }
.code-form .error { flex-basis: 100%; margin: 0; min-height: 0; }
.code-on { margin: 0 0 16px; max-width: 720px; }
/* A referral link: remembered only if the visitor agrees. */
.ref-ask { margin: 16px var(--gutter) 0; padding: 14px 16px; border: 1px solid var(--silver-2); border-radius: var(--radius-m); background: var(--silver-1); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; font-size: var(--step--1); color: var(--ink-2); }
.ref-ask p { margin: 0; max-width: 640px; }
.ref-actions { display: flex; gap: 8px; }
/* The audit trail's anchor: the fingerprint wraps anywhere, in figures that line up. */
.fingerprint { margin: 4px 0 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-weight: 500; color: var(--ink); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.lede { color: var(--ink-2); margin-top: 8px; }
.muted { color: var(--silver-3); }

/* ---- buttons and fields */
button, .button {
  font: inherit; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--action); background: var(--action); color: #fff; text-decoration: none;
}
button:hover, .button:hover { background: var(--action-deep); border-color: var(--action-deep); color: #fff; }
button:disabled { opacity: 0.55; cursor: progress; }
button.secondary, .button.secondary { background: var(--paper); color: var(--ink); border-color: var(--silver-2); }
button.secondary:hover, .button.secondary:hover { background: var(--paper); color: var(--ink); border-color: var(--silver-3); }
button.quiet { min-height: 0; padding: 4px 0; border: 0; background: none; color: var(--ink-2); }
button.quiet:hover { color: var(--ink); background: none; text-decoration: underline; }
label { display: grid; gap: 6px; font-weight: 500; font-size: var(--step--1); }
input, select {
  font: inherit; color: var(--ink); width: 100%;
  min-height: 44px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--silver-2); background: var(--paper);
}
input:focus, select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 80, 143, 0.16); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: var(--step--1); color: var(--ink-2); }
.check input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--ink); }
.form { display: grid; gap: 16px; }
.note { padding: 12px 14px; border-radius: var(--radius-s); background: var(--silver-1); color: var(--ink-2); font-size: var(--step--1); }
.error { color: var(--loss); font-size: var(--step--1); min-height: 1.2em; }

/* ---- sign-in and sign-up */
/* The signed-out pages, in massgrowth.co's look: its bar (the mark, the other way in) over a hairline, the
   page's title set as the storefront sets its headings, ink actions, and on sign-up a column beside the form. */
main:has(> .door) { padding-top: 0; }
.door { min-height: calc(100vh - 150px); display: flex; flex-direction: column; }
.door-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.25rem, 4vw, 2.5rem) 0 1rem; border-bottom: 1px solid var(--silver-2); }
.door .brand { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 600; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem); letter-spacing: -0.01em; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.door .brand img { height: 40px; width: auto; display: block; }
.door-other { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1.125rem; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--silver-2); color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; transition: box-shadow .2s ease; }
.door .door-other:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--silver-3); }
.door-body { flex: 1; display: grid; grid-template-columns: minmax(0, 26rem); justify-content: center; align-content: start; gap: 3rem; padding: clamp(3rem, 9vh, 5.5rem) 0 4rem; }
.door-split .door-body { grid-template-columns: minmax(0, 26rem) minmax(0, 23rem); column-gap: clamp(3rem, 8vw, 6.5rem); }
.door h1 { margin-bottom: 1.75rem; font-weight: 500; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.022em; }
.door-main > p + .form { margin-top: 1rem; }
.door .form { gap: 1.125rem; }
.door input:not([type="checkbox"]):not([type="radio"]), .door select { min-height: 3rem; border-radius: 8px; }
.door input:not([type="checkbox"]):not([type="radio"]):focus, .door select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 80, 143, 0.16); }
.door :focus-visible { outline-color: var(--blue); }
.door button, .door .button { min-height: 3.125rem; border-radius: 8px; border-color: var(--ink); background: var(--ink); font-size: 1rem; transition: background-color .2s ease; }
.door button:hover, .door .button:hover { border-color: #0c1420; background: #0c1420; }
.door a { color: var(--ink); }
.door a.button, .door a.button:hover { color: #fff; text-decoration: none; }
.door .check input { accent-color: var(--ink); }
.door .switch { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--ink-2); }
.door-safe { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--silver-2); font-size: 0.8125rem; line-height: 1.55; color: var(--ink-2); }
.door-aside { display: grid; gap: 2.75rem; align-content: start; padding-top: 0.625rem; }
.choice-card { padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.choice-card h2 { font-weight: 500; font-size: 1.5rem; letter-spacing: -0.015em; }
.choice-from { margin-top: 0.375rem; font-size: 0.875rem; color: var(--ink-2); }
.terms-list { margin: 1.25rem 0 0; }
.terms-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--silver-2); font-size: 0.9375rem; }
.terms-list dt { color: var(--ink-2); }
.terms-list dd { margin: 0; font-weight: 500; text-align: right; }
.terms-list .price dd { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.terms-list .price dd span { font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.next-steps h2 { font-size: 1.125rem; font-weight: 600; }
.next-steps ol { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); color: var(--ink-2); font-size: 0.9375rem; }
.next-steps li::before { content: counter(step); display: grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--silver-2); font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.next-steps b { color: var(--ink); font-weight: 600; }

/* ---- accounts: the rule rail */
.accounts { display: grid; gap: 0; border-top: 1px solid var(--silver-2); }
.acct { padding: 26px 0 30px; border-bottom: 1px solid var(--silver-2); display: grid; gap: 18px; }
.acct-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.acct-id { font-weight: 600; font-size: var(--step-1); }
.tag { font-size: var(--step--1); color: var(--ink-2); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--silver-2); }
.tag.active { border-color: rgba(19, 121, 91, 0.35); color: var(--gain); }
.tag.passed { border-color: rgba(61, 90, 128, 0.4); color: var(--steel); }
.tag.breached { border-color: rgba(180, 35, 24, 0.35); color: var(--loss); }
.figures { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.fig { display: grid; gap: 2px; }
.fig dt { font-size: var(--step--1); color: var(--ink-2); }
.fig dd { margin: 0; font-size: var(--step-1); font-weight: 500; }
.fig dd.gain { color: var(--gain); }
.fig dd.loss { color: var(--loss); }

.rail { position: relative; height: 64px; margin: 4px 0 0; }
.rail.two-rows { height: 82px; }
.rail .track { position: absolute; left: 0; right: 0; top: 22px; height: 4px; border-radius: 2px; background: var(--silver-1); box-shadow: inset 0 0 0 1px var(--silver-2); }
.rail .danger { position: absolute; top: 22px; height: 4px; background: rgba(180, 35, 24, 0.22); border-radius: 2px 0 0 2px; left: 0; }
.rail .goal { position: absolute; top: 22px; height: 4px; background: rgba(19, 121, 91, 0.22); border-radius: 0 2px 2px 0; right: 0; }
.rail .tick { position: absolute; top: 14px; width: 1px; height: 20px; background: var(--silver-3); }
.rail .tick.start { background: var(--ink-2); }
.rail .label { position: absolute; top: 40px; transform: translateX(-50%); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; }
.rail .label.edge-l { transform: none; }
.rail .label.edge-r { transform: translateX(-100%); }
.rail .label.row-2 { top: 58px; }
.rail .label.off { visibility: hidden; }
.rail .needle {
  position: absolute; top: 11px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  background: var(--metal); box-shadow: 0 0 0 2px var(--steel), 0 2px 6px rgba(24, 34, 48, 0.22);
}
.rail .needle-label { position: absolute; top: -10px; transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .rail .needle, .rail .needle-label { transition: left 600ms cubic-bezier(.2, .7, .2, 1); }
}
.acct-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; font-size: var(--step--1); color: var(--ink-2); }

.empty { padding: 48px 0; display: grid; gap: 16px; justify-items: start; border-top: 1px solid var(--silver-2); }

/* ---- store: the price ladder */
.tracks { display: inline-flex; border: 1px solid var(--silver-2); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 28px; }
.tracks button { min-height: 36px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); padding: 0 18px; }
.tracks button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ladder { width: 100%; border-collapse: collapse; }
.ladder th, .ladder td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--silver-2); vertical-align: middle; }
.ladder thead th { font-size: var(--step-1); font-weight: 600; }
.ladder thead th small { display: block; font-size: var(--step--1); font-weight: 400; color: var(--ink-2); }
.ladder tbody th { font-weight: 400; color: var(--ink-2); width: 32%; }
.ladder tbody th small { display: block; color: var(--silver-3); font-size: var(--step--1); }
.ladder .price td { font-size: var(--step-2); font-weight: 600; border-bottom: 0; padding-top: 24px; }
.ladder .buy td { border-bottom: 0; }
/* The size chosen on massgrowth.co (intent.js), shaded once when the store opens on it. */
.ladder .chosen { background: var(--silver-1); }
.ladder thead th.chosen small { color: var(--ink); font-weight: 500; }
.rules-note { margin-top: 24px; color: var(--ink-2); font-size: var(--step--1); max-width: 72ch; }

/* ---- order, settings */
.status-line { display: flex; gap: 12px; align-items: center; font-size: var(--step-1); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--silver-2); border-top-color: var(--steel); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 0.9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.section { padding: 28px 0; border-top: 1px solid var(--silver-2); display: grid; gap: 14px; max-width: 640px; }
.section .form button, .section > div > button { justify-self: start; }
.secret { font-size: var(--step-1); letter-spacing: 0.08em; word-break: break-all; padding: 12px 14px; background: var(--silver-1); border-radius: var(--radius-s); }

/* ---- small screens */
@media (max-width: 860px) {
  .door-split .door-body { grid-template-columns: minmax(0, 26rem); row-gap: 3.5rem; }
  .bar { gap: 16px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; gap: 18px; }
  .who #who-email { display: none; }
  .ladder th, .ladder td { padding: 12px 6px; font-size: var(--step--1); }
  .ladder .price td { font-size: var(--step-1); }
  .ladder tbody th { width: auto; }
}
/* Local mode: the order page's simulated payment. */
.note.simulate { display: grid; gap: 10px; justify-items: start; margin-top: 12px; }
.note.simulate p { margin: 0; }

/* ---- an account's page: payouts, certificates, statistics */
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.small { font-size: var(--step--1); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8125rem; overflow-wrap: anywhere; }
.crumb { font-size: var(--step--1); margin: 0 0 10px; }
.section.wide { max-width: none; }
.section h3 { font-size: var(--step-0); margin-top: 8px; }
.section h3 small { font-weight: 400; font-size: var(--step--1); }
.acct.solo { border-bottom: 0; padding: 0 0 8px; }
.why { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); max-width: 68ch; }
.payout-form { max-width: 560px; }
.request { display: grid; gap: 16px; }
.note.identity { display: grid; gap: 10px; justify-items: start; }
.note.identity p { margin: 0; }
table.plain { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
table.plain th, table.plain td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--silver-2); vertical-align: top; }
table.plain th { color: var(--ink-2); font-weight: 500; }

/* Where a payout request has got to. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; max-width: 760px; }
.steps li { position: relative; display: grid; gap: 2px; padding-top: 22px; color: var(--silver-3); font-size: var(--step--1); }
.steps li::before { content: ""; position: absolute; top: 6px; left: 16px; right: -6px; height: 2px; background: var(--silver-2); }
.steps li:last-child::before { display: none; }
.steps .dot { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--silver-2); }
.steps li.done { color: var(--ink-2); }
.steps li.done .dot { background: var(--gain); box-shadow: none; }
.steps li.done::before { background: var(--gain); }
.steps li.now { color: var(--ink); font-weight: 500; }
.steps li.now .dot { background: var(--metal); box-shadow: 0 0 0 2px var(--steel); }
.steps .when { font-size: 0.75rem; font-weight: 400; color: var(--ink-2); min-height: 1em; }

/* Certificates on the accounts list. */
.cert-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cert-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--silver-2); border-radius: var(--radius-m); background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%); }
.cert-card-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--metal); font-weight: 600; font-size: 0.8125rem; box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.18); }
.cert-card-body { display: grid; gap: 4px; min-width: 0; }
.cert-card-body h3 { font-size: var(--step-0); }
.cert-card-body p { font-size: var(--step--1); }
.cert-card-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 6px; }
.cert-card-actions .button, .cert-card-actions button:not(.quiet) { min-height: 34px; padding: 0 12px; font-size: var(--step--1); }

/* Statistics. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border: 1px solid var(--silver-2); border-radius: var(--radius-m); overflow: hidden; }
.stat { display: grid; gap: 2px; align-content: start; padding: 14px 16px; box-shadow: 1px 0 0 var(--silver-2), 0 1px 0 var(--silver-2); }
.stat dt { font-size: var(--step--1); color: var(--ink-2); }
.stat dd { margin: 0; font-size: var(--step-1); font-weight: 600; }
.stat dd small { font-size: var(--step--1); font-weight: 400; color: var(--ink-2); }
.stat > small { font-size: 0.75rem; color: var(--silver-3); }
canvas.curve { display: block; width: 100%; height: 280px; }

/* The daily results calendar. */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px 32px; }
.month h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: var(--step-0); }
.month h3 span { font-weight: 500; }
.cal { display: grid; gap: 3px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-head { font-size: 0.6875rem; color: var(--silver-3); text-align: center; }
.cal-day { display: grid; align-content: space-between; min-height: 46px; padding: 4px 5px; border-radius: 6px; background: var(--silver-1); color: var(--ink-2); font-size: 0.6875rem; }
.cal-day.out { background: none; }
.cal-day.weekend { background: #f8f9fb; color: var(--silver-3); }
.cal-day .v { font-size: 0.75rem; font-weight: 600; text-align: right; white-space: nowrap; }
.cal-day.flat { background: #e9edf2; }
.cal-day.up { background: #e8f4ef; color: var(--gain); }
.cal-day.up.l2 { background: #cde8dc; }
.cal-day.up.l3 { background: #a9d6c2; color: #0b5640; }
.cal-day.down { background: #fcefee; color: var(--loss); }
.cal-day.down.l2 { background: #f7d6d3; }
.cal-day.down.l3 { background: #efb6b0; color: #8a170e; }

/* ---- a certificate's page: silver on white, landscape like A4, printable */
.cert-page { display: grid; gap: 22px; justify-items: center; }
.certificate {
  position: relative; width: 100%; max-width: 1040px; aspect-ratio: 1.414 / 1;
  background: radial-gradient(ellipse at center, #ffffff 45%, #f1f3f6 100%);
  box-shadow: 0 1px 2px rgba(24, 34, 48, 0.06), 0 18px 48px rgba(24, 34, 48, 0.12);
  container-type: inline-size;
}
.certificate::before {
  content: ""; position: absolute; inset: 2.6%; pointer-events: none;
  border: 1.1cqi solid transparent;
  border-image: linear-gradient(135deg, #f4f6f8 0%, #c9d0d9 25%, #8f99a6 50%, #d6dce3 75%, #a7b0bc 100%) 1;
}
.certificate::after { content: ""; position: absolute; inset: 5.4%; border: 1px solid #a7b0bc; pointer-events: none; }
.cert-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; text-align: center; padding: 6.4% 10% 5.6%; }
/* The words in the middle of the space the footer leaves (the footer is in the flow: nothing overlaps). */
.cert-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.cert-brand { display: flex; flex-direction: column; align-items: center; gap: 1.2cqi; }
.cert-mono {
  display: inline-grid; place-items: center; width: 6cqi; height: 6cqi; min-width: 40px; min-height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #f4f6f8 0%, #c9d0d9 30%, #8f99a6 55%, #e3e7ec 100%);
  box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.25); font-weight: 600; font-size: max(0.8rem, 2.1cqi); color: var(--ink);
}
.cert-firm { font-weight: 600; font-size: max(0.75rem, 1.7cqi); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink); }
.cert-kicker { margin-top: 2.6cqi; font-size: max(0.7rem, 1.45cqi); letter-spacing: 0.26em; text-transform: uppercase; color: var(--steel); }
.cert-achievement { margin-top: 1.1cqi; font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif; font-weight: 500; font-size: max(1.6rem, 5.4cqi); line-height: 1.1; letter-spacing: -0.01em; }
.cert-presented { margin-top: 2cqi; font-family: "IBM Plex Serif", Georgia, serif; font-style: italic; font-size: max(0.9rem, 1.9cqi); color: var(--ink-2); }
.cert-name { margin-top: 0.8cqi; font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif; font-weight: 500; font-size: max(1.5rem, 4.8cqi); line-height: 1.15; overflow-wrap: anywhere; }
.cert-rule { display: block; width: 36%; height: 3px; margin: 2cqi auto 1.6cqi; background: linear-gradient(90deg, rgba(167, 176, 188, 0) 0%, #a7b0bc 18%, #8f99a6 50%, #a7b0bc 82%, rgba(167, 176, 188, 0) 100%); }
.cert-amount { font-weight: 600; font-size: max(0.95rem, 2.1cqi); color: var(--ink); }
.cert-detail, .cert-date { font-size: max(0.85rem, 1.9cqi); color: var(--ink-2); }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; text-align: left; padding: 0 0 0 1%; }
.cert-number { font-weight: 500; font-size: max(0.7rem, 1.4cqi); color: var(--ink); }
.cert-verified, .cert-verify { font-size: max(0.65rem, 1.25cqi); color: var(--ink-2); }
.cert-verify { color: var(--steel); overflow-wrap: anywhere; }
.cert-seal {
  flex: none; display: grid; place-items: center; align-content: center; width: 10.5cqi; height: 10.5cqi; min-width: 64px; min-height: 64px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 57%, transparent 58%), linear-gradient(135deg, #f4f6f8 0%, #c9d0d9 25%, #8f99a6 50%, #d6dce3 75%, #a7b0bc 100%);
  box-shadow: 0 0 0 1px rgba(143, 153, 166, 0.6);
}
.cert-seal b { font-size: max(0.9rem, 2.6cqi); line-height: 1; color: var(--ink); }
.cert-seal small { font-size: max(0.5rem, 0.95cqi); letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel); font-weight: 600; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cert-note { color: var(--ink-2); font-size: var(--step--1); text-align: center; }
.cert-missing { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 64px 0; }
.cert-missing .cert-mono { width: 56px; height: 56px; font-size: 1rem; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 14px 26px; }
  .steps li::before { top: 16px; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-day { min-height: 40px; padding: 3px 4px; }
  .cal-day .v { font-size: 0.6875rem; }
  canvas.curve { height: 220px; }
  /* On a phone the certificate stands upright, its words on lines of their own. */
  .certificate { aspect-ratio: auto; }
  .cert-inner { padding: 13% 10% 10%; }
  .cert-main { padding: 4% 0 10%; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.certificate-view .bar, body.certificate-view .cert-actions, body.certificate-view .cert-note { display: none !important; }
  body.certificate-view main { padding: 0; }
  body.certificate-view .cert-page { display: block; }
  body.certificate-view .certificate { width: 297mm; height: 209mm; max-width: none; aspect-ratio: auto; box-shadow: none; }
}

/* ---- the extras: the firm's announcements, support tickets, the affiliate link */
.notices { display: grid; gap: 8px; padding: 12px var(--gutter) 0; }
.notice { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 10px 14px; border-radius: var(--radius-s); background: var(--silver-1); border: 1px solid var(--silver-2); font-size: var(--step--1); color: var(--ink-2); }
.notice.important { background: #fff8eb; border-color: #e9c46a; color: var(--ink); }
.notice-text { display: grid; gap: 2px; min-width: 0; }
.notice-text strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.notice-text p { white-space: pre-line; overflow-wrap: anywhere; }
.notice-close { flex: none; min-height: 0; padding: 2px 0; border: 0; background: none; color: var(--steel); font-size: var(--step--1); }
.notice-close:hover { background: none; color: var(--steel-deep); text-decoration: underline; }
.certificate-view .notices { display: none; }
textarea { font: inherit; color: var(--ink); width: 100%; min-height: 96px; padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--silver-2); background: var(--paper); resize: vertical; }
textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 80, 143, 0.16); }
.ticket-subject { overflow-wrap: anywhere; }
.ticket-title { font-size: var(--step-2); overflow-wrap: anywhere; }
.tag.ticket-open { border-color: var(--steel); color: var(--steel); }
.tag.ticket-waiting { border-color: var(--gain); color: var(--gain); }
.thread { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.msg { display: grid; gap: 6px; padding: 12px 16px; border-radius: var(--radius-m); border: 1px solid var(--silver-2); }
.msg.support { background: var(--silver-1); }
.msg-head { font-size: var(--step--1); color: var(--ink-2); }
.msg-body { max-width: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-reply { max-width: 760px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.ref-link { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--silver-2); border-radius: var(--radius-s); background: var(--silver-1); max-width: 760px; }
.ref-url { font-size: var(--step-0); }
@media (max-width: 860px) {
  /* Six links in the bar: on a phone they wrap rather than run off the side. */
  .nav { flex-wrap: wrap; gap: 6px 18px; }
  table.tickets th:nth-child(3), table.tickets td:nth-child(3) { display: none; }
}

/* On a narrow phone the sign-in page's longer "Create an account" leaves the bar: the page links to it below the form. */
@media (max-width: 480px) { .door-other.long { display: none; } }
