/* Visitor pages kit (UI builder 1, draft 18 Oct 2026; NOT loaded by any page yet; waits for the owner's OK on the
   mock-ups in Notes/Product/CLAUDE_RESEARCH/ui_redesign_18Oct2026/).
   Colours and fonts come from app.css unchanged: this file only adds one spacing scale, one type scale and the shared
   visitor layout. Token names match UI builder 2's ui.css (ui2_DESIGN_PLAN.md), so both sides use the same numbers.
   Everything is scoped under body.v-page, so loading this file changes nothing on a page that does not opt in. */

:root {
  /* spacing: one scale, nothing in between */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  /* type: Inter 400/500 only (app.css) */
  --t-body: 17px;                                  /* was 15 px; easier for older eyes */
  --t-small: 15px;                                 /* the smallest text on a visitor page */
  --t-h3: 20px; --t-h2: clamp(26px, 3vw, 34px); --t-h1: clamp(36px, 6vw, 60px);
  --t-title: 32px; --t-figure: 40px; --t-table: 16px;   /* app-shell pages (Trade Check, X-ray), as in ui.css */
  --tap: 48px;
  --radius: 14px; --radius-s: 10px;
  --measure: 64ch; --gutter: 20px; --page: 1120px;
}
@media (max-width: 520px) { :root { --t-title: 26px; --t-figure: 36px; } }
@media (max-width: 400px) { :root { --gutter: 16px; } }

body.v-page { font-size: var(--t-body); line-height: 1.6; }
/* resets carry no weight (:where), so every page's own spacing rules win over them */
:where(body.v-page h1), :where(body.v-page h2), :where(body.v-page h3) { font-weight: 500; margin: 0; line-height: 1.2; text-wrap: balance; }
:where(body.v-page p) { margin: 0; text-wrap: pretty; }
.v-page .v-wrap { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }   /* sides only: sections set their own top and bottom */
.v-page .v-muted { color: var(--text-2); }
.v-page .v-small { font-size: var(--t-small); }

/* buttons: the app's .button, made bigger on visitor pages; one primary per area */
.v-page .button { min-height: var(--tap); padding: 0 22px; border-radius: 12px; font-size: 16px; font-weight: 500; }
.v-page .button.big { min-height: 56px; padding: 0 28px; font-size: 17px; }
.v-page .button.quiet { border-color: transparent; background: transparent; color: var(--link); padding: 0 8px; }
.v-page .button.quiet:hover { background: var(--sel-bg); }
@media (max-width: 520px) { .v-page .v-go .button { width: 100%; justify-content: center; } }

/* form boxes: a visible border (--text-2 is 5.8:1 on white; the app's --control is 2.95:1, under WCAG 1.4.11's 3:1),
   52 px tall, 17 px text; the label goes above the box, never only inside it */
.v-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), .v-page select, .v-page textarea {
  min-height: 52px; border-color: var(--text-2); border-radius: 12px; font-size: 17px; }
.v-page input[type="checkbox"], .v-page input[type="radio"] { width: 24px; height: 24px; accent-color: var(--primary); }

/* top bar: logo, a few plain links, Sign in + Get started (or Open Arthvyuh) */
.v-top { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.v-top .v-wrap { display: flex; align-items: center; gap: var(--s4); min-height: 64px; }
.v-top nav { display: flex; gap: var(--s1); margin-left: var(--s6); }
.v-top nav a { color: var(--text-2); text-decoration: none; font-size: 16px; padding: 10px 12px; border-radius: var(--radius-s); }
.v-top nav a:hover { color: var(--text); background: var(--inset); }
.v-top nav a[aria-current] { color: var(--text); }
.v-top .v-acts { margin-left: auto; display: flex; gap: var(--s2); align-items: center; }
.v-top .v-menu { display: none; width: var(--tap); height: var(--tap); }
@media (max-width: 900px) {
  .v-top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--s2) var(--gutter); }
  .v-top nav.open { display: flex; }
  .v-top nav a { min-height: 44px; display: flex; align-items: center; }
  .v-top .v-menu { display: inline-flex; align-items: center; justify-content: center; }
  .v-top .v-acts .button:not(.primary):not(.v-menu) { display: none; }
  .v-top .v-acts .button { min-height: 44px; padding: 0 16px; font-size: 15px; }
}

