/* お店のWeb準備室 の見た目一式（サイト固有）。
   白・炭・コバルト。角丸カード・グラデーションヒーロー・バッジは使わない。
   罫線と要件票のような整列で構成する。余白は8pxを基準単位にする。 */

:root {
  --ink: #1c1f24;
  --ink-soft: #383e47;
  --muted: #5b6470;
  --paper: #ffffff;
  --surface: #f4f5f7;
  --line: #d7dbe2;
  --line-strong: #1c1f24;
  --accent: #0b3ee0;
  --accent-dark: #082a9e;
  --accent-soft: #e8edfc;
  --radius: 2px;
  --container: 1120px;
  --font: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Source Han Code JP", monospace;
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-2) 0;
  position: relative;
}
.logo { display: flex; align-items: center; gap: var(--sp-1); text-decoration: none; color: var(--ink); min-width: 0; }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .95rem; border-radius: var(--radius);
}
.logo-text { font-weight: 700; font-size: 1rem; color: var(--ink); letter-spacing: -.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 var(--sp-1); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 var(--sp-1); color: var(--ink); text-decoration: none;
  font-size: .92rem; font-weight: 700;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 5px auto; }

/* ===== Layout ===== */
main { min-height: 60vh; }
.page { padding: var(--sp-5) var(--sp-3) var(--sp-6); max-width: 720px; margin: 0 auto; }
.page-wide { padding: var(--sp-4) var(--sp-3) var(--sp-6); max-width: var(--container); margin: 0 auto; }
.page h1, .page-wide h1 {
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.4; margin: 0 0 var(--sp-2); font-weight: 700; letter-spacing: -.01em;
}
.page h2, .page-wide h2 {
  font-size: 1.15rem; font-weight: 700; margin: var(--sp-4) 0 var(--sp-2);
  padding-bottom: var(--sp-1); border-bottom: 1px solid var(--line-strong);
}
.page h3 { font-size: 1rem; font-weight: 700; margin: var(--sp-3) 0 var(--sp-1); }
.lead { color: var(--ink-soft); font-size: 1rem; }
.note { font-size: .85rem; color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px;
  padding: 0 var(--sp-2); border: 1px solid var(--ink); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* ===== Article body ===== */
.article-body p { margin: var(--sp-2) 0; }
.article-body ul, .article-body ol { margin: var(--sp-2) 0; padding-left: 1.3rem; }
.article-body li { margin: .4rem 0; }
.article-body strong { color: var(--ink); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body table {
  display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; font-size: .92rem;
}
.article-body th, .article-body td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; min-width: 9rem; }
.article-body th { background: var(--surface); font-weight: 700; }

/* ===== Printable worksheet (project brief) ===== */
.article-body table.brief-sheet { display: table; overflow: visible; table-layout: fixed; }
.brief-sheet caption { caption-side: top; text-align: left; font-weight: 700; padding: 0 0 var(--sp-1); }
.article-body .brief-sheet th, .article-body .brief-sheet td { min-width: 0; vertical-align: top; }
.brief-sheet thead th:nth-child(1) { width: 7.5rem; }
.brief-sheet thead th:nth-child(2) { width: 36%; }
.brief-sheet tbody th { white-space: nowrap; }
.brief-sheet tbody td:nth-child(2) { font-size: .85rem; color: var(--ink-soft); }
.brief-sheet tbody td:last-child { height: 6.5rem; background: #fff; }

@media (max-width: 600px) {
  .brief-sheet thead { display: none; }
  .brief-sheet, .brief-sheet tbody, .brief-sheet tr, .brief-sheet th, .brief-sheet td { display: block; width: 100%; }
  .brief-sheet tr { margin-bottom: var(--sp-2); }
  .brief-sheet tbody th { white-space: normal; }
  .brief-sheet tbody td:last-child { height: 5rem; }
}

@media print {
  @page { margin: 12mm; }
  body { font-size: 10.5pt; line-height: 1.6; }
  .site-header, .site-footer, .breadcrumb, .related, .cta, .nav-toggle { display: none !important; }
  .page, .page-wide { max-width: none; padding: 0; }
  a { color: var(--ink); text-decoration: none; }
  .brief-sheet, .brief-sheet tbody, .brief-sheet tr { display: revert; width: auto; }
  .brief-sheet thead { display: table-header-group; }
  .brief-sheet th, .brief-sheet td { display: table-cell; }
  .brief-sheet tr { break-inside: avoid; }
  .brief-sheet tbody td:last-child { height: 24mm; }
}

/* ===== Article list ===== */
.article-list { list-style: none; padding: 0; margin: var(--sp-2) 0 0; border-top: 1px solid var(--line); }
.article-list li { border-bottom: 1px solid var(--line); padding-bottom: var(--sp-2); }
.article-list a.title {
  display: block; padding: var(--sp-2) 0 .2rem;
  font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1rem;
}
.article-list a.title:hover { color: var(--accent); text-decoration: underline; }
.article-list .meta { color: var(--muted); font-size: .8rem; font-family: var(--mono); }

/* ===== Info tables ===== */
.info-table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; font-size: .92rem; }
.info-table th, .info-table td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: left; vertical-align: top; }
.info-table th { background: var(--surface); white-space: nowrap; font-weight: 700; width: 8rem; }

