/* CryptoQuantAuto — shared stylesheet.
   Monochrome design matching the service-agreement screen:
   system font, flat #f7f8fa surface, #111 ink/primary, #e0e0e0 hairline borders,
   8px cards, green (#4caf50) success + amber (#f9a825) warning accents only. */

:root {
  /* surfaces */
  --bg: #f7f8fa;
  --surface: #fff;
  --soft: #fafafa;
  --soft-2: #f5f5f5;
  /* text */
  --fg: #222;        /* body */
  --ink: #111;       /* headings · primary actions */
  --ink-hover: #333;
  --muted: #888;     /* captions / meta */
  --muted-2: #666;   /* descriptions */
  --muted-3: #555;   /* secondary body / labels */
  /* lines */
  --line: #e0e0e0;
  --line-2: #ddd;
  /* semantic accents (the only colour in the system) */
  --ok: #4caf50;        --ok-bg: #e8f5e9;
  --err: #c0392b;
  --warn: #a86a00;
  --warn-bg: #fff8e1;   --warn-border: #ffe082; --warn-accent: #f9a825; --warn-fg: #5d4037;
  --badge-bg: #fff3e0;  --badge-fg: #e65100;
  /* shape */
  --radius: 8px;
  --radius-sm: 6px;
  /* widths */
  --maxw: 1040px;       /* landing + header/footer bar */
  --maxw-form: 760px;   /* onboard · console · agreement column */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* beats display:grid/flex on the element */

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
}
body {
  margin: 0; color: var(--fg); background: var(--bg);
  line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
app-header, app-footer { display: block; }
main { flex: 1 1 auto; width: 100%; }

/* ---------- header ---------- */
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
/* inner aligns to the landing container so the logo's left edge meets the page content */
.app-header-inner { max-width: var(--maxw); margin: 0 auto; padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; }
.app-header .brand { display: flex; align-items: center; }
.app-header .brand-logo { height: 30px; width: auto; display: block; }
.app-header nav a { margin-right: 1rem; text-decoration: none; color: var(--muted-2); font-size: .9rem; }
.app-header nav a:hover { color: var(--ink); }
.app-header .spacer { flex: 1; }
.app-header .user { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: var(--muted-2); }
.app-header .user button { padding: .35rem .75rem; font-size: .85rem; font-weight: 500; }

/* ---------- footer ---------- */
.app-footer { background: var(--surface); border-top: 1px solid var(--line); text-align: center;
  color: var(--muted); font-size: .8rem; padding: 1.5rem; }

/* ---------- layout ---------- */
.container { max-width: var(--maxw-form); margin: 2.5rem auto; padding: 0 1.25rem; }
.container:has(.landing) { max-width: var(--maxw); }   /* widen only the landing page */

h1 { font-size: 24px; font-weight: 700; color: var(--ink); margin: 0 0 1.25rem; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 .5rem; }
h3 { font-size: 14px; font-weight: 700; color: var(--muted-3); margin: 1.25rem 0 .4rem; }

/* ---------- card ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; margin: 16px 0; }
@media (max-width: 480px) { .card { padding: 20px; } }

/* ---------- form ---------- */
label { display: block; margin: .9rem 0 .25rem; font-size: 13.5px; font-weight: 500; color: var(--muted-3); }
input, select { display: block; width: 100%; max-width: 360px; padding: .6rem .7rem; margin-top: .3rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; color: var(--fg);
  background: var(--surface); font-family: inherit; transition: border-color .15s; }
input:focus, select:focus { outline: none; border-color: var(--ink); }

/* ---------- buttons ---------- */
button { padding: .6rem 1.1rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-hover); cursor: pointer; font-size: .95rem; font-weight: 600;
  font-family: inherit; transition: background .15s, border-color .15s; }