/* page intro */
.v-intro { padding-block: var(--s7) var(--s6); }
.v-intro h1 { font-size: var(--t-h1); letter-spacing: -0.02em; line-height: 1.05; max-width: 20ch; }
.v-intro .v-lead { font-size: 20px; line-height: 1.5; color: var(--text-2); margin-top: var(--s4); max-width: 46ch; }
.v-crumb { font-size: var(--t-small); color: var(--text-2); margin-bottom: var(--s4); }
.v-crumb a { color: var(--text-2); }
@media (max-width: 900px) { .v-intro { padding-block: var(--s5); } .v-intro .v-lead { font-size: 18px; } }

/* one surface split by thin lines (instead of several floating cards) */
.v-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.v-pad { padding: var(--s6); }
@media (max-width: 900px) { .v-panel { border-radius: 16px; } .v-pad { padding: var(--s5); } }
.v-rows { list-style: none; margin: 0; padding: 0; }
.v-rows > li + li { border-top: 1px solid var(--border); }
.v-rows a { display: block; padding: var(--s4) var(--s5); color: var(--text); text-decoration: none; border-radius: 16px; min-height: 44px; }
.v-rows a:hover { background: var(--inset); }

/* a section: title (+ short text) on the left, details on the right; stacked on a phone */
.v-sec { padding-block: var(--s8); border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s7); align-items: start; }
.v-sec > :first-child h2 { font-size: var(--t-h2); letter-spacing: -0.015em; }
@media (max-width: 900px) { .v-sec { grid-template-columns: 1fr; gap: var(--s5); padding-block: var(--s7); } }

/* "What this means" */
.v-means { margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--inset); border-radius: 12px; }
.v-means b { display: block; font-size: var(--t-small); }

/* the still "Good to know" box (replaces the moving risk ticker) */
.v-know { border-left: 3px solid var(--primary-edge); padding: var(--s1) 0 var(--s1) var(--s4); }
.v-know h2 { font-size: var(--t-small); color: var(--text-2); font-weight: 500; margin-bottom: var(--s2); }
.v-know ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--t-small); }

/* numbered steps: only for real sequences (forms, how-to) */
.v-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); counter-reset: v-step; }
.v-steps > li { counter-increment: v-step; display: grid; grid-template-columns: 44px 1fr; align-items: start; }
.v-steps > li::before { content: counter(v-step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sel-bg); color: var(--sel-text); font-weight: 500; font-size: 15px; grid-row: span 2; }

/* questions: one panel with dividers and a chevron */
.v-faq details + details { border-top: 1px solid var(--border); }
.v-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  min-height: 60px; padding: var(--s3) var(--s5); font-weight: 500; }
.v-faq summary::-webkit-details-marker { display: none; }
.v-faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.v-faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.v-faq details p { padding: 0 var(--s5) var(--s5); color: var(--text-2); max-width: var(--measure); }
@media (max-width: 900px) { .v-faq summary { padding: var(--s3) var(--s4); } .v-faq details p { padding: 0 var(--s4) var(--s4); } }

/* reading pages (guides) */
.v-read p { font-size: 18px; line-height: 1.75; color: var(--text); max-width: 66ch; }
.v-read p + p { margin-top: var(--s4); }
@media (max-width: 900px) { .v-read p { font-size: 17px; } }

/* the only motion: feedback on what the person did (open, hover); none when reduced motion is asked for */
@media (prefers-reduced-motion: reduce) { .v-page *, .v-page *::before, .v-page *::after { transition: none !important; animation: none !important; } }

/* .v-top-row: the top bar for pages without a menu script; on phones its links show as a plain row under the logo,
   and the two-row bar scrolls away instead of covering the page */
.v-top-row .brand { margin: 0; font-size: 20px; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px) {
  .v-top.v-top-row { position: static; }
  .v-top-row .v-wrap { flex-wrap: wrap; row-gap: 0; padding-block: 6px; }
  .v-top.v-top-row nav { display: flex; position: static; order: 3; width: 100%; margin: 0; padding: 0; background: none; border: 0;
    flex-direction: row; flex-wrap: wrap; gap: 0 4px; }
  .v-top.v-top-row nav a { padding: 0 10px 0 0; min-height: 44px; font-size: 15px; }
}
/* names on one line, never a smaller font (product lead, 18 Oct 2026; measured): the four full names need about
   416 px, so below 430 px the phone row shows the short forms (Trade Check, X-ray, Reality, Learn; 302 px, fits 320;
   the full name stays as aria-label and title). Plans (only when pricing is on) needs 480 px; below that it is left
   out of the row and stays in every visitor footer ("All products and plans"). At 360 px or less the signed-in
   button reads "Open" (aria-label "Open Arthvyuh") so the menu button stays on screen. On small laptops
   (901-1023 px) the one-line desktop bar also uses the short forms, home included; full names from 1024 px. */
