/* 委託先監督マネージャ — Corporate/Minimal 統制ツール
   色は状態の言語。ブランド色は最小限。意味色で状態を一意に読ませる。 */

:root {
  /* Brand */
  --brand: #1F3A8A;            /* Guard Indigo */
  --brand-700: #1A337A;
  --brand-500: #2F4FB5;
  --brand-100: #E5EAF7;
  --brand-50: #F2F5FC;
  --brand-on: #FFFFFF;
  --accent: #0E7C86;           /* Signal Teal */
  --accent-on: #FFFFFF;

  /* Surfaces */
  --bg-app: #F6F7F9;
  --surface: #FFFFFF;
  --surface-sunken: #EEF0F3;
  --surface-inverse: #0F172A;
  --border: #D8DCE2;
  --border-strong: #B6BCC6;

  /* Text */
  --text-primary: #10151F;
  --text-secondary: #4A5462;
  --text-muted: #7A8494;
  --focus-ring: #2F4FB5;

  /* Semantic states */
  --st-done: #15803D;      --st-done-bg: #E8F5EC;   --st-done-bd: #A7D7B5;   /* 評価済 / 完了 */
  --st-prog: #0E7C86;      --st-prog-bg: #E2F1F2;   --st-prog-bd: #A8D4D8;   /* 配布済 / 対応中 */
  --st-pend: #7A8494;      --st-pend-bg: #EEF0F3;   --st-pend-bd: #D8DCE2;   /* 未送 / 未着手 */
  --st-warn: #B45309;      --st-warn-bg: #FBF0E0;   --st-warn-bd: #EBCB9A;   /* 期限接近 */
  --st-over: #B91C1C;      --st-over-bg: #FBE9E9;   --st-over-bd: #E7B1B1;   /* 期限超過 / 要是正 */
  --st-crit: #7C2D92;      --st-crit-bg: #F3E8F6;   --st-crit-bd: #D9B6E2;   /* 高リスク委託先 */
  --st-info: #1F3A8A;      --st-info-bg: #E5EAF7;   --st-info-bd: #BFCBEC;

  --font-ui: "Inter", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", ui-monospace, monospace;

  --r-control: 4px;
  --r-card: 8px;
  --shadow-drawer: 0 8px 28px rgba(15, 23, 42, 0.18);
  --shadow-pop: 0 4px 14px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 21px;
  color: var(--text-primary);
  background: var(--bg-app);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--text-muted); }
.sec { color: var(--text-secondary); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.icon { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }

/* ===================== LANDING ===================== */
.lp-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-primary); }
.brandmark .glyph {
  width: 28px; height: 28px; border-radius: var(--r-control);
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.brandmark .glyph .icon { width: 18px; height: 18px; }
.lp-nav { display: flex; align-items: center; gap: 20px; }
.lp-nav a { color: var(--text-secondary); font-weight: 600; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 36px; padding: 0 14px; border-radius: var(--r-control);
  border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px;
  background: var(--surface); color: var(--text-primary); border-color: var(--border-strong);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-sunken); }
.btn-primary { background: var(--brand); color: var(--brand-on); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--surface); color: var(--accent); border-color: var(--st-prog-bd); }
.btn-accent:hover { background: var(--st-prog-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--st-prog-bg); }
.btn-danger { background: var(--surface); color: var(--st-over); border: 1px solid var(--st-over-bd); }
.btn-danger:hover { background: var(--st-over-bg); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.lp-hero {
  max-width: 1040px; margin: 0 auto; padding: 72px 24px 48px;
}
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--st-prog-bg);
  border: 1px solid var(--st-prog-bd); border-radius: 100px; padding: 4px 12px;
}
.lp-hero h1 {
  font-size: 34px; line-height: 44px; font-weight: 600; margin: 18px 0 14px;
  letter-spacing: -.01em; max-width: 22ch;
}
.lp-hero p.lead { font-size: 16px; line-height: 26px; color: var(--text-secondary); max-width: 56ch; margin: 0 0 24px; }
.lp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lp-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

.lp-section { max-width: 1040px; margin: 0 auto; padding: 32px 24px; }
.lp-section h2 { font-size: 22px; line-height: 30px; font-weight: 600; margin: 0 0 6px; }
.lp-section .sub { color: var(--text-secondary); margin: 0 0 24px; }

