/* The public landing page (W1.4): one stylesheet for index.html (English) and ja/index.html (Japanese), which
   scripts/build_site.py renders from app/i18n.py's landing.* texts. Built from the v2 boards landing_desktop (1440),
   landing_tablet (834) and landing_mobile (390): one layout, breakpoints at 960px (the menu button, tighter sections)
   and 640px (phone). No script, no inline style, nothing from another host, so the site's Content-Security-Policy
   can be default-src 'none' with style-src, img-src and font-src 'self' (tests/test_site.py).
   Written by hand. The colours named after app/brand.py's tokens must equal them (tests/test_site.py); the others
   are the landing boards' own, each equal to a token too (BRAND-NAVY Q-B5). The font: the page's own BIZ UDPGothic (W1.4-ii), woff2 subsets of only the page's
   characters in fonts/ (fonts/SOURCE.txt), declared below as "BIZUDPGothic"; a character they lack falls to the
   visitor's own BIZ UDPGothic, if the system has it, then to the system's Japanese sans-serif. font-display: swap
   shows the text in the next font of the list until the page's own has loaded. */

:root {
  /* app/brand.py's tokens, same values */
  --petrol: #1B365D;          /* PETROL */
  --petrol-hover: #12274A;    /* PETROL_HOVER */
  --ink: #1C2129;             /* INK */
  --mist: #ECF0F5;            /* MIST */
  --light-petrol: #D2B46E;    /* LIGHT_PETROL */
  --surface: #FFFFFF;         /* SURFACE */
  --muted: #525C69;           /* MUTED */
  --text-secondary: #353D48;  /* TEXT_SECONDARY */
  --border: #E0E4EA;          /* BORDER */
  --border-strong: #D0D6DF;   /* BORDER_STRONG */
  --divider: #EBEEF2;         /* DIVIDER */
  --input-border: #76828F;    /* INPUT_BORDER: a control a visitor finds by its border keeps 3:1 (Bash's Q-C1) */
  --positive: #13714F;        /* POSITIVE */
  --error: #A8402A;           /* ERROR */
  --code-bg: #F1F3F6;         /* CODE_BG */
  /* the landing boards' own, each set to the token named beside it (BRAND-NAVY Q-B5, tests/test_site.py) */
  --paper: #F6F7F9;  /* SUBTLE */
  --text-2: #353D48;  /* TEXT_SECONDARY */
  --line: #E0E4EA;  /* BORDER */
  --mock-line: #D0D6DF;  /* BORDER_STRONG */
  --dark-line: #353D48;  /* TEXT_SECONDARY */
  --dark-card: #12274A;  /* PETROL_HOVER */
  --dark-text: #D0D6DF;  /* BORDER_STRONG */
  --dark-text-2: #ECF0F5;  /* MIST */
  --bar: #B7C5D8;  /* CHART_SEQUENTIAL[2] */
  --font: "BIZUDPGothic", "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "BIZUDPGothic";
  src: url(fonts/BIZUDPGothic-Regular.landing.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BIZUDPGothic";
  src: url(fonts/BIZUDPGothic-Bold.landing.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  /* BIZ UDPGothic's own "normal" line height is 1.0 (Hiragino Sans's 1.5, the one the layout was checked with in
     W1.4-i), so a wrapped line with no line-height of its own would touch the next (W1.4-ii's live check, 390). */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; line-break: strict; }
:lang(ja) p, :lang(ja) li, :lang(ja) .step-body, :lang(ja) .sec-body { line-break: strict; }
/* The Japanese lead texts break between phrases, not inside a word, and keep their last line from being a lone 「ます。」
   (§15, "The landing page's Japanese breaks lines inside words"). Not the long body texts (steps, traits, cards, the AI
   note): phrase breaks there leave ragged short lines at phone width. Only where auto-phrase exists (Chromium; checked
   in Chrome): a browser without it (WebKit 27.2 measured; Firefox not checked) gets none of this rule, because
   text-wrap: pretty alone moved the breaks of WebKit with an iPhone profile into more words (サンプ|ル, 数|字, 御|社:
   DP-3b's WebKit check); such a browser gets the keep-all rule below instead. The mock's Ask placeholder wraps
   (below), so it is phrase-wrapped too. */
@supports (word-break: auto-phrase) {
  :lang(ja) .eyebrow, :lang(ja) .hero-sub, :lang(ja) .sec-head p, :lang(ja) .feat-text > p, :lang(ja) .demo p, :lang(ja) .ask-bar span { word-break: auto-phrase; text-wrap: pretty; }
}
/* In a browser without auto-phrase (Safari: WebKit 27.2 measured), the same Japanese texts and the headings break only
   at their phrase marks: app/i18n.py marks every phrase boundary with "|", which scripts/build_site.py renders as
   <wbr> (DP-3c; §15 row "The landing page's Japanese breaks lines inside words", its Safari half). keep-all stops
   breaks between two Japanese letters, so the marks decide where a line may end, besides spaces and punctuation; a run
   wider than its line is still broken anywhere (overflow-wrap: break-word), which is why every boundary is marked. */
@supports not (word-break: auto-phrase) {
  :lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .eyebrow, :lang(ja) .hero-sub, :lang(ja) .sec-head p, :lang(ja) .feat-text > p, :lang(ja) .demo p, :lang(ja) .ask-bar span { word-break: keep-all; }
}
/* Two phrases joined with "~" in app/i18n.py (such as 「業務について」) never break apart, in every browser: Chrome's
   auto-phrase would break 「業務に | ついて」 (DP-3c, Bash's Q4 answer to the line-break read). */
.nb { white-space: nowrap; }
a { color: var(--petrol); }
a:hover { color: var(--petrol-hover); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--light-petrol); outline-offset: 2px; border-radius: 8px; }
img, svg { display: block; }
h1, h2, h3, p, ol, ul { margin: 0; }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); text-decoration: none; font-size: 14px; }
.skip:focus { top: 12px; color: var(--surface); }

