/* ==========================================================================
   GymPilotIQ.Web — application styles

   Deliberately hand-written rather than pulled from a framework: the whole
   stylesheet is smaller than a CSS framework's gzipped header, and it lets the
   web app match the phone app's dark/cyan identity exactly rather than
   approximately.

   The colour variables are the MAUI app's Colors.xaml, one for one.
   ========================================================================== */

:root {
  --bg: #000000;
  --panel: #111111;
  --panel-2: #0d0d0d;
  --line: #2a2a2a;
  --line-strong: #333333;
  --text: #ffffff;
  --muted: #bfbfbf;
  --dim: #8a8a8a;

  --cyan: #03f7fa;
  --green: #66e2ac;
  --yellow: #f3f659;
  --red: #ff6b6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.brand img { display: block; width: 144px; height: auto; }
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a.active { color: var(--cyan); font-weight: 600; }

.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--dim); }

.foot {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}

/* ---------- Typography ---------- */

h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 28px 0 10px; color: var(--cyan); }
.lede { color: var(--muted); margin: 0 0 20px; }
.headline { color: var(--cyan); font-size: 18px; margin: 0 0 6px; }
.meta { color: var(--dim); font-size: 13px; margin: 0 0 20px; }

/* ---------- Cards ---------- */

.card {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 15px; color: var(--cyan); }
.card p { margin: 0; color: var(--muted); white-space: pre-line; }
.card.coach { border-color: var(--cyan); }
.card.coach p { color: var(--text); }

/* ---------- Day cards ---------- */