button:hover:not(:disabled) { background: var(--soft-2); border-color: #bbb; }
button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
button.primary:hover:not(:disabled) { background: var(--ink-hover); border-color: var(--ink-hover); }
button:disabled { opacity: .35; cursor: not-allowed; }

/* full-width primary (agreement "Confirm & Activate") */
.btn-primary { width: 100%; padding: 16px; background: var(--ink); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; letter-spacing: .02em;
  font-family: inherit; transition: background .15s, opacity .15s; }
.btn-primary:hover:not(:disabled) { background: var(--ink-hover); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; margin-top: .75rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.tbl th { color: var(--muted); font-weight: 600; }
.tbl td { color: var(--fg); }

/* ---------- status ---------- */
.status { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.status.error { color: var(--err); }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }

/* ======================= landing (/) ======================= */
.video-banner { width: 100%; border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2.5rem;
  border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.video-banner video { width: 100%; display: block; }

.landing { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
@media (max-width: 820px) { .landing { grid-template-columns: 1fr; gap: 2rem; } }

.landing-hero h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .6rem; }
.landing-hero h1 .accent { color: var(--ink); }   /* monochrome — no colour pop */
.landing-hero .lead { color: var(--muted-2); font-size: 1.05rem; margin: 0 0 2rem; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.features li { display: flex; gap: 1rem; align-items: flex-start; }
.features .ic { font-size: 1.4rem; line-height: 1.2; flex: 0 0 auto; filter: grayscale(1); }
.features li > div { display: flex; flex-direction: column; gap: .2rem; }
.features b { font-size: 1rem; color: var(--ink); }
.features li > div > span { color: var(--muted-2); font-size: .9rem; }

.landing-card .card { max-width: 400px; margin: 0 auto; }
.landing-card h2 { text-align: center; margin: 0 0 .4rem; }
.landing-card .sub { text-align: center; color: var(--muted-2); margin: 0 0 1.5rem; font-size: .92rem; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; width: 100%;
  padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; color: var(--ink-hover); cursor: pointer;
  transition: background .15s, border-color .15s; }
.google-btn:hover { background: var(--soft); border-color: #bbb; }
.terms { font-size: .8rem; color: var(--muted); text-align: center; margin: 1.25rem 0 0; }

/* ============= service-agreement components (shared) =============
   Reusable for the onboard agreement step. Mirrors signup-agreement.html. */

.page-header { text-align: center; margin-bottom: 36px; }
.page-header h1 { margin-bottom: 8px; }
.page-header p { font-size: 14px; color: var(--muted); }

/* step indicator */
.steps { display: flex; align-items: center; justify-content: center; margin-bottom: 36px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #aaa; }
.step.active { color: var(--ink); }
.step.done { color: var(--ok); }
.step-num { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
  color: #aaa; flex-shrink: 0; }
.step.active .step-num { border-color: var(--ink); background: var(--ink); color: #fff; }
.step.done .step-num { border-color: var(--ok); background: var(--ok); color: #fff; }
.step-line { width: 40px; height: 2px; background: var(--line-2); margin: 0 4px; }
@media (max-width: 480px) { .step-line { width: 24px; } }

/* card title + badge + description */
.card-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 600; background: var(--badge-bg); color: var(--badge-fg);
  padding: 2px 8px; border-radius: 10px; letter-spacing: .04em; }
.card-desc { font-size: 13.5px; color: var(--muted-2); margin-bottom: 20px; line-height: 1.6; }

/* scrollable terms box */
.terms-box { border: 1px solid var(--line); border-radius: 4px; height: 200px; overflow-y: auto;
  padding: 16px 20px; font-size: 13px; color: var(--muted-3); line-height: 1.7; background: var(--soft);
  margin-bottom: 16px; }
.terms-box h4 { font-size: 13px; font-weight: 700; color: var(--ink-hover); margin: 14px 0 6px; }
.terms-box h4:first-child { margin-top: 0; }
.terms-box ul { padding-left: 18px; margin-bottom: 8px; }
.terms-box ul li { margin-bottom: 4px; }

/* per-item confirmation rows */
.confirm-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.confirm-item { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s; }
.confirm-item:hover { border-color: #bbb; background: var(--soft); }
.confirm-item.checked { border-color: var(--ink); background: #f9f9f9; }
.confirm-item input[type="checkbox"] { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--ink); cursor: pointer; }
.confirm-item .ci-text { font-size: 14px; font-weight: 400; color: var(--ink-hover); line-height: 1.6; }
.confirm-item .ci-text strong { color: var(--ink); font-weight: 600; }
.confirm-item .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* warning callout */
.warning-box { background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn-accent); padding: 14px 18px; border-radius: 4px;
  font-size: 13px; color: var(--warn-fg); line-height: 1.6; margin-bottom: 20px; }
.warning-box strong { color: var(--badge-fg); }

/* progress */
.progress-text { font-size: 12px; color: var(--muted); text-align: right; margin-bottom: 8px; }
.progress-bar { height: 4px; background: var(--line); border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--ink); border-radius: 2px; transition: width .3s ease; }

/* agree-to-all + submit */
.all-agree { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 14px 16px;
  background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.all-agree input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; }
.all-agree .aa-text { font-size: 14px; font-weight: 600; color: var(--ink-hover); }

/* external TOS link */
.tos-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted-3);
  text-decoration: none; border-bottom: 1px solid #ccc; padding-bottom: 1px; margin-bottom: 16px; }
.tos-link:hover { color: var(--ink); border-color: var(--ink); }

/* success state */
.success-card { text-align: center; padding: 48px 32px; }
.success-icon { width: 56px; height: 56px; background: var(--ok-bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 24px; }
.success-card h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.success-card p { font-size: 14px; color: var(--muted-2); line-height: 1.6; }