.wrap { max-width: 1180px; margin: 0 auto; }

/* ------------------------------------------------------------------ nav */
.nav { position: relative; border-bottom: 1px solid var(--line); }
.nav-row { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.wordmark { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink); }
.wordmark .iq { color: var(--petrol); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: 14px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; }
.nav-links a:hover { color: var(--petrol); }
.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.lang { display: flex; border: 1px solid var(--input-border); border-radius: 999px; padding: 3px; }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; min-width: 44px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.lang a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; }
.btn-primary { background: var(--petrol); color: var(--surface); }
.btn-primary:hover { background: var(--petrol-hover); color: var(--surface); }
.btn-quiet { padding: 0 14px; color: var(--ink); font-weight: 400; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 17px; }
.link-lg { display: inline-flex; align-items: center; min-height: 52px; font-size: 17px; text-decoration: none; }

/* The menu below desktop width: a <details> disclosure, no script. The summary sits in the nav row's right corner;
   the panel opens in the flow under the row, as on the boards. */
.menu { display: none; }
.menu > summary {
  position: absolute; top: 12px; right: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--surface); color: var(--ink);
  cursor: pointer; list-style: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::marker { content: ""; }
.menu .icon-close { display: none; }
.menu[open] .icon-open { display: none; }
.menu[open] .icon-close { display: block; }
.menu-panel { border-top: 1px solid var(--line); padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.menu-panel > a.menu-link { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--divider); color: var(--ink); font-size: 17px; text-decoration: none; }
.menu-lang { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.menu-lang > span { font-size: 14px; color: var(--muted); }
.menu-panel .btn { min-height: 52px; font-size: 16px; }
.menu-panel .btn-primary { margin-top: 8px; }
.menu-panel .btn-outline { border: 1px solid var(--input-border); color: var(--ink); font-weight: 400; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 96px 20px 0; text-align: center; }
.hero-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.eyebrow { font-size: 14px; letter-spacing: 0.06em; color: var(--petrol); font-weight: 700; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.14; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
:lang(ja) .hero h1 { letter-spacing: 0; line-height: 1.25; }
.hero-sub { max-width: 680px; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.7; color: var(--text-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; }
.hero .cta { margin-top: 6px; }

/* the product mock (an illustration with sample data) */
.mockwrap { max-width: 1080px; margin: 72px auto 0; border-radius: 22px 22px 0 0; background: linear-gradient(var(--mist), var(--surface)); padding: 28px 28px 0; }
.mock { border-radius: 14px 14px 0 0; background: var(--surface); border: 1px solid var(--mock-line); border-bottom: none; box-shadow: 0 30px 60px -30px rgba(15, 36, 48, 0.28); overflow: hidden; text-align: left; }
/* When the address and the sample-data pill do not fit on one line (a phone), the pill goes to a second line and the
   address shows whole (§15, "Since W1.4-copy the landing mock's address is cut short at phone width"); neither is
   ever hidden. */
.mock-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; row-gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mock-bar > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* the address on one line; the ellipsis only where a line cannot hold it */
.tag { padding: 3px 10px; border-radius: 999px; background: var(--mist); color: var(--petrol); font-weight: 700; white-space: nowrap; }
.mock-body { display: flex; flex-wrap: wrap; }
.mock-side { flex: 1 1 180px; max-width: 220px; padding: 22px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mock-side > div { padding: 9px 12px; color: var(--muted); }
.mock-side > .on { border-radius: 8px; background: var(--mist); color: var(--petrol); font-weight: 700; }
.mock-main { flex: 999 1 300px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.tile, .chart { border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.tile-label, .chart-label { font-size: 12px; color: var(--muted); }
.chart-label { margin-bottom: 10px; }
.tile-value { font-size: 22px; font-weight: 700; margin-top: 6px; white-space: nowrap; }  /* a figure never breaks */
.tile-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tile-note.up { color: var(--positive); }
.tile-note.alert { color: var(--error); }
.chart svg { width: 100%; height: 120px; }
.chart .bars { fill: var(--bar); }
.chart .now { fill: var(--petrol); }
.ask-bar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 16px; font-size: 14px; color: var(--muted); }
.ask-bar svg { flex: none; color: var(--petrol); }
/* The placeholder wraps where the bar is too narrow for it (a phone), whole in both languages, rather than being cut
   with an ellipsis (§15, "The landing mock's Ask placeholder is cut short at phone width"; DP-3c, Bash's Q5 (a)). */
.ask-bar span { min-width: 0; }

/* ------------------------------------------------------------------ sections */
.sec { padding: 110px 20px; }
.sec-head { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.sec-head h2 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.2; font-weight: 700; text-wrap: balance; }
.sec-head p { font-size: 1.15rem; line-height: 1.7; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: 48px; }

/* how it works: six steps, 6 → 4+2 → 1 across */
.how { background: var(--paper); border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; }
.step { border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--mist); color: var(--petrol); }
.step-num { font-size: 12px; color: var(--muted); }
.step-title { font-size: 19px; font-weight: 700; }
.step-body { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.step.ai { border: 2px solid var(--petrol); padding: 19px; }
.step.ai .step-icon { background: var(--petrol); color: var(--surface); }
.ai-tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--surface); background: var(--petrol); border-radius: 999px; padding: 4px 10px; }

/* features: two-column rows that stack */
.feats { padding: 120px 20px; display: flex; flex-direction: column; gap: 120px; }
.feat { max-width: 1180px; width: 100%; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; }
.feat.reverse { flex-wrap: wrap-reverse; }
.feat > * { flex: 1 1 380px; min-width: 0; }
.feat-text { display: flex; flex-direction: column; gap: 18px; }
.feat-text h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.18; font-weight: 700; text-wrap: balance; }
.feat-text > p { font-size: 1.1rem; line-height: 1.75; color: var(--text-2); max-width: 480px; }
.traits { list-style: none; margin-top: 8px; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.traits li { display: flex; gap: 14px; align-items: flex-start; }
.traits svg { flex: none; margin-top: 2px; color: var(--petrol); }
.trait-title { font-size: 16px; font-weight: 700; }
.trait-body { font-size: 15px; line-height: 1.65; color: var(--text-2); }

.panel { padding: 40px 28px; border-radius: 28px; display: flex; justify-content: center; }
.panel.dark { background: var(--ink); flex-direction: column; align-items: center; }
.panel.tint { background: var(--mist); }

.trace { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.trace-figure { width: 100%; border-radius: 16px; background: var(--surface); padding: 20px 22px; }
.trace-label { font-size: 12px; color: var(--muted); }
.trace-value { font-size: 30px; font-weight: 700; margin-top: 4px; }
.trace-stem { width: 2px; height: 30px; background: var(--light-petrol); }
.trace-srcs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 2px solid var(--light-petrol); padding-top: 18px; }
.trace-srcs > div { border-radius: 10px; background: var(--dark-card); color: var(--dark-text-2); padding: 12px 6px; text-align: center; font-size: 12px; line-height: 1.5; }
.trace-srcs span { display: block; }

.chat { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.bubble-q { align-self: flex-end; max-width: 85%; border-radius: 18px 18px 4px 18px; background: var(--petrol); color: var(--surface); padding: 14px 16px; font-size: 15px; line-height: 1.6; }
.bubble-a { align-self: flex-start; max-width: 92%; border-radius: 18px 18px 18px 4px; background: var(--surface); padding: 16px 18px; font-size: 15px; line-height: 1.7; box-shadow: 0 10px 30px -18px rgba(15, 36, 48, 0.4); }
.chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.chips li { font-size: 12px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; color: var(--petrol); }
.calc { margin-top: 12px; border-radius: 10px; background: var(--code-bg); padding: 10px 12px; }
.calc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.calc-name { margin-top: 4px; font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.calc-note { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* security: trust cards 4 → 3+1 → 1, then the AI note */
.security { background: var(--ink); color: var(--surface); }
.security .sec-head p { color: var(--dark-text); max-width: 620px; font-size: 1.1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; list-style: none; padding: 0; }
.card { border: 1px solid var(--dark-line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card svg { color: var(--light-petrol); }
.card-title { font-size: 18px; font-weight: 700; }
.sec-body { font-size: 14px; line-height: 1.65; color: var(--dark-text); }

.ai-note { border: 1px solid var(--dark-line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 12px; max-width: 880px; width: 100%; margin: 0 auto; }
.ai-note h3 { font-size: 18px; font-weight: 700; }
.ai-note p { font-size: 14px; line-height: 1.8; color: var(--dark-text); }
.ai-note sup a { color: var(--light-petrol); text-decoration: none; padding: 0 2px; }
.ai-note ol { padding-left: 1.6em; font-size: 13px; line-height: 1.7; color: var(--dark-text); display: flex; flex-direction: column; gap: 4px; }

/* demo request */
.demo { padding: 120px 20px; text-align: center; }
.demo-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.demo-inner img { width: 64px; height: 64px; }
.demo h2 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; font-weight: 700; text-wrap: balance; }
.demo p { font-size: 1.1rem; line-height: 1.75; color: var(--text-2); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 32px 20px; }
.footer-row { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.footer-brand .wordmark { font-size: 15px; }
.reading { letter-spacing: 0.2em; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }

/* ------------------------------------------------------------------ tablet and below (board: landing_tablet, 834) */
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .nav-row { min-height: 68px; }
  .menu { display: block; }
  .feat > * { flex-basis: 300px; }
  .tile-value { font-size: 18px; }
  .feat { gap: 40px; }
  .feats { gap: 96px; }
  .sec, .feats, .demo { padding-top: 88px; padding-bottom: 88px; }
}

/* ------------------------------------------------------------------ phone (board: landing_mobile, 390) */
@media (max-width: 640px) {
  .hero { padding-top: 52px; text-align: left; }
  .hero-inner { align-items: flex-start; }
  .sec, .feats, .demo { padding-top: 64px; padding-bottom: 64px; }
  .feats { gap: 72px; }
  .feat { gap: 28px; }
  .feat > * { flex-basis: 100%; }
  .mock-side { display: none; }
  .mockwrap { padding: 12px 12px 0; margin-top: 44px; border-radius: 16px 16px 0 0; }
  .mock-main { padding: 14px; }
  .cta { flex-direction: column; align-items: stretch; width: 100%; }
  .cta a { justify-content: center; }
  .sec-head, .demo, .demo-inner { text-align: left; align-items: flex-start; }
  .panel { padding: 28px 16px; border-radius: 22px; }
  .steps, .cards { grid-template-columns: 1fr; }
  .ai-note { padding: 22px 18px; }
}

/* TP-4+5: the privacy notice's shell (scripts/build_site.py::render_privacy). Q8 (a) (Bash, REVIEW_CHAT_ANSWERS.md
   line 389): its body uses the system fonts, since the landing subsets hold only the landing pages' characters; its
   header and footer keep the page font (their characters are checked, build_site.py::page_characters) */
.doc { max-width: 46rem; margin: 0 auto; padding: 40px 16px 56px;
       font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, -apple-system,
                    "Segoe UI", sans-serif; }
.doc h1 { margin: 0 0 16px; }
.doc h2 { margin: 32px 0 8px; font-size: 20px; }
.doc-draft { color: var(--muted); }
/* the notice has no menu: its language switch stays in the header at every width (the landing page's moves into its
   menu below 960 px) */
@media (max-width: 960px) { .nav .doc-lang { display: flex; } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