.flow-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.flow-step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px;
}
.flow-step .step-no {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600;
}
.flow-step h3 { font-size: 15px; line-height: 22px; margin: 8px 0 4px; }
.flow-step p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.flow-step .icon { color: var(--brand); margin-bottom: 8px; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px;
}
.feat-card .ico-wrap {
  width: 36px; height: 36px; border-radius: var(--r-control);
  background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px;
}
.feat-card h3 { font-size: 15px; margin: 0 0 6px; }
.feat-card p { font-size: 13px; color: var(--text-secondary); margin: 0; }

.callout {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--st-info-bg); border: 1px solid var(--st-info-bd);
  border-radius: var(--r-card); padding: 16px; color: var(--text-secondary); font-size: 13px;
}
.callout .icon { color: var(--st-info); margin-top: 1px; }
.callout strong { color: var(--text-primary); }

.lp-footer {
  border-top: 1px solid var(--border); margin-top: 40px;
  padding: 24px; text-align: center; color: var(--text-muted); font-size: 12px;
}

/* Site-wide legal footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 40px;
  background: var(--surface); padding: 28px 24px 24px;
}
.site-footer .sf-inner { max-width: 1040px; margin: 0 auto; }
.site-footer .sf-links {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  margin-bottom: 14px;
}
.site-footer .sf-links a { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.site-footer .sf-sep { color: var(--border-strong); }
.site-footer .sf-meta { font-size: 12px; color: var(--text-muted); line-height: 18px; }
.site-footer .sf-meta a { color: var(--text-muted); }

/* ===================== LEGAL / DOC PAGES ===================== */
.doc {
  max-width: 800px; margin: 0 auto; padding: 40px 24px 24px;
}
.doc .doc-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--st-prog-bg);
  border: 1px solid var(--st-prog-bd); border-radius: 100px; padding: 4px 12px; margin-bottom: 14px;
}
.doc h1 { font-size: 26px; line-height: 34px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.doc .doc-lead { color: var(--text-secondary); font-size: 14px; line-height: 22px; margin: 0 0 8px; }
.doc .doc-rev { font-size: 12px; color: var(--text-muted); margin: 0 0 24px; }
.doc section { margin: 0 0 24px; }
.doc h2 {
  font-size: 16px; line-height: 24px; font-weight: 600; margin: 28px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--text-primary);
}
.doc h3 { font-size: 14px; font-weight: 600; margin: 16px 0 4px; color: var(--text-primary); }
.doc p { font-size: 14px; line-height: 23px; color: var(--text-secondary); margin: 0 0 10px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { font-size: 14px; line-height: 23px; color: var(--text-secondary); margin-bottom: 5px; }
.doc strong { color: var(--text-primary); }
.doc a { font-weight: 600; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 14px; }
.doc-table th, .doc-table td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border: 1px solid var(--border); line-height: 21px;
}
.doc-table th {
  width: 30%; background: var(--surface-sunken); color: var(--text-secondary);
  font-weight: 600; white-space: nowrap;
}
.doc-table td { color: var(--text-secondary); }
.doc-table td strong { color: var(--text-primary); }

/* respond.html consent block */
.consent-box {
  border: 1px solid var(--st-info-bd); background: var(--st-info-bg);
  border-radius: var(--r-card); padding: 16px; margin-top: 16px;
}
.consent-box h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.consent-box h3 .icon { color: var(--st-info); }
.consent-box p { font-size: 12px; line-height: 19px; color: var(--text-secondary); margin: 0 0 8px; }
.consent-box ul { margin: 0 0 10px; padding-left: 18px; }
.consent-box li { font-size: 12px; line-height: 19px; color: var(--text-secondary); margin-bottom: 3px; }
.consent-check {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-control);
  padding: 12px 14px; margin-top: 4px;
}
.consent-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.consent-check span { font-size: 13px; line-height: 20px; color: var(--text-primary); font-weight: 600; }
.disclaimer {
  background: var(--surface-sunken); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 14px 16px; font-size: 12px; color: var(--text-secondary);
  margin-top: 20px; line-height: 18px;
}