.v-top nav .v-name { white-space: nowrap; }
@media (max-width: 429px) { .v-top-row nav .v-long { display: none; } }
@media (min-width: 901px) and (max-width: 1023px) { .v-top nav .v-long { display: none; } }
@media (max-width: 479px) { .v-top-row nav .v-plans { display: none; } }
@media (max-width: 360px) { .v-top .v-xs-hide { display: none; } }

/* the small footer on Reality Check, Learn and product pages: 15 px, 44 px links */
.v-page .product-footer { font-size: var(--t-small); }
.v-page .product-footer nav a, .v-page .product-crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.v-page .product-crumb a { margin-block: -12px; }

/* Trade Check and Portfolio X-ray for a signed-out visitor (product lead, 19 Oct 2026: the chrome follows who you are): the page's own
   content inside the visitor frame (_visitor_tool.html), with the room the app's chat button needed taken away */
.v-tool-main { padding-block: var(--s6) var(--s7); }
body.v-page.v-tool .tc, body.v-page.v-tool .xr { padding-bottom: 0; }
@media (max-width: 900px) { .v-tool-main { padding-block: var(--s5) var(--s6); } }

/* "Sign in" on phones (product lead, 19 Oct 2026): a returning visitor reaches it without opening a menu where the row allows it.
   Pages with the link row, 361 to 900 px: a 44 px text link beside Get started. At 360 px or less it is the last link of the row
   (the row may wrap; text stays 15 px or more). Home keeps its Menu: Sign in sits beside Get started from 420 px, and in the Menu list below that. */
.v-top .v-nav-signin { display: none; }
@media (max-width: 900px) {
  .v-top .v-nav-signin { display: flex; }                                        /* last item of the home Menu list / of the link row */
  .v-top-row nav .v-nav-signin { color: var(--link); font-weight: 500; }
}
@media (min-width: 361px) and (max-width: 900px) {
  .v-top-row nav .v-nav-signin { display: none; }
  .v-top.v-top-row .v-acts .button:not(.primary):not(.v-menu) { display: inline-flex; align-items: center; background: transparent; border-color: transparent; color: var(--link); padding: 0 8px; }
}
@media (min-width: 420px) and (max-width: 900px) {
  .v-top.lp-nav nav .v-nav-signin { display: none; }
  .v-top .lp-cta .button:not(.primary):not(.v-menu) { display: inline-flex; align-items: center; background: transparent; border-color: transparent; color: var(--link); padding: 0 8px; }
}

/* a short visitor page on a tall screen (1440 x 900, 1920 x 1080): the small footer sits at the bottom of the screen instead of
   halfway up with an empty band below it (widescreen check, 19 Oct 2026) */
body.v-page.v-tool, body.v-page.product-page { min-height: 100vh; display: flex; flex-direction: column; }
body.v-page.v-tool > main, body.v-page.product-page > main { flex: 1 0 auto; }
body.v-page.v-tool > main { width: 100%; }                  /* the tool frame's main is a centred column: keep it full width in the flex column */
body.v-page.v-tool > footer, body.v-page.product-page > footer { flex: none; }

/* inline links in running text (Tester A's release-43 preview: 19-30 px tall on a phone): a 44 px tap area without moving a single line.
   Vertical padding on an inline box adds to its tap area and its box height but never to the line height (WCAG 2.5.8). Buttons and the
   links that are already blocks or have their own minimum height are left alone. */
@media (pointer: coarse), (max-width: 900px) {
  body.v-page p a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page dd a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page td a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page label a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page small a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page figcaption a:not(.button):not(.link-button):not(.v-nav-signin) { padding-block: 14px; }
  /* links that are already inline-flex with their own 44 px minimum (app.css touch rules) keep their own size */
  body.v-page .help-line a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page .legal-line a:not(.button):not(.link-button):not(.v-nav-signin),
  body.v-page .tc-costs-link a:not(.button):not(.link-button):not(.v-nav-signin) { padding-block: 0; }
}