.day {
  display: flex;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

/* The left-hand colour bar encodes effort at a glance, and goes grey once the
   session has actually been logged. */
.day .bar { width: 4px; border-radius: 2px; background: var(--cyan); flex: 0 0 4px; }
.day.hard .bar { background: var(--yellow); }
.day.moderate .bar { background: var(--green); }
.day.easy .bar { background: var(--cyan); }
.day.done .bar { background: #6e6e6e; }
.day.done { opacity: 0.72; }

.day .body { flex: 1; min-width: 0; }
.day .when { font-size: 12px; color: var(--dim); display: flex; justify-content: space-between; gap: 10px; }
.day .logged { color: var(--green); }
.day .title { font-size: 17px; font-weight: 700; margin: 2px 0; }
.day .effort { font-size: 12px; color: var(--dim); }
.day.hard .effort { color: var(--yellow); }
.day.moderate .effort { color: var(--green); }
.day .detail { font-size: 14px; color: var(--muted); margin-top: 4px; white-space: pre-line; }
.day .note { font-size: 12.5px; color: var(--yellow); font-style: italic; margin-top: 6px; }

/* ---------- Forms ---------- */

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 14px; color: #c8c8c8; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--dim); margin-top: 4px; }
.hint.warn { color: var(--yellow); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Sign-in fields share exact dimensions even though their HTML types differ.
   16px text prevents iOS focus zoom; 48px height is a comfortable touch target. */
.auth-form .auth-input { width: 100%; min-height: 48px; border-radius: 12px; box-sizing: border-box; }
.actions.auth-actions { align-items: stretch; }
.auth-actions > button, .auth-actions > .btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 1 1 100px; text-align: center; min-height: 48px; line-height: 1.5;
}
/* Keep the readiness border visible even while the button is disabled. A fixed
   border width prevents a layout shift when fields/CAPTCHA change state. */
.auth-actions .auth-submit { border: 3px solid #ff4d4d; }
.auth-actions .auth-submit.is-ready { border-color: #22c55e; }
.auth-actions .auth-submit:disabled { opacity: 1; background: #19333a; color: #b6c8cc; }
.auth-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.auth-controls:disabled { opacity: 1; }
.api-unavailable .auth-controls input,
.api-unavailable .auth-controls button { border: 2px solid #ff4d4d; cursor: not-allowed; }
.api-unavailable .auth-controls input[type="checkbox"] { outline: 2px solid #ff4d4d; outline-offset: 2px; }
.api-unavailable [aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.btn.ghost { background: #1a1a1a; color: var(--cyan); border: 1.5px solid var(--cyan); }
.turnstile-host { min-height: 65px; width: 100%; }
.turnstile-challenge { margin-top: 20px; }
/* Not display:none: crude automated fillers still see the honeypot, while
   tabindex/aria-hidden also remove it from accessible form navigation. */
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

input[type="range"] { width: 100%; accent-color: var(--cyan); }

textarea { min-height: 80px; resize: vertical; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }

.check { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-size: 14px; }
.check input { width: auto; accent-color: var(--cyan); }

/* ---------- Buttons ---------- */

button, .btn {
  background: var(--cyan);
  color: #000;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.ghost {
  background: #1a1a1a;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
}

button.linkish {
  background: none;
  border: none;
  color: var(--cyan);
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Validation and messages ---------- */

/* Blazor applies .invalid / .modified itself as fields are edited. */
.invalid { border-color: var(--red) !important; }
.validation-message { color: var(--red); font-size: 12.5px; display: block; margin-top: 4px; }
.validation-errors { color: var(--red); font-size: 13px; margin: 0 0 14px; padding-left: 18px; }

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert.error { background: rgba(255, 107, 107, 0.12); border: 1px solid var(--red); color: var(--red); }
.alert.ok { background: rgba(102, 226, 172, 0.12); border: 1px solid var(--green); color: var(--green); }
.alert.warn { background: rgba(243, 246, 89, 0.10); border: 1px solid var(--yellow); color: var(--yellow); }

.busy { color: var(--dim); font-size: 13px; margin: 10px 0; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Blazor's built-in error banner ---------- */

#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: black;
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* ===========================================================================
   Exercise links and the exercise detail page
   ===========================================================================
   Added when This Week gained tappable movement names. The palette is the one
   already defined at the top of this file; nothing new is introduced here.

   The link colour is --cyan, which this app uses for "this is interactive"
   everywhere else, so a movement name reads as clickable without needing an
   underline to shout about it.
   =========================================================================== */

.exercises {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.exercises li { margin-bottom: 10px; }

/* The movement name itself. Underlined only on hover so a list of five links
   does not turn the card into a wall of rules. */
.exercise-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.exercise-link:hover,
.exercise-link:focus { text-decoration: underline; }

/* "3 x 3-5" — the dose, sitting beside the name rather than under it. */
.dose { color: var(--text); margin-left: 8px; font-size: 13px; }

/* The one-line reason the movement is in the session. */
.why { color: var(--dim); font-size: 12px; margin-top: 2px; }

/* Equally acceptable swaps, offered inline under the primary choice. */
.alts { color: var(--dim); font-size: 12px; margin-top: 2px; }
.alts .exercise-link { font-weight: 500; margin-left: 4px; }

/* ---- Detail page ---- */

/* The picture card. The image is capped so a 240x180 line drawing and a
   photograph of a leg press end up the same size on the page. */
.exercise-image { text-align: center; }

.exercise-image img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--panel);
}

.caption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.caption.subtle { color: var(--dim); font-size: 12px; font-style: italic; }

/* The single cue. Accented because it is the one line worth remembering
   while holding something heavy. */
.card.cue { border-color: var(--cyan); }
.card.cue p { color: var(--text); font-size: 16px; }

/* Safety. Yellow, always expanded, never collapsible - see Exercise.razor. */
.card.safety { border-color: var(--yellow); background: rgba(243, 246, 89, 0.06); }
.card.safety h3 { color: var(--yellow); }

/* Ordered and unordered lists inside a detail card inherit the muted body
   colour; .card p rules do not reach them. */
.card ol, .card ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.card li { margin-bottom: 6px; }

/* ==========================================================================
   Equipment release: phone-first shell and reusable screen primitives.
   Existing advisor selectors above remain intact for the deferred screens.
   min-width:0 and wrapping prevent long equipment names/location notes from
   widening a phone viewport. Safe-area insets protect iPhone home indicators.
   ========================================================================== */
:root { color-scheme: dark; --dim: #aaaeb7; --panel: #11151c; --panel-2: #0c1016; }
body { background: radial-gradient(ellipse at top, #102129 0, #080b10 520px); }
.app { max-width: 1180px; padding: 0 18px calc(110px + env(safe-area-inset-bottom)); }
main { min-height: 55vh; outline: none; }
main, section, article, .form-grid > *, .detail-grid > * { min-width: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; margin-bottom: 12px; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p, dd, h1, h2, h3, a { overflow-wrap: anywhere; }
.topbar { justify-content: space-between; gap: 12px; margin-bottom: 30px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.brand img { width: 64px; height: auto; }
.brand small { font-size: 10px; letter-spacing: .04em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-link, .avatar { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; font-weight: 700; }
.avatar { overflow: hidden; background: #19333a; color: var(--cyan); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
button.linkish { min-height: 44px; padding: 8px; }
.primary-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; background: #0c1119f5; border-top: 1px solid #293540; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); backdrop-filter: blur(12px); }
.primary-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; max-width: 140px; color: var(--muted); font-size: 12px; border-radius: 10px; }
.primary-nav a span { font-size: 22px; line-height: 1; }
.primary-nav a.active { background: #153139; color: var(--cyan); }
.primary-nav a:hover { text-decoration: none; background: #14242c; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 100; background: var(--cyan); color: #000; padding: 12px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
button, .button, summary { min-height: 44px; }
button, .button { touch-action: manipulation; }
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--cyan); color: #041216; border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 700; text-align: center; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.secondary { background: #17212a; color: var(--cyan); border: 1px solid #33434d; }
.danger { color: #ffc0c0; background: #602323; }
.danger.secondary { background: transparent; border-color: #784343; }
.actions { margin: 16px 0; align-items: center; }
.card { border-radius: 18px; border-color: #29323b; padding: 22px; }
.card h2 { margin: 0 0 14px; }
.card p + p, .card p + .actions, .card p + button { margin-top: 14px; }
.card p { white-space: normal; }
.card .instructions { white-space: pre-line; }
.eyebrow { display: block; color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
.dashboard-grid, .action-grid, .machine-grid, .detail-grid, .goal-options { display: grid; gap: 16px; }
.dashboard-grid, .action-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.machine-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat > strong { font-size: 2rem; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.stat .meta { margin: 0; }
.onboarding, .featured { border: 1px solid #29727a; background: linear-gradient(130deg, #123039, #10171e); }
.action-grid { margin: 10px 0 24px; }
.action-card { display: block; border: 1px solid #2b3c44; border-radius: 18px; padding: 22px; color: var(--text); background: #10171e; }
.action-card h2 { margin: 0 0 12px; }
.action-card p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.action-card:hover { text-decoration: none; border-color: var(--cyan); }
.locked { border-color: #815454; }
.machine-card { display: flex; flex-direction: column; border: 1px solid #293843; border-radius: 18px; overflow: hidden; background: #111820; color: var(--text); }
.machine-card img { width: 100%; height: 195px; object-fit: contain; background: #edf0f3; }
.machine-card > div { padding: 18px; }
.machine-card h3 { margin: 0 0 8px; color: var(--text); }
.machine-card p { font-size: 14px; color: var(--muted); }
.machine-card:hover { border-color: var(--cyan); text-decoration: none; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.tag { display: inline-block; border-radius: 20px; padding: 4px 10px; background: #1d3039; color: #a4edf0; font-size: 12px; }
.stars { color: var(--yellow); letter-spacing: 2px; font-size: 20px; }
.prescription { display: block; color: var(--cyan); font-size: 1.5rem; margin: 20px 0 12px; }
.guidance { border-color: #26636d; }
.guidance .meta { margin-top: 14px; }
.alert.success { color: var(--green); background: #122a22; border: 1px solid #2e7158; }
.alert.caution { color: var(--yellow); background: #302d15; border: 1px solid #7d7836; margin-top: 18px; }
fieldset { border: 1px solid #29323b; border-radius: 16px; padding: 20px; margin: 20px 0; }
fieldset:disabled { opacity: .8; }
legend { padding: 0 8px; font-weight: 700; color: var(--cyan); }
.form-grid { display: grid; gap: 4px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
input, select, textarea { max-width: 100%; }
input[type="file"] { width: 100%; font-size: 14px; margin-top: 8px; min-height: 44px; }
input[type="file"]::file-selector-button { padding: 10px; border-radius: 8px; border: 1px solid #3c5961; margin-right: 8px; background: #192e36; color: var(--cyan); cursor: pointer; }
.field small, .check { color: var(--muted); }
.check { align-items: flex-start; line-height: 1.6; }
.check input { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; }
.goal-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.goal-option { border: 1px solid #34424a; border-radius: 12px; background: #131d25; color: var(--text); padding: 16px; text-align: left; }
.goal-option small { display: block; color: var(--muted); margin-top: 6px; font-weight: 400; }
.goal-option.selected { background: #14373e; border: 2px solid var(--cyan); padding: 15px; }
.facts { display: grid; grid-template-columns: minmax(100px, 1fr) 2fr; gap: 12px; font-size: 14px; margin-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.profile-heading { display: flex; align-items: center; gap: 20px; }
.profile-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.photo-pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.image-button { display: block; width: 100%; padding: 0; overflow: hidden; border-radius: 12px; background: #edf0f3; margin-bottom: 16px; }
.machine-photo { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.muscle-photo { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.image-hint { display: block; color: #23343b; font-size: 12px; padding: 6px; }
.image-dialog { max-width: 94vw; width: 1000px; max-height: 94dvh; border: 1px solid #356570; border-radius: 16px; background: #10171e; padding: 16px; }
.image-dialog::backdrop { background: #000c; }
.image-dialog img { display: block; max-width: 100%; max-height: 77dvh; margin: 14px auto 0; object-fit: contain; background: #edf0f3; }
.candidate { display: block; width: 100%; margin-top: 10px; text-align: left; }
.alternative { display: flex; justify-content: space-between; gap: 14px; padding: 16px 0; border-top: 1px solid #29323b; }
.alternative span { color: var(--yellow); white-space: nowrap; }
.back-link { display: inline-block; padding: 6px 0 18px; }
.gym-photo { width: 100%; height: 200px; object-fit: contain; background: #edf0f3; border-radius: 10px; margin-bottom: 16px; }
.gym-card { margin-bottom: 0; }
.confirm { margin-top: 16px; padding: 14px; border: 1px solid #805252; border-radius: 12px; }
.confirm button { margin: 12px 8px 0 0; }
summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--text); }
details[open] > summary { margin-bottom: 12px; color: var(--cyan); }
.weight-editor input { max-width: 300px; }
.weight-chart { width: 100%; max-height: 220px; color: var(--cyan); border-bottom: 1px solid #30404a; }
.chart-labels { display: flex; justify-content: space-between; font-size: 12px; gap: 16px; margin-top: 8px !important; }
.card .history-list { list-style: none; padding: 0; font-size: 14px; }
.history-list li { display: flex; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid #29323b; margin: 0; }
.history-list li > div:last-child { text-align: right; }
.history-list small { display: block; color: var(--muted); margin-top: 5px; }
.empty { padding: 30px 22px; color: var(--muted); }
.help-steps li { padding: 6px 0; }

/* Single-column capture/forms avoid cramped touch controls. 16px text in inputs
   prevents Safari's automatic focus zoom. Navigation remains reachable without
   covering the final field, including devices with bottom safe-area insets. */
@media (max-width: 640px) {
    .app { padding-left: 14px; padding-right: 14px; }
    .brand { font-size: 17px; gap: 6px; }
    .brand img { width: 46px; }
    .brand small { font-size: 8px; }
    .header-actions { gap: 5px; }
    .header-actions .icon-link, .header-actions .avatar { width: 40px; height: 40px; min-height: 44px; }
    .topbar { gap: 4px; }
    .dashboard-grid, .action-grid, .detail-grid, .form-grid, .photo-pickers { grid-template-columns: minmax(0, 1fr); }
    .goal-options { gap: 10px; }
    .goal-option { padding: 12px; }
    .goal-option.selected { padding: 11px; }
    .card, .action-card { padding: 18px; }
    .profile-heading { align-items: flex-start; }
    .profile-photo { width: 64px; height: 64px; }
    .facts { grid-template-columns: minmax(85px, 1fr) 1.6fr; }
    fieldset { padding: 14px; }
    .alternative { flex-direction: column; gap: 4px; }
    .primary-nav a { font-size: 11px; }
}
@media (min-width: 1000px) {
    .primary-nav { position: sticky; bottom: 14px; margin-top: 24px; border: 1px solid #293540; border-radius: 18px; padding-bottom: 8px; }
    .primary-nav a { flex-direction: row; gap: 10px; max-width: none; font-size: 14px; }
    .app { padding-bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Public website. These selectors deliberately do not change the app shell,
   its fixed thumb navigation or equipment forms. The public header/footer
   explain the product; a separate, bounded account panel leads into /app.
   Flex wrapping and minmax(0,1fr) keep navigation and copy usable at 320px.
   ========================================================================== */
.public-site { min-height: 100dvh; display: flex; flex-direction: column; padding: 0 24px; }
.site-header, .public-main, .site-footer { width: 100%; max-width: 1160px; margin-left: auto; margin-right: auto; }
.site-header { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.site-header .brand { flex-shrink: 0; }
.site-nav { display: flex; flex: 1 1 260px; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.site-nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 12px; color: var(--muted); border-radius: 10px; }
.site-nav a.active { background: #153139; color: var(--cyan); }
.site-account-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.public-main { flex: 1; padding: 40px 0 64px; }
.public-main .lede { max-width: 760px; font-size: 1.1rem; }
.site-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 30px 0 44px; }
.site-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.08; letter-spacing: -.04em; }
.site-phone-preview { border: 1px solid #33737c; border-radius: 30px; background: linear-gradient(160deg, #17353e, #0b1118); padding: 30px 24px; box-shadow: 0 20px 70px #0005; }
.preview-machine { display: flex; gap: 14px; align-items: flex-start; background: #0c151c; border: 1px solid #29414b; border-radius: 16px; padding: 18px; margin: 14px 0; }
.preview-machine > span { font-size: 24px; color: var(--cyan); }
.preview-machine p { color: var(--muted); margin: 5px 0 0; font-size: 14px; }
.site-section { padding: 30px 0; }
.site-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.site-feature-grid .card { margin: 0; }
.site-callout { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border: 1px solid #2e6d76; border-radius: 20px; background: #10272e; margin-top: 20px; }
.site-callout > div { flex: 1; }
.site-callout > a { flex-shrink: 0; }
.text-link { display: inline-block; padding: 12px 0; }
.site-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: start; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer > p { grid-column: 1 / -1; margin: 0; }
.account-panel { max-width: 540px; margin: 10px auto 30px; }
.account-panel fieldset { padding: 18px; }
.social-signin { margin-top: 26px; }
.social-signin h2 { font-size: 1.05rem; }
.social-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 16px 0; }
.social-options form { margin: 0; }
.social-options button { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
/* Decorative local assets keep provider names as the accessible button labels
   and avoid third-party image requests/tracking on the account page. */
.provider-logo { width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; }
@media (max-width: 850px) {
    .site-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-hero { gap: 24px; }
}
@media (max-width: 640px) {
    .public-site { padding: 0 14px; }
    .site-header { gap: 12px; padding: 14px 0; }
    .site-nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 0; }
    .site-nav a { padding: 8px; font-size: 14px; }
    .site-account-nav { margin-left: auto; }
    .site-account-nav .button { padding: 10px 12px; font-size: 13px; }
    .public-main { padding-top: 28px; }
    .site-hero { grid-template-columns: minmax(0, 1fr); padding-top: 10px; }
    .site-phone-preview { width: 100%; max-width: 420px; margin: 0 auto; padding: 24px 18px; }
    .site-feature-grid, .site-footer { grid-template-columns: minmax(0, 1fr); }
    .site-callout { flex-direction: column; align-items: stretch; padding: 20px; }
    .account-panel fieldset { padding: 12px; }
}
