/* Active spec: dashboard-concept.png and login-concept.png (2026-10-05).
   Brand mark: PYS SEO R2 (logo handoff 2026-10-16). */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-synthesis: none;
  color: #142923;
  background: #fff;
  --ink: #142923;
  --muted: #617168;
  --accent: #006b57;
  --accent-hover: #005544;
  --accent-soft: #eaf4ef;
  --rail: #142723;
  --line: #dfe6e2;
  --backdrop: #f6f8fa;
  --warning: #a46910;
  --warning-bg: #fff8ec;
  --danger: #a43b30;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, textarea, select, a, summary { outline-offset: 4px; }
:focus-visible { outline: 3px solid #158b74; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; word-break: keep-all; }
h1 { font-size: 36px; font-weight: 750; letter-spacing: -.045em; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
h4 { font-size: 14px; font-weight: 700; }
a { color: inherit; text-decoration: none; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-mark { width: 32px; height: 32px; flex: 0 0 32px; }
.brand-name { display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 21px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
.brand-sub { font-size: 13px; color: var(--muted); line-height: 1.4; }
.site-header { height: 80px; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); }
.login-navigation { display: flex; align-items: center; gap: 32px; }
.login-navigation a { min-height: 44px; display: inline-flex; align-items: center; font-size: 16px; }
.login-navigation a:hover { color: var(--accent); }
.login-layout { display: grid; grid-template-columns: 56% 44%; min-height: calc(100svh - 152px); }
.welcome-copy { color: #fff; background: var(--rail); padding: 64px 56px 40px; }
.welcome-copy h1 { color: #fff; font-size: clamp(38px, 4vw, 56px); font-weight: 750; line-height: 1.45; letter-spacing: -.055em; }
.intro { font-size: 21px; line-height: 1.7; margin-top: 20px; color: #e5eee9; word-break: keep-all; }
.hero-visual { display: flex; justify-content: space-between; align-items: center; height: 132px; margin: 16px 0 8px; color: #629b85; }
.hero-rule { width: 72px; height: 2px; background: #10a987; flex: 0 0 72px; }
.hero-visual svg { width: 224px; height: 116px; }
.journey { padding: 0; margin: 0; list-style: none; }
.journey li { padding: 22px 0; border-top: 1px solid #496059; }
.soon-badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border: 1px solid #6fd3b4; border-radius: 999px; color: #c9f3e4; font-size: 13px; font-weight: 600; line-height: 1.5; vertical-align: 2px; pointer-events: none; user-select: none; }
.journey h2 { color: #fff; font-size: 19px; margin-bottom: 4px; }
.journey p { color: #bfd0c7; font-size: 16px; line-height: 1.7; word-break: keep-all; }
.login-side { padding: 64px clamp(32px, 4.5vw, 68px) 40px; display: flex; flex-direction: column; justify-content: center; background: #fff; min-width: 0; }
.login-card h2 { font-size: clamp(26px, 2.55vw, 36px); font-weight: 750; letter-spacing: -.05em; }
.login-intro { font-size: 18px; margin-top: 12px; margin-bottom: 36px; line-height: 1.7; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input[type="password"], input[type="text"], input[type="url"], textarea, select { width: 100%; min-width: 0; height: 44px; border: 1px solid #cfd9d3; border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--ink); font-size: 16px; line-height: 22px; }
input::placeholder, textarea::placeholder { color: #637369; opacity: 1; }
input:disabled, textarea:disabled, select:disabled { background: #f0f4f1; }
input[readonly] { background: #f4f8f5; }
textarea { display: block; resize: vertical; min-height: 44px; max-height: 132px; }
.key-input-wrap { position: relative; }
.key-input-wrap input { height: 56px; font-size: 18px; padding: 14px 16px; }
.key-toggle { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--muted); background: transparent; }
.key-input-wrap:has(.key-toggle) input { padding-right: 58px; }
.key-eye-on, .key-toggle[aria-pressed="true"] .key-eye-off { display: none; }
.key-toggle[aria-pressed="true"] .key-eye-on { display: block; }
button { min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 650; line-height: 22px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; transition: background-color .15s, border-color .15s; }
.button-label { min-width: 0; }
.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.secondary { color: #334a40; background: #fff; border-color: #cbd6cf; }
.secondary:hover:not(:disabled) { background: #f1f6f3; border-color: #aebfb3; }
.accent-button { color: var(--accent); border-color: #3b927b; }
.text-button { background: transparent; color: var(--accent); padding: 8px 10px; }
.text-button:hover:not(:disabled) { background: var(--accent-soft); }
.full-width { width: 100%; }
.login-card .primary { min-height: 56px; margin-top: 24px; font-size: 18px; gap: 20px; }
.login-card .field-help { margin-top: 18px; font-size: 14px; }
.muted { color: var(--muted); }
.field-help { font-size: 14px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.message { font-size: 14px; line-height: 1.7; margin-top: 12px; overflow-wrap: anywhere; }
.message:empty { display: none; }
.error-message { color: var(--danger); }
.success-message { color: var(--accent); }
.key-guide { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 16px; }
.key-guide > .icon { width: 24px; height: 24px; color: #52665b; margin-top: 2px; }
.key-guide h3 { margin-bottom: 12px; }
.key-guide p { font-size: 14px; line-height: 1.9; color: var(--muted); word-break: keep-all; }
.site-footer { min-height: 72px; padding: 20px 48px; display: flex; align-items: center; gap: 32px; background: var(--backdrop); color: var(--muted); }
.site-footer strong { padding-right: 32px; border-right: 1px solid #cad5ce; color: var(--ink); font-size: 16px; white-space: nowrap; }
.site-footer p { font-size: 14px; }
body.authenticated { background: var(--backdrop); }
body.authenticated .site-header, body.authenticated .site-footer { display: none; }
.app-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); align-items: start; min-height: 100svh; background: var(--backdrop); }
.app-rail { position: sticky; top: 0; height: 100svh; min-height: 500px; padding: 28px 16px; background: var(--rail); color: #eff6f2; display: flex; flex-direction: column; }
.rail-brand { gap: 10px; padding: 0 8px; }
.rail-brand { align-items: flex-start; }
.rail-brand .brand-mark { width: 28px; height: 28px; flex-basis: 28px; margin-top: 2px; }
.rail-brand strong { color: #fff; font-size: 17px; }
.rail-brand .brand-sub { color: #bfd0c7; font-size: 12px; }
.rail-navigation { display: flex; flex-direction: column; gap: 4px; margin: 28px -6px 0; }
.nav-link { min-height: 48px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; border-radius: 6px; border-left: 4px solid transparent; }
.nav-link:hover { background: #1b3830; }
.nav-link.is-active { background: #21463a; border-left-color: #1cbb86; color: #fff; }
.rail-session { margin-top: auto; padding: 20px 8px 0; border-top: 1px solid #71837a; }
.rail-logout { width: 100%; color: #d5e2db; border-color: #83968b; background: transparent; font-size: 14px; padding: 10px 8px; }
.rail-logout:hover { background: #244135; }
.app-content { min-width: 0; }
.dashboard-content { padding: 20px 28px 28px; max-width: 1600px; margin: 0 auto; }
.dashboard-heading { scroll-margin-top: 24px; margin-bottom: 20px; }
.dashboard-heading h1 { margin-bottom: 4px; }
.dashboard-heading p { color: var(--muted); font-size: 16px; }
.card { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
.diagnosis-card { padding: 16px 20px; margin-bottom: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-width: 0; }
.section-heading h2 { min-width: 0; }
.submission-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px; align-items: start; }
.form-field { min-width: 0; }
.service-field, #connection-choice { grid-column: 1 / -1; }
#connections-panel { padding: 16px 20px; margin-bottom: 16px; }
#connection-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
#connection-message { grid-column: 1 / -1; }
#connection-button { justify-self: start; }
.optional { color: var(--muted); font-weight: 400; }
.diagnosis-submit { margin-top: 28px; min-width: 132px; }
.checkbox-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; min-height: 44px; margin: 0; padding-top: 4px; }
.checkbox-label input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--accent); }
.baseline-note { grid-column: 1 / -1; padding: 12px; background: var(--accent-soft); border-radius: 8px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.baseline-note p { overflow-wrap: anywhere; }
.submission-grid > .message { grid-column: 1 / -1; margin-top: 4px; }
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.history-panel { order: 0; padding: 16px 8px; scroll-margin-top: 24px; }
.history-panel > .section-heading { padding: 0 12px; gap: 4px; margin-bottom: 12px; }
.refresh-button { width: 44px; height: 44px; min-height: 44px; padding: 10px; flex: 0 0 44px; }
.refresh-button .button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.history-panel .field-help { padding: 0 12px; }
.history-panel .field-help:empty { display: none; }
.jobs-list { list-style: none; padding: 0; margin: 0; max-height: 740px; overflow-y: auto; }
.jobs-list li { margin: 6px 0; }
.job-button { display: block; width: 100%; border: 1px solid transparent; border-left: 4px solid transparent; border-radius: 4px; padding: 12px 12px 12px 14px; text-align: left; background: #fff; font-weight: 400; }
.job-button:hover { background: #f3f7f4; }
.job-button[aria-pressed="true"] { background: #e9f2ed; border-color: #e2ece5; border-left-color: var(--accent); }
.job-site { display: block; font-size: 15px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.job-meta > span:last-child { font-size: 14px; }
.status { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; min-height: 26px; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; color: #57685d; background: #edf1ee; }
.status-running { color: #22675e; background: #e8f3f1; }
.status-ready { color: #005e46; background: #dff1e9; }
.status-partial { color: #815009; background: #fff0cc; }
.status-error { color: var(--danger); background: #fff0eb; }
.empty-state { padding: 24px 16px; font-size: 14px; text-align: center; line-height: 1.8; color: var(--muted); }
.result-panel { order: 1; padding: 16px 20px 20px; min-height: 540px; scroll-margin-top: 24px; }
.empty-result { text-align: center; padding: 104px 16px 80px; }
.empty-symbol { display: block; width: 48px; height: 48px; margin: 0 auto 20px; color: #789184; }
.empty-result h3 { margin-bottom: 10px; }
.empty-result p { font-size: 16px; line-height: 1.8; }
.result-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.selected-meta { min-width: 0; }
.selected-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 2px; }
.site-value { font-size: 26px; font-weight: 750; letter-spacing: -.04em; line-height: 1.45; overflow-wrap: anywhere; min-width: 0; }
.selected-goal { margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.selected-goal:empty { display: none; }
.result-actions { display: flex; flex-wrap: wrap; align-items: start; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.result-actions button { font-size: 14px; white-space: nowrap; }
.progress-note { color: #356957; background: #f0f7f3; border: 1px solid #dcebe1; border-radius: 8px; padding: 12px 16px; margin-top: 16px; font-size: 14px; line-height: 1.7; }
.progress-note:empty { display: none; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 0; margin: 16px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-item { padding: 0 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.summary-item + .summary-item { border-left: 1px solid var(--line); }
.summary-item strong { display: block; font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.3; letter-spacing: -.02em; }
.summary-item span { display: block; font-size: 14px; color: #3f5449; }
.summary-item strong + span { order: -1; }
.notice { border: 1px solid #f0ddba; background: var(--warning-bg); color: #80591d; padding: 12px 16px; margin: 16px 0; border-radius: 8px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.result-section { margin-top: 20px; min-width: 0; }
.result-section > h3 { font-size: 20px; margin-bottom: 10px; }
.section-intro { font-size: 14px; line-height: 1.75; color: var(--muted); margin: 8px 0 12px; overflow-wrap: anywhere; }
.finding { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; overflow: hidden; }
.finding > summary { position: relative; min-height: 48px; padding: 12px 44px 12px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 16px; font-weight: 650; line-height: 1.55; list-style: none; cursor: pointer; background: #fffaf1; color: var(--ink); }
.finding > summary::-webkit-details-marker, .evidence-details > summary::-webkit-details-marker { display: none; }
.finding > summary::after, .evidence-details > summary::after { position: absolute; right: 17px; top: calc(50% - 4px); width: 8px; height: 8px; border-right: 1.5px solid #486052; border-bottom: 1.5px solid #486052; transform: rotate(45deg); content: ""; }
.finding[open] > summary::after, .evidence-details[open] > summary::after { transform: rotate(225deg); top: calc(50% - 1px); }
.finding[open] > summary { border-bottom: 1px solid #ece4d5; }
.finding > summary:hover { background: #fff5e6; }
.finding-title { display: inline-flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.finding-title .icon { color: #c48414; }
.kind-label { display: inline-flex; font-size: 14px; font-weight: 600; line-height: 1.45; border-radius: 20px; background: #ffedbd; color: #825317; padding: 3px 10px; }
.finding.kind-maintain > summary, .finding.kind-deferred > summary { background: #f4f8f5; }
.finding.kind-investigate > summary, .finding.kind-recheck > summary { background: #f4f7f9; }
.finding.kind-maintain .kind-label, .kind-label.kind-maintain { background: #e2f0e7; color: #315d42; }
.finding.kind-deferred .kind-label, .kind-label.kind-deferred { background: #e9eeea; color: #5b6a60; }
.finding.kind-investigate .kind-label, .finding.kind-recheck .kind-label, .kind-label.kind-investigate, .kind-label.kind-recheck { background: #e7eef2; color: #465e69; }
.finding.kind-maintain .finding-title .icon, .finding.kind-deferred .finding-title .icon, .finding.kind-investigate .finding-title .icon, .finding.kind-recheck .finding-title .icon { color: #557969; }
.finding-content { padding: 16px; font-size: 16px; min-width: 0; }
.finding-content h4 { margin: 16px 0 6px; }
.finding-content > h4:first-child { margin-top: 0; }
.finding-content ul, .result-section > ul { margin: 0 0 12px; padding-left: 20px; font-size: 16px; line-height: 1.8; }
.finding-content li, .result-section > ul li { margin: 4px 0; overflow-wrap: anywhere; }
.advice-overview { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.priority-list { padding-left: 24px; margin: 16px 0; }
.priority-list li { margin: 12px 0; padding-left: 4px; overflow-wrap: anywhere; }
.priority-list a { font-weight: 600; }
.priority-list p { margin: 4px 0 0; }
.advice-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start; font-size: 14px; }
.advice-row + .advice-row { margin-top: 12px; }
.advice-row h4 { margin: 0; padding-top: 1px; }
.advice-row p { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.advice-row ul { margin-bottom: 0; }
.checks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.check-group { padding: 0 16px; min-width: 0; }
.check-group:first-child { padding-left: 0; }
.check-group:last-child { padding-right: 0; }
.check-group + .check-group { border-left: 1px solid var(--line); }
.check-group h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 14px; }
.check-group h4 .icon { color: #314f42; }
.check-group ul { padding-left: 18px; color: var(--muted); margin-bottom: 0; }
.check-group p { font-size: 16px; color: var(--muted); line-height: 1.75; }
.evidence-details { border: 1px solid var(--line); background: #f6f8fa; border-radius: 8px; margin-top: 12px; min-width: 0; }
.evidence-details > summary { position: relative; min-height: 48px; padding: 12px 42px 12px 16px; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; color: #304b3e; font-size: 14px; font-weight: 650; }
.evidence-details > summary:hover { background: #edf3ef; }
.evidence-details[open] > summary { border-bottom: 1px solid var(--line); }
.evidence-details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.evidence-details > :last-child { margin-bottom: 16px; }
.evidence-details h4 { margin-top: 16px; margin-bottom: 6px; }
.evidence-note { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; color: #52685b; background: #f4f7f5; border-radius: 6px; padding: 12px; margin-bottom: 10px; }
.url-list { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px !important; }
.code-wrap { position: relative; min-width: 0; }
.example-block { position: relative; min-width: 0; }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.example-heading h4 { margin: 0; }
.example-heading .copy-button { position: static; }
.copy-message { min-height: 22px; font-size: 14px; color: var(--accent); }
.copy-message:empty { min-height: 0; }
.code-sample { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; color: #324b3e; background: #f2f5f7; border-radius: 6px; font-size: 14px; line-height: 1.8; padding: 12px 48px 12px 14px; margin: 8px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow-y: auto; }
.copy-button { position: absolute; top: 4px; right: 4px; min-width: 44px; min-height: 44px; border: 0; padding: 10px; background: transparent; color: #52675b; }
.copy-button:hover:not(:disabled) { background: #e5eee8; }
.copy-button .icon { width: 18px; height: 18px; flex-basis: 18px; }
.comparison-list { list-style: none; padding: 0 !important; margin: 12px 0; }
.comparison-list li { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 16px; overflow-wrap: anywhere; }
.comparison-status { display: block; font-weight: 650; color: #2b5642; margin-bottom: 4px; }
.service-note { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 14px; color: var(--muted); margin-top: 20px; scroll-margin-top: 24px; }
.service-note .icon { margin-top: 2px; }
.service-note-title { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.service-note-list { margin: 0; padding-left: 20px; line-height: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px 16px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; }
.skip-link:focus { top: 12px; }
@media (max-width: 1200px) {
  .dashboard-content { padding: 20px; }
  .workspace { grid-template-columns: 230px minmax(0, 1fr); }
  .result-top { flex-wrap: wrap; gap: 12px; }
  .result-actions { justify-content: flex-start; }
  .result-panel { padding: 16px; }
  .welcome-copy { padding: 48px 40px 32px; }
  .login-side { padding: 48px 36px 32px; }
  .intro { font-size: 18px; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .app-rail { padding-left: 12px; padding-right: 12px; }
  .rail-brand strong { font-size: 16px; }
  .rail-brand { gap: 8px; padding: 0 4px; }
  .rail-brand .brand-mark { width: 26px; height: 26px; flex-basis: 26px; }
  .workspace { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
  .submission-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .goal-field { grid-column: 1 / -1; grid-row: 2; }
  .diagnosis-submit { grid-column: 2; grid-row: 1; }
  .checkbox-label { margin-top: 8px; }
  .checks-grid { grid-template-columns: 1fr; gap: 16px; }
  .check-group, .check-group:first-child, .check-group:last-child { padding: 0; }
  .check-group + .check-group { border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .site-header { padding: 0 32px; }
  .welcome-copy { padding: 40px 32px 28px; }
  .login-side { padding: 40px 28px 28px; }
  .welcome-copy h1 { font-size: 38px; }
  .hero-visual { height: 110px; }
  .hero-visual svg { width: 176px; height: 96px; }
  .journey li { padding: 18px 0; }
  .journey p { font-size: 14px; }
}
@media (max-width: 760px) {
  html { scroll-behavior: auto; }
  .site-header { height: auto; min-height: 72px; padding: 12px 20px; gap: 12px; flex-wrap: wrap; }
  .brand { gap: 8px; }
  .brand strong { font-size: 18px; }
  .brand-sub { font-size: 12px; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .login-navigation { gap: 16px; }
  .login-navigation a { font-size: 14px; }
  .login-layout { grid-template-columns: 1fr; min-height: 0; }
  /* Canva alternative: quiet key card; keep the form first without its empty hero space. */
  .login-side { order: 0; padding: 28px 20px; background: var(--backdrop); }
  .login-card { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgb(20 39 35 / 4%); }
  .welcome-copy { order: 1; padding: 36px 24px 28px; }
  .welcome-copy h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.45; }
  .intro { font-size: 16px; margin-top: 16px; }
  .login-card h2 { font-size: 28px; }
  .login-intro { font-size: 16px; margin: 12px 0 28px; }
  .key-guide { margin-top: 32px; padding-top: 24px; gap: 12px; }
  .key-guide p { font-size: 14px; }
  .hero-visual { height: 104px; margin-top: 8px; }
  .hero-visual svg { width: 180px; height: 104px; }
  .hero-rule { width: 48px; flex-basis: 48px; }
  .journey li { padding: 20px 0; }
  .journey h2 { font-size: 18px; }
  .journey p { font-size: 14px; }
  .site-footer { padding: 20px 24px; gap: 12px; align-items: start; flex-direction: column; }
  .site-footer strong { border: 0; padding: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .app-rail { position: static; height: auto; min-height: 0; padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .rail-brand { padding: 0; gap: 8px; }
  .rail-brand strong { font-size: 16px; }
  .rail-brand .brand-mark { width: 26px; height: 26px; flex-basis: 26px; }
  .rail-session { grid-column: 2; grid-row: 1; margin: 0; padding: 0; border: 0; align-self: center; }
  .rail-logout { width: auto; padding: 9px 10px; font-size: 14px; gap: 8px; }
  .rail-logout .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .rail-navigation { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 4px; margin: 0; }
  .nav-link { min-height: 44px; padding: 8px 10px; gap: 8px; font-size: 14px; border-left: 0; border-bottom: 3px solid transparent; border-radius: 4px; }
  .nav-link.is-active { border-left-color: transparent; border-bottom-color: #21b894; }
  .nav-link .icon { width: 18px; height: 18px; flex-basis: 18px; }
  .dashboard-content { padding: 20px 16px 24px; }
  .dashboard-heading { margin-bottom: 16px; }
  .dashboard-heading h1 { font-size: 30px; }
  .dashboard-heading p { font-size: 14px; line-height: 1.75; }
  .diagnosis-card { padding: 16px; }
  .submission-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .diagnosis-submit { margin-top: 0; width: 100%; }
  .checkbox-label { grid-column: 1 / -1; grid-row: auto; align-items: start; min-height: 44px; padding: 4px 0; }
  #connection-form { grid-template-columns: minmax(0, 1fr); }
  .checkbox-label input { margin-top: 2px; }
  .baseline-note { flex-direction: column; align-items: start; gap: 4px; }
  .workspace { display: flex; flex-direction: column; gap: 16px; }
  .result-panel { order: 0; padding: 16px; min-height: 320px; }
  .history-panel { order: 1; padding: 16px 8px; }
  .jobs-list { max-height: 340px; }
  .empty-result { padding: 60px 12px 44px; }
  .result-top { display: block; }
  .site-value { font-size: 24px; }
  .selected-heading { gap: 8px 12px; }
  .result-actions { margin-top: 14px; justify-content: flex-start; }
  .result-actions button { flex: 1 1 140px; white-space: normal; }
  .summary-grid { padding: 14px 0; margin: 16px 0; }
  .summary-item { padding: 0 8px; gap: 6px; }
  .summary-item strong { font-size: 28px; }
  .summary-item span { font-size: 14px; word-break: keep-all; }
  .finding > summary { padding-left: 12px; gap: 8px; }
  .finding-content { padding: 14px 12px; }
  .finding-title { flex-basis: 100%; }
  .kind-label { margin-left: 30px; }
  .advice-row { grid-template-columns: 1fr; gap: 4px; }
  .checks-grid { grid-template-columns: 1fr; gap: 16px; }
  .check-group, .check-group:first-child, .check-group:last-child { padding: 0; }
  .check-group + .check-group { border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .service-note { margin-top: 16px; }
}
@media (max-width: 380px) {
  .site-header { padding-left: 16px; padding-right: 16px; }
  .login-side { padding-left: 12px; padding-right: 12px; }
  .welcome-copy { padding-left: 20px; padding-right: 20px; }
  .login-card { padding: 20px; }
  .app-rail { grid-template-columns: 1fr; }
  .rail-session { grid-column: 1; grid-row: 3; }
  .rail-logout { min-width: 144px; }
  .rail-navigation { gap: 0; }
  .nav-link { padding-left: 8px; padding-right: 8px; gap: 6px; }
  .nav-link .icon { display: none; }
  .dashboard-content { padding-left: 12px; padding-right: 12px; }
  .diagnosis-card, .result-panel { padding-left: 12px; padding-right: 12px; }
  .summary-item { padding-left: 4px; padding-right: 4px; }
  .summary-item span { font-size: 14px; }
  .welcome-copy h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