/* ===================== PRICING ===================== */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 24px; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--brand); border-width: 1.5px; }
.price-card .tier { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.price-card.featured .tier { color: var(--brand); }
.price-card .badge-rec {
  align-self: flex-start; margin-bottom: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-100); border: 1px solid var(--st-info-bd);
  border-radius: 100px; padding: 3px 10px;
}
.price-card .amount { margin: 12px 0 2px; }
.price-card .amount .yen { font-family: var(--font-mono); font-size: 30px; font-weight: 600; }
.price-card .amount .per { color: var(--text-muted); font-size: 13px; }
.price-card .est { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.price-card ul { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 13px; color: var(--text-secondary); }
.price-card li .icon { color: var(--st-done); margin-top: 2px; }

/* ===================== APP SHELL ===================== */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface-inverse); color: #C5CCD6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brandmark { color: #fff; padding: 18px 18px 14px; }
.sidebar .brandmark .glyph { background: var(--brand-500); }
.nav { padding: 8px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-control); border: none; background: transparent;
  color: #C5CCD6; cursor: pointer; font-weight: 600; font-size: 13px; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--brand-500); color: #fff; }
.nav-item .icon { opacity: .9; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #8A93A1; }
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 8px 12px; }

/* cloud share link / mono copy */
.share-link { display: flex; align-items: center; gap: 8px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-control); padding: 8px 10px; font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.share-link .grow { flex: 1; min-width: 0; }
.draft-email { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-control); padding: 12px; white-space: pre-wrap; font-size: 13px; line-height: 20px; color: var(--text-secondary); max-height: 320px; overflow: auto; }
.token-box { background: var(--st-warn-bg); border: 1px solid var(--st-warn-bd); border-radius: var(--r-control); padding: 12px; font-family: var(--font-mono); font-size: 13px; word-break: break-all; color: var(--text-primary); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  height: 56px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar .ctx { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.topbar .ctx .org-pill {
  font-size: 12px; color: var(--text-secondary); background: var(--surface-sunken);
  border: 1px solid var(--border); border-radius: 100px; padding: 3px 10px;
}
.topbar .search {
  display: flex; align-items: center; gap: 8px; flex: 1; max-width: 360px;
  background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-control);
  padding: 0 10px; height: 34px; color: var(--text-muted);
}
.topbar .search input { border: none; background: transparent; flex: 1; outline: none; color: var(--text-primary); }
.topbar .top-actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 24px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; line-height: 30px; margin: 0 0 2px; }
.page-head .page-sub { color: var(--text-secondary); font-size: 13px; margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* KPI strip */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px;
}
.kpi .k-label { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-family: var(--font-mono); font-size: 28px; font-weight: 600; margin-top: 8px; line-height: 1; }
.kpi .k-value small { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.kpi .k-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.kpi.alert { border-color: var(--st-over-bd); background: var(--st-over-bg); }
.kpi.alert .k-value, .kpi.alert .k-label { color: var(--st-over); }
.kpi.warn { border-color: var(--st-warn-bd); background: var(--st-warn-bg); }
.kpi.warn .k-value, .kpi.warn .k-label { color: var(--st-warn); }

/* Cards / panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.panel + .panel { margin-top: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 15px; margin: 0; }
.panel-head .panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Toolbar (filters) */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.input, .select, textarea.input {
  height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-control);
  background: var(--surface); color: var(--text-primary); outline: none; min-width: 0;
}
textarea.input { height: auto; padding: 8px 10px; line-height: 20px; resize: vertical; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--focus-ring); }
.input-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--r-control); background: var(--surface); color: var(--text-muted);
}
.input-search input { border: none; outline: none; background: transparent; color: var(--text-primary); }
.spacer { flex: 1; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; white-space: nowrap;
}
table.tbl th.num, table.tbl td.num { text-align: right; }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr { height: 44px; }
table.tbl tbody tr:hover { background: var(--brand-50); }
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; opacity: 0; }
tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; }

/* parent-child tree */
.tree-row td:first-child { padding-left: 12px; }
.tree-child td:first-child { padding-left: 36px; }
.tree-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; display: inline-flex; vertical-align: middle; }
.tree-line { display: inline-flex; align-items: center; gap: 6px; }
.child-mark { color: var(--text-muted); display: inline-flex; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: var(--r-control); font-size: 12px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.b-done { color: var(--st-done); background: var(--st-done-bg); border-color: var(--st-done-bd); }
.b-prog { color: var(--st-prog); background: var(--st-prog-bg); border-color: var(--st-prog-bd); }
.b-pend { color: var(--st-pend); background: var(--st-pend-bg); border-color: var(--st-pend-bd); }
.b-warn { color: var(--st-warn); background: var(--st-warn-bg); border-color: var(--st-warn-bd); }
.b-over { color: var(--st-over); background: var(--st-over-bg); border-color: var(--st-over-bd); }
.b-crit { color: var(--st-crit); background: var(--st-crit-bg); border-color: var(--st-crit-bd); }
.b-info { color: var(--st-info); background: var(--st-info-bg); border-color: var(--st-info-bd); }

.tag { font-size: 11px; color: var(--text-secondary); background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--r-control); padding: 2px 7px; }

