:root {
  color-scheme: light;
  --canvas: #f7f8f5;
  --paper: #ffffff;
  --paper-soft: #fbfcfa;
  --ink: #202d29;
  --ink-2: #485953;
  --muted: #76847e;
  --faint: #68766e;
  --line: #e7ebe6;
  --line-strong: #d5ddd6;
  --green: #246c54;
  --green-strong: #17583f;
  --green-soft: #eef5ef;
  --mint: #c9e0d1;
  --amber: #8f5c20;
  --amber-soft: #fff6e9;
  --red: #a04e43;
  --shadow: 0 20px 55px rgba(35, 57, 46, .065), 0 2px 8px rgba(35, 57, 46, .035);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--canvas);
  color: var(--ink);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111916;
  --paper: #18221e;
  --paper-soft: #1c2823;
  --ink: #e8eee9;
  --ink-2: #c2cdc5;
  --muted: #a0aea5;
  --faint: #7e8e84;
  --line: #2e3a33;
  --line-strong: #405047;
  --green: #83c1a0;
  --green-strong: #a1d8b7;
  --green-soft: #24372d;
  --mint: #335642;
  --amber: #e6b46f;
  --amber-soft: #392f20;
  --red: #e29485;
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: inherit; }
.skip-link, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { z-index: 50; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 12px 16px; margin: 0; border-radius: 10px; color: var(--green-strong); background: var(--paper); box-shadow: var(--shadow); }
.app-shell { overflow: clip; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; width: min(100% - 64px, 1240px); margin: 0 auto; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { flex: 0 0 auto; display: block; width: 38px; height: 38px; border-radius: 12px; }
.brand-name { font-size: 14px; font-weight: 780; letter-spacing: .01em; }
.brand-edition { margin-left: 2px; padding-left: 12px; border-left: 1px solid var(--line-strong); color: var(--faint); font-size: 10px; font-weight: 760; letter-spacing: .13em; }
.topbar-actions { display: flex; align-items: center; gap: 25px; }
.header-link { color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.header-link:hover, .site-footer a:hover { color: var(--green); }
.theme-toggle { min-height: 35px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); background: var(--paper); font-size: 12px; cursor: pointer; }
.theme-toggle:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 38%, transparent); outline-offset: 3px; }
main { width: min(100% - 64px, 1240px); margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(250px, .58fr); align-items: center; gap: 72px; padding: 66px 3.4% 48px; }
.eyebrow, .panel-kicker { color: var(--green); font-size: 11px; font-weight: 790; letter-spacing: .16em; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 22px; height: 1px; background: #8caf98; }
h1 { max-width: 690px; margin: 20px 0 15px; font-size: clamp(38px, 5vw, 57px); font-weight: 740; line-height: 1.3; letter-spacing: -.065em; }
h1 em { color: var(--green); font-style: normal; }
.hero-description { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.95; letter-spacing: .01em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 16px 23px; margin-top: 24px; }
.meta-item { color: var(--muted); font-size: 12px; }
.meta-check { margin-right: 6px; color: var(--green); font-weight: 800; }
.hero-note { position: relative; padding: 23px 23px 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: 0 9px 28px rgba(35, 57, 46, .04); }
.hero-note-index, .rail-card-label { color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.hero-note p { margin: 19px 0 16px; color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.hero-note strong { color: var(--green-strong); font-weight: 750; }
.hero-note-rule { display: block; width: 31px; height: 2px; margin: 0 0 14px; background: var(--green); }
.hero-note small { color: var(--muted); font-size: 11px; line-height: 1.8; }
.notice-strip { min-height: 53px; display: flex; align-items: center; gap: 11px; margin: 0 0 18px; padding: 11px 15px; border: 1px solid #e8dcc5; border-radius: 10px; color: #66583f; background: #fffaf0; }
html[data-theme="dark"] .notice-strip { border-color: #594b35; color: #e0d2b9; background: #30291e; }
.notice-icon { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.notice-strip p { flex: 1; margin: 0; font-size: 12px; line-height: 1.7; }
.notice-strip strong { font-weight: 780; }
.usage-counter { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #eadbc2; border-radius: 999px; color: #82683b; background: rgba(255,255,255,.55); font-size: 10px; font-variant-numeric: tabular-nums; }
.workspace-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); align-items: start; gap: 18px; }
.tool-rail { position: sticky; top: 20px; padding: 15px 0; }
.rail-heading { margin: 0 12px 12px; color: var(--faint); font-size: 10px; font-weight: 790; letter-spacing: .16em; }
.tool-nav { display: grid; gap: 5px; }
.tool-tab { position: relative; width: 100%; min-height: 47px; display: grid; grid-template-columns: 27px 1fr 14px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-size: 13px; font-weight: 650; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.tool-tab:hover { color: var(--ink); background: var(--paper-soft); }
.tool-tab.is-active { border-color: #dbe8dd; color: var(--green-strong); background: var(--paper); box-shadow: 0 3px 10px rgba(28, 78, 54, .035); }
html[data-theme="dark"] .tool-tab.is-active { border-color: var(--line-strong); }
.nav-index { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.tool-tab.is-active .nav-index { color: var(--green); }
.nav-arrow { opacity: 0; color: var(--green); font-size: 13px; transition: opacity .14s ease; }
.tool-tab.is-active .nav-arrow, .tool-tab:hover .nav-arrow { opacity: 1; }
.rail-card { margin-top: 28px; padding: 15px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-soft); }
.rail-card p { margin: 9px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.rail-card a { color: var(--green); font-size: 11px; font-weight: 700; text-decoration: none; }
.work-area { min-width: 0; }
.tool-panel { min-width: 0; padding: 27px clamp(18px, 3vw, 38px) 30px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: var(--shadow); animation: panel-in .24s ease both; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 6px 0 5px; font-size: 22px; font-weight: 760; letter-spacing: -.04em; }
.panel-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.panel-kicker { display: block; font-size: 10px; letter-spacing: .14em; }
.step-chip, .panel-mark { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--paper-soft); font-size: 10px; font-weight: 700; }
.panel-mark { color: var(--faint); font-size: 9px; letter-spacing: .11em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #c09144; box-shadow: 0 0 0 3px rgba(192, 145, 68, .12); }
.form-stack { max-width: 790px; margin: 0 auto; }
.compact-form { padding-bottom: 4px; }
.field-group { margin-bottom: 18px; }
.field-group > label, .field-label-row label, .company-fields > label { color: var(--ink-2); font-size: 13px; font-weight: 740; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.field-group > label { display: block; margin-bottom: 8px; }
.required-chip, .optional-chip { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 5px; color: var(--muted); background: var(--paper-soft); font-size: 10px; font-weight: 630; }
.optional-chip { border: 1px solid var(--line); }
.field-hint, .count-label { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.field-control { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; color: var(--ink); background: var(--paper); font-size: 14px; line-height: 1.8; transition: border-color .16s ease, box-shadow .16s ease; }
textarea.field-control { display: block; resize: vertical; }
.question-input { min-height: 70px; }
.source-input { min-height: 166px; }
.field-control::placeholder, .improved-textarea::placeholder { color: var(--faint); opacity: 1; }
.field-control:focus, .improved-textarea:focus { border-color: #78a78b; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent); }
.field-assist { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--faint); font-size: 10px; line-height: 1.5; }
.company-details { margin: 0 0 19px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-soft); }
.company-details summary { min-height: 55px; display: flex; align-items: center; gap: 9px; padding: 9px 12px; list-style: none; cursor: pointer; }
.company-details summary::-webkit-details-marker { display: none; }
.company-summary-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 13px; }
.company-details[open] .company-summary-icon { transform: rotate(45deg); }
.company-details summary strong, .company-details summary small { display: block; }
.company-details summary strong { color: var(--ink-2); font-size: 12px; font-weight: 730; }
.company-details summary small { margin-top: 2px; color: var(--faint); font-size: 10px; }
.details-chevron { margin-left: auto; color: var(--muted); font-size: 13px; }
.company-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 2px 12px 13px; }
.company-fields > label { display: grid; gap: 6px; font-size: 11px; }
.company-fields > label:last-child { grid-column: 1 / -1; }
.company-fields .field-control { min-height: 38px; padding: 8px 10px; font-size: 12px; }
.target-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-soft); }
.target-copy label { color: var(--ink-2); font-size: 12px; font-weight: 740; }
.target-copy p { margin: 4px 0 0; color: var(--faint); font-size: 10px; }
.target-control { display: flex; align-items: center; gap: 8px; }
.target-control input { width: 76px; min-height: 35px; padding: 4px 9px; text-align: right; font-weight: 700; }
.target-control span { color: var(--muted); font-size: 11px; }
.consent-row { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 8px; margin: 15px 0 3px; }
.consent-row input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--green); }
.consent-row label { color: var(--muted); font-size: 11px; line-height: 1.7; cursor: pointer; }
.primary-button { position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 17px; padding: 0 42px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font-size: 13px; font-weight: 760; letter-spacing: .025em; cursor: pointer; box-shadow: 0 6px 14px rgba(36, 108, 84, .15); transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--green-strong); box-shadow: 0 9px 18px rgba(36, 108, 84, .19); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { cursor: not-allowed; color: var(--faint); background: var(--line); box-shadow: none; }
.button-sparkle { color: #d7efdd; font-size: 16px; }
.button-arrow { position: absolute; right: 16px; opacity: .76; font-size: 15px; }
.form-note { min-height: 28px; margin: 9px 2px 0; color: var(--faint); font-size: 11px; line-height: 1.7; text-align: center; }
.form-note[data-state="error"] { color: var(--red); font-weight: 650; }
.form-note[data-state="success"] { color: var(--green); }
.form-note[data-state="loading"] { color: var(--ink-2); }
.turnstile-slot { margin: 14px 0 0; }
.transfer-button { display: inline-block; margin: -4px 0 12px; }
.inline-note { margin: -5px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.text-button { padding: 6px 0; border: 0; color: var(--green); background: transparent; font-size: 11px; font-weight: 720; cursor: pointer; }
.text-button:hover { color: var(--green-strong); text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--red); }
.result-panel, .variant-results, .tool-results { margin: 24px 0 0; padding: 23px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-soft); animation: panel-in .24s ease both; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.result-heading h3 { margin: 5px 0 0; font-size: 17px; }
.result-mode { padding: 5px 8px; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 740; }
.score-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.score-card { min-width: 0; padding: 11px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.score-card h4 { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 660; }
.score-value { color: var(--green); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.score-value small { color: var(--faint); font-size: 10px; font-weight: 500; }
.score-card p { margin: 5px 0 0; color: var(--ink-2); font-size: 10px; line-height: 1.6; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.compare-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.compare-card header { min-height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.compare-card header span:last-child { color: var(--green); font-size: 11px; letter-spacing: 0; }
.compare-card h4 { margin: 11px 12px 0; color: var(--ink-2); font-size: 11px; }
.compare-text { min-height: 125px; margin: 0; padding: 9px 12px 13px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.9; }
.improved-textarea { width: 100%; min-height: 140px; display: block; padding: 9px 12px 3px; border: 0; outline: none; color: var(--ink-2); background: transparent; resize: vertical; font-size: 12px; line-height: 1.9; }
.length-state { min-height: 18px; margin: 0; padding: 3px 12px 8px; color: var(--muted); font-size: 10px; }
.length-state.is-over { color: var(--red); font-weight: 700; }
.reason-block { margin-top: 15px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.reason-block h4 { margin: 0 0 8px; font-size: 12px; }
.reason-block ol { display: grid; gap: 7px; margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 11px; line-height: 1.7; }
.reason-block li::marker { color: var(--green); font-weight: 800; }
.result-notice { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 13px 0 0; }
.secondary-button { min-height: 35px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-2); background: var(--paper); font-size: 11px; font-weight: 690; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.secondary-button:hover:not(:disabled) { border-color: #99b9a2; background: var(--green-soft); }
.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.result-actions .text-button { margin-left: auto; }
.voice-check { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.voice-check h4 { margin: 4px 0; font-size: 12px; }
.voice-check p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.voice-result { grid-column: 1 / -1; display: grid; gap: 7px; }
.voice-item { padding: 9px 10px; border-left: 2px solid var(--mint); background: var(--paper-soft); }
.voice-item blockquote { margin: 0 0 4px; color: var(--ink-2); font-size: 11px; }
.voice-item p { margin: 3px 0 0; }
.variant-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 13px; }
.variant-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.variant-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: var(--green); font-size: 12px; font-weight: 770; }
.variant-card header span:last-child { color: var(--faint); font-size: 10px; font-weight: 500; }
.variant-card p { min-height: 90px; margin: 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.9; }
.variant-card button { margin-top: 8px; }
.tool-results { display: grid; gap: 9px; padding: 14px; }
.finding-card, .question-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.finding-card header { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 740; }
.severity { padding: 3px 6px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 9px; }
.severity.is-warning { color: var(--amber); background: var(--amber-soft); }
.finding-card p, .question-card p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.question-card { position: relative; padding-left: 44px; }
.question-card .question-number { position: absolute; top: 13px; left: 13px; color: var(--green); font-family: ui-monospace, monospace; font-size: 12px; }
.question-card h3 { margin: 0; font-size: 13px; line-height: 1.7; }
.question-card p strong { color: var(--ink-2); }
.history-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-soft); }
.history-controls p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.history-controls strong { color: var(--ink-2); }
.history-list { display: grid; gap: 10px; margin-top: 13px; }
.history-item { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.history-item header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.history-item h3 { margin: 0; font-size: 13px; line-height: 1.6; }
.history-item time { flex: 0 0 auto; color: var(--faint); font-size: 10px; }
.history-item > p { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.history-item details { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.history-item summary { color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.history-edit-grid { display: grid; gap: 9px; margin-top: 10px; }
.history-edit-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.history-edit-grid textarea { min-height: 74px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: var(--paper); font-size: 11px; line-height: 1.7; }
.history-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.empty-state { margin: 20px 0; padding: 25px 15px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.7; }
.value-section { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); gap: 65px; padding: 74px 4% 65px; }
.value-intro h2 { margin: 9px 0 11px; font-size: 26px; line-height: 1.5; letter-spacing: -.04em; }
.value-intro p { max-width: 290px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.value-list { display: grid; gap: 0; }
.value-list article { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.value-list article:first-child { padding-top: 0; }
.value-list article > span { color: var(--green); font-family: ui-monospace, monospace; font-size: 11px; }
.value-list h3 { margin: 0 0 5px; font-size: 13px; }
.value-list p { max-width: 540px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.faq-preview { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 0 0 48px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.faq-preview h2 { margin: 5px 0; font-size: 14px; }
.faq-preview p { margin: 0; color: var(--muted); font-size: 11px; }
.faq-links { display: flex; flex-wrap: wrap; gap: 7px; }
.faq-links a { padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); font-size: 10px; text-decoration: none; }
.faq-links a span { margin-left: 5px; color: var(--green); }
.site-footer { width: min(100% - 64px, 1240px); display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 11px 22px; margin: 0 auto; padding: 20px 1% 33px; border-top: 1px solid var(--line); }
.footer-brand { color: var(--ink-2); font-size: 12px; font-weight: 760; text-decoration: none; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 15px; }
.site-footer nav a, .site-footer > p { color: var(--faint); font-size: 10px; text-decoration: none; }
.site-footer > p { grid-column: 1 / -1; margin: 4px 0 0; text-align: right; }
.mobile-dock { display: none; }
.toast { position: fixed; z-index: 80; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: min(420px, calc(100% - 36px)); padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); font-size: 12px; line-height: 1.7; animation: panel-in .2s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 920px) {
  .hero { gap: 35px; padding-right: 1%; padding-left: 1%; }
  .workspace-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 12px; }
  .tool-panel { padding: 24px 20px; }
  .notice-strip { align-items: flex-start; }
  .usage-counter { align-self: center; }
}
@media (max-width: 700px) {
  .topbar { width: calc(100% - 34px); height: 62px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 14px; }
  .brand-edition, .header-link { display: none; }
  .topbar-actions { gap: 0; }
  .theme-toggle { min-height: 32px; padding: 0 9px; }
  .theme-label { font-size: 11px; }
  main { width: calc(100% - 28px); }
  .hero { grid-template-columns: 1fr; gap: 17px; padding: 35px 2px 24px; }
  h1 { margin: 13px 0 10px; font-size: clamp(32px, 9vw, 43px); line-height: 1.34; }
  .hero-description { font-size: 13px; line-height: 1.85; }
  .desktop-only { display: none; }
  .hero-meta { gap: 8px 14px; margin-top: 14px; }
  .meta-item { font-size: 10px; }
  .hero-note { display: none; }
  .notice-strip { position: relative; gap: 8px; margin-bottom: 11px; padding: 9px 10px; }
  .notice-strip p { font-size: 10px; }
  .usage-counter { position: absolute; top: calc(100% + 5px); right: 1px; padding: 3px 6px; border: 0; background: transparent; font-size: 9px; }
  .workspace-layout { display: block; }
  .tool-rail { position: static; display: block; margin: 0 0 10px; padding: 0; }
  .rail-heading, .rail-card { display: none; }
  .tool-nav { display: flex; gap: 6px; overflow-x: auto; padding: 1px 0 5px; scrollbar-width: none; }
  .tool-nav::-webkit-scrollbar { display: none; }
  .tool-tab { min-width: max-content; width: auto; min-height: 34px; grid-template-columns: 18px auto; gap: 5px; padding: 0 9px; border-color: var(--line); border-radius: 7px; background: var(--paper); font-size: 10px; }
  .nav-index { font-size: 9px; }
  .nav-arrow { display: none; }
  .tool-panel { padding: 18px 14px 19px; border-radius: 11px; }
  .panel-heading { gap: 8px; margin-bottom: 16px; padding-bottom: 13px; }
  .panel-heading h2 { margin: 4px 0 3px; font-size: 18px; }
  .panel-heading p { max-width: 295px; font-size: 11px; line-height: 1.65; }
  .panel-kicker { font-size: 9px; }
  .step-chip { gap: 5px; padding: 6px 7px; font-size: 9px; }
  .panel-mark { padding: 6px; font-size: 6px; }
  .form-stack { width: 100%; }
  .field-group { margin-bottom: 15px; }
  .field-group > label, .field-label-row label, .company-fields > label { font-size: 12px; }
  .field-hint, .count-label { font-size: 10px; }
  .field-control { min-height: 40px; padding: 9px 10px; font-size: 13px; }
  .question-input { min-height: 66px; }
  .source-input { min-height: 143px; }
  .field-assist { font-size: 9px; }
  .target-card { padding: 11px; }
  .target-copy label { font-size: 11px; }
  .target-copy p { max-width: 180px; font-size: 9px; }
  .company-fields { gap: 9px; }
  .consent-row { gap: 7px; margin-top: 12px; }
  .consent-row label { font-size: 10px; }
  .primary-button { min-height: 47px; margin-top: 14px; font-size: 12px; }
  .form-note { font-size: 10px; }
  .result-panel, .variant-results, .tool-results { margin-top: 17px; padding: 12px; }
  .result-heading h3 { font-size: 14px; }
  .score-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .score-card { padding: 8px; }
  .score-card h4 { font-size: 9px; }
  .score-card p { font-size: 9px; }
  .comparison-grid { grid-template-columns: 1fr; gap: 8px; }
  .compare-text { min-height: 60px; font-size: 11px; }
  .improved-textarea { min-height: 130px; font-size: 12px; }
  .reason-block { margin-top: 9px; padding: 11px; }
  .reason-block ol { gap: 5px; font-size: 10px; }
  .result-actions { gap: 6px; }
  .result-actions .text-button { margin-left: 0; }
  .secondary-button { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .variant-results { grid-template-columns: 1fr; }
  .variant-card p { min-height: 0; font-size: 11px; }
  .value-section { grid-template-columns: 1fr; gap: 20px; padding: 43px 3% 34px; }
  .value-intro h2 { margin: 6px 0; font-size: 21px; }
  .value-intro p { max-width: none; font-size: 11px; }
  .value-list article { grid-template-columns: 25px 1fr; gap: 7px; padding: 11px 0; }
  .value-list h3 { font-size: 12px; }
  .value-list p { font-size: 10px; }
  .faq-preview { display: block; margin-bottom: 27px; padding: 16px; }
  .faq-preview h2 { font-size: 14px; }
  .faq-preview p { font-size: 10px; line-height: 1.7; }
  .faq-links { margin-top: 12px; }
  .faq-links a { flex: 1; padding: 8px 7px; font-size: 9px; }
  .site-footer { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 9px; padding: 17px 1% 82px; }
  .site-footer nav { justify-content: flex-start; gap: 8px 12px; }
  .site-footer > p { grid-column: auto; text-align: left; }
  .mobile-dock { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 7px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 95%, transparent); backdrop-filter: blur(16px); }
  .mobile-dock button { min-height: 43px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
  .mobile-dock button span { color: var(--faint); font-family: ui-monospace, monospace; font-size: 6px; }
  .mobile-dock button.is-active { color: var(--green); background: var(--green-soft); font-weight: 740; }
  .mobile-dock button.is-active span { color: var(--green); }
  .toast { bottom: calc(60px + env(safe-area-inset-bottom)); font-size: 11px; }
}
@media (max-width: 380px) {
  main { width: calc(100% - 22px); }
  .tool-panel { padding-right: 11px; padding-left: 11px; }
  .panel-heading p { max-width: 240px; }
  .faq-links { display: grid; grid-template-columns: 1fr 1fr; }
  .faq-links a:last-child { grid-column: 1 / -1; }
  .theme-label { display: none; }
}

/* Mobile usability: comfortable reading sizes, no iOS input zoom, and thumb-sized controls. */
@media (max-width: 700px) {
  .tool-tab { min-height: 42px; font-size: 12px; }
  .nav-index { font-size: 10px; }
  .panel-heading p { font-size: 12px; }
  .panel-kicker { font-size: 10px; }
  .step-chip { min-height: 32px; font-size: 10px; }
  .field-group > label, .field-label-row label, .company-fields > label { font-size: 13px; }
  .field-hint, .count-label, .required-chip, .optional-chip { font-size: 11px; }
  .field-control, .improved-textarea, .history-edit-grid textarea, .company-fields .field-control { font-size: 16px; }
  .target-control input { min-height: 44px; font-size: 16px; }
  .target-copy label { font-size: 12px; }
  .target-copy p, .field-assist { font-size: 11px; }
  .consent-row label { font-size: 12px; }
  .primary-button { min-height: 50px; font-size: 13px; }
  .form-note, .inline-note, .length-state, .result-notice { font-size: 11px; }
  .score-card h4 { font-size: 11px; }
  .score-card p, .compare-card h4, .compare-text, .reason-block ol { font-size: 12px; }
  .compare-card header { font-size: 10px; }
  .improved-textarea { min-height: 145px; }
  .secondary-button { min-height: 42px; font-size: 12px; }
  .text-button { min-height: 40px; font-size: 12px; }
  .voice-check p, .finding-card p, .question-card p, .variant-card p { font-size: 12px; }
  .history-controls p, .history-item > p { font-size: 12px; }
  .history-edit-grid textarea { min-height: 90px; }
  .mobile-dock button { min-height: 46px; font-size: 11px; }
  .mobile-dock button span { font-size: 9px; }
  .usage-counter { font-size: 10px; }
  .notice-strip p, .value-list p, .faq-preview p, .site-footer nav a, .site-footer > p { font-size: 11px; }
  .faq-links a { font-size: 10px; }
  .document-page .topbar-actions .header-link { display: inline-flex; font-size: 12px; }
}
