/* TrustPath join page. Plain CSS on the F-Secure design-system tokens (fs-ds-shadcn,
   as synced into the mockups' ds/ bundle), with the accessibility overrides the
   mockups documented (README "Upstream fixes for fs-ds-shadcn"):
   - input/outline strokes #7A8699 (3.69:1 on white; DS --input #E2E8F0 is 1.23:1)
   - focus: 2px solid --fs-blue-500 outline, offset 2 (6.8:1; DS ring is 1.96:1)
   - muted text on muted surfaces --fs-gray-600 (6.92:1; DS pair is 4.34:1)
   Light theme only, as in the mockups. No inline styles anywhere (strict CSP). */

@font-face { font-family: "Dazzed"; src: url("../fonts/Dazzed-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Dazzed"; src: url("../fonts/Dazzed-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Dazzed"; src: url("../fonts/Dazzed-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --fs-blue-50: #e6f2ff;
  --fs-blue-100: #dcebfe;
  --fs-blue-500: #003cff;
  --fs-blue-600: #0033db;
  --fs-gray-50: #f8fafc;
  --fs-gray-100: #f1f5f9;
  --fs-gray-200: #e2e8f0;
  --fs-gray-500: #64748b;
  --fs-gray-600: #475569;
  --fs-gray-700: #334155;
  --fs-gray-900: #0f172a;
  --fs-gray-950: #020617;
  --fs-error: #dc2626;
  --fs-success: #16a249;
  --fs-warning: #c88a04;

  --background: #fff;
  --foreground: var(--fs-gray-950);
  --primary: var(--fs-blue-500);
  --primary-hover: var(--fs-blue-600);
  --primary-foreground: var(--fs-gray-50);
  --muted: var(--fs-gray-100);
  --muted-foreground: var(--fs-gray-500);
  --border: var(--fs-gray-200);
  --destructive: var(--fs-error);
  --radius-md: .5rem;
  --radius-lg: .625rem;
  --font-sans: "Dazzed", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* accessibility overrides */
  --input: #7a8699;
  --tp-stroke: #7a8699;
  --tp-focus: var(--fs-blue-500);
  --tp-text-on-muted: var(--fs-gray-600);
  --tp-ok: #15803d;
  --tp-warn-bg: #fef3c7;
  --tp-warn-fg: #92400e;
  --tp-info-bg: var(--fs-blue-50);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ol, ul { margin: 0; }
img, svg { display: block; }
a { color: var(--primary); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--tp-focus); outline-offset: 2px; }
h1:focus, h1:focus-visible, .app:focus { outline: none; }
h1:focus-visible { outline: 2px solid var(--tp-focus); outline-offset: 4px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.join-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.join-head img { width: 26px; height: 26px; flex: none; }
.join-head .brand { font-weight: 600; font-size: 15px; flex: 1; }
.lang { display: flex; gap: 2px; }
.lang button {
  min-width: 44px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; font-size: 14px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--muted); font-weight: 600; }

/* ---------- layout ---------- */
.app { display: block; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 1060px; margin: 0 auto; padding: 24px 20px 40px; }
.layout.narrow { max-width: 600px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.tight { gap: 8px; }
.aside { background: var(--muted); border-radius: 16px; padding: 24px; align-self: start; display: flex; flex-direction: column; gap: 16px; color: var(--foreground); }
.aside .small, .aside .muted-text { color: var(--tp-text-on-muted); }
@media (min-width: 900px) {
  .layout.two { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; padding: 32px 40px 48px; }
  .layout.two > .stack { max-width: 560px; }
}

/* ---------- type ---------- */
.h1 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
@media (min-width: 900px) { .h1 { font-size: 30px; line-height: 38px; letter-spacing: -0.015em; } }
.h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
.h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
.body { font-size: 14px; line-height: 21px; }
.body-lg { font-size: 16px; line-height: 24px; }
.small { font-size: 13px; line-height: 19px; }
.muted-text { color: var(--fs-gray-700); }
.subtle { color: var(--tp-text-on-muted); }
.url { font-weight: 600; white-space: nowrap; }
.url.wrap { white-space: normal; word-break: break-all; }

/* ---------- pieces ---------- */
.badge { display: inline-flex; align-self: flex-start; align-items: center; border: 1px solid var(--tp-stroke); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; }
.icon { flex: none; }
.row { display: flex; align-items: flex-start; gap: 8px; }
.row.center { align-items: center; }

.callout { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-lg); padding: 12px; font-size: 14px; line-height: 20px; }
.callout .icon { margin-top: 2px; }
.callout.info { background: var(--tp-info-bg); color: var(--fs-gray-900); }
.callout.warn { background: var(--tp-warn-bg); color: var(--tp-warn-fg); }
.callout.safe { background: var(--fs-gray-100); color: var(--fs-gray-900); font-size: 13px; line-height: 19px; }
.callout .title { display: block; font-weight: 600; }

.panel { background: var(--muted); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.panel .subtle, .panel .small { color: var(--tp-text-on-muted); }
.notice { background: var(--muted); border-radius: var(--radius-lg); padding: 12px; font-size: 13px; line-height: 19px; color: var(--fs-gray-700); }
.notice a { color: var(--primary); }

.plate { width: 48px; height: 48px; flex: none; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: #e5ecff; color: var(--foreground); }
.plate.neutral { background: #eef0f3; }
.plate.warn { background: #faf1dc; }
.plate.ok { background: #dcf3e3; color: var(--tp-ok); border-radius: 999px; width: 40px; height: 40px; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 14px; font-weight: 500; }
.hint { font-size: 13px; line-height: 19px; color: var(--muted-foreground); }
.input {
  height: 46px; width: 100%; padding: 0 12px; font-size: 16px;
  border: 1px solid var(--input); border-radius: var(--radius-md); background: #fff;
}
.input:focus-visible { outline: 2px solid var(--tp-focus); outline-offset: 2px; }
.input[aria-invalid="true"] { border-color: var(--destructive); }
.input[readonly] { background: #fff; font-size: 14px; }
.error { color: var(--destructive); font-size: 14px; line-height: 20px; display: flex; gap: 8px; align-items: flex-start; }
.error .icon { margin-top: 2px; }
.echo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--fs-gray-700); min-height: 24px; }
.echo .icon { color: var(--tp-ok); }
.hint.stack p { margin: 0; }
/* Soft Gmail check (03-F / 04-F): a warning in place of the echo, never an error. */
.callout.soft { align-items: flex-start; }
.callout.soft .soft-yes { align-self: flex-start; background: #fff; }
.copy-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.copy-row .input { flex: 1 1 220px; height: 44px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
  text-align: center;
}
.btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.outline { background: #fff; color: var(--foreground); border-color: var(--tp-stroke); }
.btn.outline:hover { background: var(--fs-gray-50); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.start { align-self: flex-start; min-width: 200px; }
@media (max-width: 899px) { .btn.start { align-self: stretch; } }
.linkbtn {
  background: none; border: 0; padding: 2px 0; min-height: 24px; min-width: 24px; color: var(--primary);
  text-decoration: underline; text-underline-offset: 3px; font-size: inherit; cursor: pointer;
  display: inline-flex; gap: 4px; align-items: center;
}
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; min-width: 44px; padding: 6px 18px 6px 14px;
  border-radius: 12px; background: #0b0b0c; color: #fff; text-decoration: none; font-size: 12px; line-height: 1.15;
}
.store-btn b { display: block; font-size: 16px; font-weight: 600; }
.store-btn:focus-visible { outline-offset: 3px; }
.btn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps .num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
}
.steps .num.done { background: var(--tp-ok); }
.steps .step-body { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; min-width: 0; }
.steps .step-body > p { font-size: 14px; line-height: 21px; color: var(--fs-gray-700); }
.steps.compact .h3 { font-size: 15px; }

/* ---------- disclosure ---------- */
.details { border-top: 1px solid var(--border); padding-top: 12px; }
/* Help lists (03-G "Help with installing", 05-C Play failures): question, then the next action. */
.qa { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 0; font-size: 14px; line-height: 20px; }
.qa dt { font-weight: 600; }
.qa dd { margin: 0; color: var(--fs-gray-700); }
.details > summary {
  cursor: pointer; font-size: 15px; font-weight: 500; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none;
}
.details > summary::-webkit-details-marker { display: none; }
.details > summary .icon { transition: transform .15s; }
.details[open] > summary .icon { transform: rotate(180deg); }
.details .platform { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 8px; }
.details .platform + .platform { border-top: 1px dashed var(--border); }

/* ---------- QR ---------- */
.qr { background: #fff; padding: 0; border-radius: 4px; display: inline-block; line-height: 0; align-self: flex-start; }
.qr svg { width: 148px; height: 148px; }

/* ---------- status lines ---------- */
.status { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--tp-ok); font-weight: 500; min-height: 20px; }
.status .icon { margin-top: 2px; }
.loading { display: flex; align-items: center; gap: 12px; }
.spin { animation: spin 1s linear infinite; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.skeleton { display: flex; flex-direction: column; gap: 12px; }
.skeleton i { display: block; height: 14px; border-radius: 6px; background: var(--muted); }
.skeleton i:nth-child(1) { width: 60%; height: 28px; }
.skeleton i:nth-child(2) { width: 90%; }
.skeleton i:nth-child(3) { width: 80%; }
.skeleton i:nth-child(4) { width: 100%; height: 70px; }
.skeleton i:nth-child(5) { width: 100%; height: 46px; }
.noscript { max-width: 600px; margin: 32px auto; padding: 0 20px; }
.step-body > .store-btn, .panel > .linkbtn, .stack > .linkbtn { align-self: flex-start; }
.plate.small { width: 32px; height: 32px; }
ul.plain { list-style: none; padding: 0; }
