/* ============================================================
   紙マニフェスト返票チェック表 — デザインシステム v1.0
   コンセプト: 業務台帳・事務ファイルの信頼感（過度な装飾なし）
   ============================================================ */
:root {
  --navy: #1f3a5f;
  --navy-deep: #16293f;
  --paper: #fbfaf7;
  --paper-2: #f3f1ec;
  --ink: #23272e;
  --ink-soft: #54585f;
  --line: #d8d3c8;
  --accent: #2e6f4e;       /* 緑：受領・OK */
  --accent-soft: #e6f1ea;
  --warn: #b8860b;        /* 琥珀：期限間近 */
  --warn-soft: #fbf0d3;
  --bad: #b23b3b;         /* 赤：超過 */
  --bad-soft: #f6e0e0;
  --unknown: #3f4348;     /* 灰：要確認（コントラスト4.5:1以上を確保） */
  --unknown-soft: #ececee;
  --shadow: 0 1px 2px rgba(20,30,50,.06), 0 2px 8px rgba(20,30,50,.05);
  --radius: 6px;
  --maxw: 1080px;
  --font: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
}
@media (max-width: 600px) { body { font-size: 16px; line-height: 1.7; } }

a { color: var(--navy); }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid #0f1c2d;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px; flex-wrap: wrap;
}
.brand {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 18px;
  letter-spacing: .3px;
}
.brand:hover { text-decoration: none; opacity: .92; }
.header-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.header-nav a { color: #dce6f2; text-decoration: none; font-size: 14px; }
.header-nav a:hover { color: #fff; text-decoration: underline; }
.header-download {
  background: #fff; color: var(--navy); font-weight: 700; text-decoration: none;
  padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
}
.header-download:hover { background: #eef3f9; text-decoration: none; }

/* mobile nav toggle (checkbox hack, no-JS) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; color: #fff; font-size: 22px; }
@media (max-width: 768px) {
  .nav-toggle-label { display: block; }
  .header-nav {
    display: none; width: 100%; flex-direction: column; gap: 0;
    background: var(--navy-deep); margin: 0 -20px; padding: 0 20px;
  }
  .header-nav a { padding: 12px 0; border-top: 1px solid #2c4767; }
  .nav-toggle:checked ~ .header-nav { display: flex; }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #fff 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; padding: 48px 20px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px; } }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1px; margin: 0 0 10px; text-transform: none; }
h1 { font-size: clamp(28px, 4.5vw, 42px); line-height: 1.25; margin: 0 0 14px; color: var(--navy-deep); }
h1 span { display: block; }
.lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 22px; }
@media (max-width: 600px){ .lead { font-size: 16px; } }

.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.button {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent;
}
.button.primary { background: var(--navy); color: #fff; }
.button.primary:hover { background: var(--navy-deep); text-decoration: none; }
.button.large { padding: 15px 28px; font-size: 17px; }
.trust-note { font-size: 13px; color: var(--ink-soft); }
.file-note { font-size: 13px; color: var(--ink-soft); margin: 14px 0 0; }
.short-caution {
  font-size: 13px; color: #6a4b00; background: var(--warn-soft);
  border-left: 3px solid var(--warn); padding: 8px 12px; margin: 16px 0 0; border-radius: 0 4px 4px 0;
}

/* excel preview mock */
.template-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.sheet-window { font-size: 13px; }
.sheet-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.sheet-bar span { width: 11px; height: 11px; border-radius: 50%; background: #c9c2b4; }
.sheet-title { font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--navy-deep); background: #fff; }
.sheet-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.cell { padding: 9px 8px; border: 1px solid var(--line); font-size: 12.5px; }
.cell.head { background: var(--navy); color: #fff; font-weight: 700; text-align: center; }
.cell.ok { background: var(--accent-soft); color: #14532d; }
.cell.pending { background: var(--warn-soft); color: #7a5600; }
.cell.muted { background: var(--unknown-soft); color: var(--unknown); }
.shelf-note { padding: 9px 12px; font-size: 12px; color: var(--ink-soft); background: var(--paper-2); border-top: 1px solid var(--line); }

/* ---------- sections ---------- */
.section { padding: 44px 0; }
.section.soft { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 16px; }
h2 { font-size: clamp(22px, 3vw, 30px); color: var(--navy-deep); margin: 0 0 10px; line-height: 1.35; }
h3 { font-size: 19px; color: var(--navy-deep); margin: 26px 0 10px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin: 6px 0; }

.target-grid, .feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px){ .target-grid, .feature-list { grid-template-columns: 1fr; } }
.target-card, .feature-list span {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--navy);
  border-radius: var(--radius); padding: 14px 16px; font-size: 15px;
}
.feature-list { display: grid; }
.feature-list span { border-left-color: var(--accent); }

.text-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
@media (max-width: 800px){ .text-layout { grid-template-columns: 1fr; gap: 14px; } }
.body-copy p { margin-bottom: 12px; }

/* deadline cards */
.deadline-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
@media (max-width: 720px){ .deadline-cards { grid-template-columns: 1fr; } }
.dcard { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.dcard h3 { margin: 0 0 6px; font-size: 17px; }
.dcard .big { font-size: 26px; font-weight: 800; color: var(--navy); }
.dcard .note { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.dcard.special { border-top-color: var(--bad); }
.dcard.special .big { color: var(--bad); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: #fff; }
caption { text-align: left; font-size: 14px; color: var(--ink-soft); padding: 0 0 8px; font-weight: 700; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th[scope="row"], th[scope="col"] { background: var(--paper-2); font-weight: 700; }
th[scope="col"] { background: var(--navy); color: #fff; }
tbody tr:nth-child(even) { background: #faf8f3; }

/* steps */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { position: relative; padding: 10px 10px 10px 48px; margin: 8px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; background: var(--navy); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* info / download panels */
.info-panel, .download-panel, .faq-panel, .notice-panel, .trust-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; box-shadow: var(--shadow);
}
.download-section .download-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--navy); color: #fff; border: none; }
.download-section .download-panel h2 { color: #fff; }
.download-section .download-panel p { color: #d7e2ef; }
.download-section .download-panel .short-caution { background: rgba(255,255,255,.12); color: #ffe9b0; border-left-color: #ffd479; }
.download-section .button.primary { background: #fff; color: var(--navy); }
.download-section .button.primary:hover { background: #eef3f9; }

/* ---------- FAQ ---------- */
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.faq-list summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy-deep); }
.faq-list summary:focus-visible { outline: 3px solid #8fb3d9; outline-offset: 2px; }
.faq-list details[open] summary { border-bottom: 1px solid var(--line); }
.faq-list p { padding: 12px 16px; margin: 0; }

/* ---------- trust elements ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media (max-width: 640px){ .trust-grid { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.trust-item .ic { color: var(--accent); font-weight: 800; }
.hash { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; background: var(--paper-2); padding: 8px 10px; border-radius: 4px; border: 1px solid var(--line); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--ink-soft); padding: 12px 0 0; }
.breadcrumb a { color: var(--navy); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #cdd8e6; margin-top: 48px; padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner a { color: #fff; }

/* ---------- focus / a11y ---------- */
:focus-visible { outline: 3px solid #5b8fc7; outline-offset: 2px; }
img { max-width: 100%; height: auto; }

/* ---------- SVG flow (各票の役割) ---------- */
.flow-svg { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }

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

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle-label, .cta-row, .download-section, .hero .template-preview { display: none !important; }
  body { background: #fff; font-size: 12pt; color: #000; }
  .section, .section.soft { padding: 12pt 0; border: none; }
  a { color: #000; text-decoration: underline; }
  .info-panel, .download-panel, .faq-panel, .notice-panel, .trust-panel, .dcard, .target-card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  table { min-width: 0; }
}