/* progress bar */
.progress { height: 6px; border-radius: 100px; background: var(--surface-sunken); overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.progress.full > span { background: var(--st-done); }

/* Drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .16s;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 480px; max-width: 92vw; z-index: 50;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-drawer);
  transform: translateX(100%); transition: transform .18s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; margin: 0 0 2px; }
.drawer-head .d-sub { font-size: 12px; color: var(--text-muted); }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.icon-btn { background: none; border: 1px solid transparent; border-radius: var(--r-control); padding: 6px; cursor: pointer; color: var(--text-muted); display: inline-flex; }
.icon-btn:hover { background: var(--surface-sunken); color: var(--text-primary); }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-row .req { color: var(--st-over); }
.form-row .input, .form-row .select, .form-row textarea.input { width: 100%; }
.field-err { color: var(--st-over); font-size: 12px; margin-top: 4px; display: none; }
.field-err.show { display: block; }

/* definition list */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13px; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; color: var(--text-primary); }

/* Modal (irreversible only) */
.modal-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-scrim.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--r-card); width: 440px; max-width: 100%; box-shadow: var(--shadow-drawer); overflow: hidden; }
.modal-head { padding: 18px 20px 0; display: flex; gap: 10px; align-items: flex-start; }
.modal-head .icon { color: var(--st-over); }
.modal-head h2 { font-size: 18px; margin: 0; }
.modal-body { padding: 12px 20px 18px; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.modal-body .warn-box { background: var(--st-warn-bg); border: 1px solid var(--st-warn-bd); border-radius: var(--r-control); padding: 10px 12px; color: var(--st-warn); margin-top: 12px; font-size: 12px; }
.modal-foot { padding: 0 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--st-done-bg); color: var(--st-done); display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--st-done-bd); }
.tl-body { flex: 1; min-width: 0; }
.tl-body .tl-title { font-weight: 600; font-size: 13px; }
.tl-body .tl-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* empty / loading / error */
.empty { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty .ico-wrap { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-sunken); color: var(--text-muted); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { font-size: 15px; margin: 0 0 4px; color: var(--text-primary); }
.empty p { font-size: 13px; margin: 0 0 16px; }
.banner-err { display: flex; gap: 10px; align-items: flex-start; background: var(--st-over-bg); border: 1px solid var(--st-over-bd); color: var(--st-over); border-radius: var(--r-control); padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-sunken) 25%, #E4E7EC 37%, var(--surface-sunken) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 4px; }
.skel-row { height: 16px; margin: 12px 16px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* toast */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface-inverse); color: #fff; border-radius: var(--r-control); padding: 12px 14px;
  font-size: 13px; box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 8px; max-width: 360px;
  animation: slidein .2s ease;
}
.toast .icon { color: #7DD3A0; }
.toast.warn .icon { color: #EBCB9A; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* misc */
.hint { font-size: 12px; color: var(--text-muted); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.inline-list { display: flex; gap: 6px; flex-wrap: wrap; }
.kv-inline { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.kv-inline > div { display: flex; flex-direction: column; }
.kv-inline .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.checklist-set { border: 1px solid var(--border); border-radius: var(--r-control); padding: 10px 12px; }
.checklist-set li { font-size: 13px; color: var(--text-secondary); padding: 3px 0; display: flex; gap: 8px; align-items: flex-start; }
.checklist-set li .icon { color: var(--accent); margin-top: 2px; }
.score-input { display: flex; align-items: center; gap: 12px; }
.score-input input[type=range] { flex: 1; accent-color: var(--brand); }
.score-display { font-family: var(--font-mono); font-size: 18px; font-weight: 600; min-width: 52px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid, .price-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 70; width: 240px; transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; }
  .main { width: 100%; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1025px) { .menu-toggle { display: none; } }
@media (max-width: 640px) {
  .lp-hero h1 { font-size: 26px; line-height: 34px; }
  .kpi-strip { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .content { padding: 16px; }
}