/* ===== Byline / ad disclosure ===== */
.byline { font-size: .88rem; color: var(--muted); margin: 0 0 var(--sp-2); }
.byline a { color: var(--accent); }
.ad-disclosure {
  font-size: .82rem; line-height: 1.7; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-3);
}

/* ===== Related / CTA ===== */
.related { margin: var(--sp-4) 0 0; padding-top: var(--sp-2); border-top: 1px solid var(--line-strong); }
.related h2 { font-size: 1.02rem; margin: 0 0 var(--sp-2); border-bottom: none; padding-bottom: 0; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.related li:last-child { border-bottom: 0; }
.related a { color: var(--ink); text-decoration: none; }
.related a:hover { color: var(--accent); text-decoration: underline; }
.cta { margin-top: var(--sp-3); padding: var(--sp-2); border: 1px solid var(--line); background: var(--surface); }
.cta p { margin: 0; }

/* ===== Requirement / decision sheet (top page) ===== */
.sheet-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-3) 0 var(--sp-2); border-bottom: 2px solid var(--line-strong);
  flex-wrap: wrap;
}
.sheet-head h1 { margin: 0; }
.sheet-head .sheet-tag { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

.decision-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-5); margin-top: var(--sp-3); align-items: start; }

.decision-list { border-top: 1px solid var(--line-strong); }
.decision-row {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: var(--sp-2);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.decision-row .num { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding-top: .2rem; }
.decision-row h2 { margin: 0 0 .3rem; padding: 0; border: 0; font-size: 1.08rem; }
.decision-row p { margin: 0 0 var(--sp-1); color: var(--ink-soft); font-size: .94rem; }
.decision-row .decision-meta { font-size: .82rem; color: var(--muted); margin: 0 0 var(--sp-1); }
.decision-row a.decision-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-2);
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.decision-row a.decision-cta:hover { background: var(--ink); color: #fff; }

.aux-panel { border: 1px solid var(--line-strong); padding: var(--sp-2); background: var(--surface); }
.aux-panel h2 { margin: 0 0 var(--sp-2); padding-bottom: var(--sp-1); border-bottom: 1px solid var(--line); font-size: 1rem; }
.aux-panel ul { list-style: none; margin: 0; padding: 0; }
.aux-panel li { border-bottom: 1px solid var(--line); padding: var(--sp-1) 0; }
.aux-panel li:last-child { border-bottom: 0; }
.aux-panel a { color: var(--ink); font-weight: 700; text-decoration: none; font-size: .92rem; }
.aux-panel a:hover { color: var(--accent); text-decoration: underline; }
.aux-panel p.aux-desc { margin: .2rem 0 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 760px) {
  .decision-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
}

/* ===== Requirement worksheet lists (hub pages) ===== */
.req-list { border-top: 1px solid var(--line-strong); margin: var(--sp-2) 0; }
.req-item { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.req-item h3 { margin: 0 0 .3rem; font-size: 1rem; }
.req-item p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.req-item .req-why { margin-top: .3rem; font-size: .85rem; color: var(--muted); }

/* ===== Tool form (fieldset-based checklist) ===== */
.tool-form { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-2) var(--sp-3); background: var(--surface); border: 1px solid var(--line-strong); }
.tool-fieldset { margin: 0 0 var(--sp-3); padding: 0; border: 0; min-width: 0; }
.tool-fieldset legend { padding: 0; font-weight: 700; font-size: 1rem; }
.tool-hint { margin: .2rem 0 .6rem; color: var(--muted); font-size: .85rem; }
.tool-field-error { margin: 0 0 .5rem; color: var(--accent-dark); font-size: .88rem; font-weight: 700; }
.tool-fieldset.is-invalid .tool-option { border-color: var(--accent); }
.tool-options { display: grid; gap: .5rem; }
.tool-option {
  display: flex; align-items: center; gap: var(--sp-1); min-height: 44px;
  padding: .5rem .8rem; background: #fff; border: 1px solid var(--line);
  cursor: pointer; font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere;
}
.tool-option input { flex-shrink: 0; width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); }
.tool-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tool-option input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem var(--sp-2); }
.tool-submit { font-family: inherit; cursor: pointer; }
.tool-submit:disabled { cursor: not-allowed; opacity: .6; }
.tool-error {
  margin: var(--sp-2) 0; padding: .8rem 1rem; background: var(--accent-soft);
  border: 1px solid var(--accent); color: var(--accent-dark); font-size: .9rem;
}
.tool-error ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.tool-error a { color: var(--accent-dark); }
.tool-result { margin: var(--sp-4) 0 0; }
.tool-status { font-weight: 700; }
.tool-block { border-top: 1px solid var(--line); padding: .4rem 0 var(--sp-2); }
.tool-block:last-child { border-bottom: 1px solid var(--line); }
.tool-block h3 { margin: .9rem 0 .5rem; }
.tool-sub { margin: .8rem 0 .2rem; font-size: .85rem; font-weight: 700; color: var(--muted); }
.tool-block p { margin: .3rem 0; }
.tool-block ul { margin: .3rem 0; padding-left: 1.2rem; }
.tool-block li { margin: .35rem 0; overflow-wrap: anywhere; }
.tool-jump { display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); margin-top: .2rem; }
.tool-jump a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.tool-noscript { margin: var(--sp-2) 0; padding: .8rem 1rem; border: 1px solid var(--line); background: var(--surface); font-size: .92rem; }

@media (max-width: 480px) {
  .tool-form { padding: var(--sp-2) var(--sp-1) var(--sp-3); }
}

/* ===== Footer ===== */
.site-footer { border-top: 2px solid var(--line-strong); margin-top: var(--sp-6); }
.footer-top { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) 0 var(--sp-2); flex-wrap: wrap; }
.footer-brand .logo-text { color: var(--ink); font-weight: 700; }
.footer-desc { color: var(--muted); font-size: .88rem; max-width: 40ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .3rem var(--sp-2); }
.footer-nav a { color: var(--ink); text-decoration: none; font-size: .88rem; min-height: 44px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-notice { color: var(--muted); font-size: .8rem; padding: var(--sp-2) 0 0; border-top: 1px solid var(--line); }
.footer-copy { color: var(--muted); font-size: .8rem; padding: var(--sp-2) 0 var(--sp-4); }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .header-inner { padding: .6rem var(--sp-2); }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line-strong); flex-direction: column; padding: .6rem var(--sp-2); z-index: 20; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .footer-top { flex-direction: column; }
}
