/* claude-env-check distribution page: "inspection sheet" style */
:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --sheet: #fbf9f4;
  --ink: #1d2328;
  --ink-2: #4a535b;
  --rule: #c9c0ae;
  --rule-strong: #1d2328;
  --ok: #2d6a45;
  --ok-bg: #e2eee4;
  --warn: #b5401f;
  --warn-bg: #f6e3da;
  --wait: #8a6512;
  --wait-bg: #f3ead2;
  --na: #5b636b;
  --na-bg: #e6e4df;
  --link: #1d4e7a;
  --code-bg: #e9e3d6;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15191c;
    --paper-2: #1b2024;
    --sheet: #1e2428;
    --ink: #e7e2d6;
    --ink-2: #aab1b6;
    --rule: #39424a;
    --rule-strong: #e7e2d6;
    --ok: #7cc493;
    --ok-bg: #1f3428;
    --warn: #f08a63;
    --warn-bg: #3a231a;
    --wait: #e2bb5d;
    --wait-bg: #352c16;
    --na: #a7aeb4;
    --na-bg: #2a3035;
    --link: #8cbce6;
    --code-bg: #262d32;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--paper-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-2) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, .dl-card:focus-visible { outline: 3px solid var(--warn); outline-offset: 3px; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  word-break: break-all;
}
.nw { white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--sheet); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ---------- header: the form ---------- */
.sheet-head {
  background: var(--sheet);
  border-bottom: 3px double var(--rule-strong);
  padding: 40px 0 36px;
}
.form-no {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px; margin-bottom: 24px;
}
h1 {
  font-size: clamp(28px, 5.4vw, 46px);
  font-weight: 900;
  line-height: 1.3;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}
.h1-sub {
  display: block;
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 500;
  color: var(--ink-2);
  margin-top: 6px;
}
.lead { font-size: clamp(16px, 2.1vw, 18px); max-width: 40em; margin: 0 0 28px; }

.form-fields { margin: 0; border-top: 2px solid var(--rule-strong); }
.form-fields > div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  border-bottom: 1px solid var(--rule);
}
.form-fields dt {
  font-weight: 700; font-size: 14px;
  padding: 10px 12px;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
}
.form-fields dd { margin: 0; padding: 10px 14px; }

/* stamps */
.stamp {
  display: inline-block;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 1px 9px 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: rotate(-3deg);
  margin-right: 6px;
  white-space: nowrap;
}
.stamp-ok { color: var(--ok); }
.stamp-warn { color: var(--warn); }

/* ---------- sections ---------- */
main section { padding: 56px 0 8px; }
.sec {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 900;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rule-strong);
}
.sec-no {
  font-size: 0.6em; font-weight: 600;
  color: var(--sheet); background: var(--ink);
  padding: 2px 8px; border-radius: 3px;
  flex: none;
}
section p { margin: 0 0 16px; }
.note { font-size: 15px; color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-2); }
h3.sub { font-size: 19px; margin: 36px 0 8px; }

/* ---------- download ---------- */
.dl .wrap { position: relative; }
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0 18px;
}
.dl-card {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  background: var(--sheet);
  border: 2px solid var(--rule-strong);
  padding: 22px 22px 20px;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 5px 5px 0 var(--rule-strong);
}
.dl-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--rule-strong); }
.dl-card:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--rule-strong); }
.dl-os { font-size: 24px; font-weight: 900; }
.dl-meta { font-size: 12px; color: var(--ink-2); }
.dl-desc { font-size: 15px; margin-bottom: 10px; }
.dl-btn {
  justify-self: start;
  background: var(--ink); color: var(--sheet);
  font-weight: 700; font-size: 15px;
  padding: 8px 18px 9px;
  border-radius: 3px;
}
.dl-btn::after { content: " ↓"; font-family: var(--font-mono); }

/* ---------- part tables ---------- */
.part {
  background: var(--sheet);
  border: 1px solid var(--rule);
  margin: 26px 0;
}
.part-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 14px 18px;
  border-bottom: 2px solid var(--rule-strong);
}
.part-tag {
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--ink); padding: 1px 8px;
}
.part-head h3 { margin: 0; font-size: 19px; font-weight: 700; flex: 1 1 18em; }

table { border-collapse: collapse; width: 100%; }
.check th, .check td, .files th, .files td {
  text-align: left; vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
}
.check thead th, .files thead th {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  background: var(--paper-2);
  padding: 7px 14px;
}
.check tbody th { font-weight: 700; width: 11em; }
.check .c-no { width: 4.2em; color: var(--ink-2); font-size: 13px; }
.check tbody tr:last-child > * { border-bottom: 0; }

/* ---------- flow ---------- */
.flow {
  list-style: none; padding: 0; margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 2px solid var(--rule-strong);
  background: var(--sheet);
}
.flow li {
  position: relative;
  padding: 14px 10px 16px;
  border-right: 1px dashed var(--rule);
  display: grid; align-content: start; gap: 4px;
}
.flow li:last-child { border-right: 0; }
.flow-no {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%;
  font-size: 13px; font-weight: 600;
}
.flow-name { font-weight: 700; font-size: 15px; line-height: 1.5; }
.flow-desc { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.flow-gate { background: var(--warn-bg); }
.flow-gate .flow-no { background: var(--warn); border-color: var(--warn); color: var(--sheet); }
.flow-gate .flow-name { color: var(--warn); }

/* ---------- how to ---------- */
.howto { display: grid; gap: 18px; margin-top: 22px; }
.how {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--ink);
  padding: 18px 22px 8px;
}
.how h3 { margin: 0 0 4px; font-size: 19px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.how-no { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.how-for { color: var(--ink-2); font-size: 15px; }
.how ol { margin: 0 0 14px; padding-left: 1.4em; }
.how li { margin-bottom: 4px; }
.paths p { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.os-chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  border: 1px solid var(--ink-2); color: var(--ink-2);
  padding: 0 7px; border-radius: 2px;
  white-space: nowrap;
}
.cmd {
  margin: 0 0 12px;
  background: var(--code-bg);
  padding: 10px 12px;
  border-radius: 3px;
  white-space: pre-wrap;
  font-size: 13px;
}
.cmd code { background: none; padding: 0; display: block; margin-top: 6px; }

.say {
  margin-top: 22px;
  border: 2px dashed var(--rule-strong);
  padding: 16px 22px 10px;
}
.say-head { font-weight: 700; margin-bottom: 6px !important; }
.say ul { margin: 0 0 8px; padding-left: 1.2em; }

/* ---------- promises ---------- */
.promise { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: p; }
.promise li {
  counter-increment: p;
  position: relative;
  padding: 12px 14px 12px 3.4em;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
}
.promise li:first-child { border-top: 2px solid var(--rule-strong); }
.promise li::before {
  content: "×";
  position: absolute; left: 14px; top: 11px;
  width: 24px; height: 24px; display: grid; place-items: center;
  font-weight: 900; color: var(--warn);
  border: 2px solid var(--warn); border-radius: 50%;
  font-size: 14px; line-height: 1;
}
.promise strong { font-weight: 700; }

/* ---------- report ---------- */
.report { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.r-col { background: var(--sheet); border: 1px solid var(--rule); padding: 14px 18px 8px; }
.r-head { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px !important; }
.r-list { list-style: none; padding: 0; margin: 0; }
.r-list li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tag { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 2px; white-space: nowrap; }
.t-ok { color: var(--ok); background: var(--ok-bg); }
.t-warn { color: var(--warn); background: var(--warn-bg); }
.t-wait { color: var(--wait); background: var(--wait-bg); }
.t-na { color: var(--na); background: var(--na-bg); }

.tick { list-style: none; padding: 0; margin: 12px 0 0; background: var(--sheet); border: 1px solid var(--rule); }
.tick li { position: relative; padding: 10px 14px 10px 3em; border-bottom: 1px solid var(--rule); }
.tick li:last-child { border-bottom: 0; }
.tick li::before {
  content: "";
  position: absolute; left: 14px; top: 14px;
  width: 18px; height: 18px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

/* ---------- files / faq ---------- */
.files { background: var(--sheet); border: 1px solid var(--rule); margin-top: 18px; }
.files td:first-child { width: 17em; }
.sums .sum { font-size: 11px; word-break: break-all; }
.faq { margin: 18px 0 0; }
.faq dt { font-weight: 700; padding: 14px 0 4px; border-top: 1px solid var(--rule); }
.faq dt::before { content: "Q. "; font-family: var(--font-mono); color: var(--ink-2); }
.faq dd { margin: 0 0 6px; padding-left: 1.6em; color: var(--ink); }

/* ---------- footer ---------- */
.foot {
  margin-top: 64px;
  border-top: 3px double var(--rule-strong);
  background: var(--sheet);
  padding: 22px 0 36px;
  font-size: 13px; color: var(--ink-2);
}
.foot p { margin: 0 0 6px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sheet-head .wrap > * { animation: rise .5s ease both; }
  .sheet-head .wrap > *:nth-child(2) { animation-delay: .06s; }
  .sheet-head .wrap > *:nth-child(3) { animation-delay: .12s; }
  .sheet-head .wrap > *:nth-child(4) { animation-delay: .18s; }
  .stamp { animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: .5s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes stamp { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } to { opacity: 1; transform: rotate(-3deg); } }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow li {
    grid-template-columns: 26px 1fr;
    column-gap: 12px;
    border-right: 0;
    border-bottom: 1px dashed var(--rule);
    padding: 12px 14px;
  }
  .flow li:last-child { border-bottom: 0; }
  .flow-no { grid-row: span 2; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .sheet-head { padding: 28px 0 26px; }
  .form-fields > div { grid-template-columns: 1fr; }
  .form-fields dt { border-right: 0; padding: 6px 12px; }
  .dl-grid, .report { grid-template-columns: 1fr; }
  main section { padding-top: 44px; }
  .check thead { display: none; }
  .check tr { display: grid; grid-template-columns: 3.6em 1fr; border-bottom: 1px solid var(--rule); }
  .check tbody tr:last-child { border-bottom: 0; }
  .check td, .check th { border-bottom: 0; padding: 8px 12px; }
  .check .c-no { grid-row: span 2; width: auto; padding-top: 10px; }
  .check tbody th { width: auto; padding-bottom: 0; }
  .check tbody td:last-child { padding-top: 2px; font-size: 15px; }
  .files td:first-child { width: auto; }
  .files tr { display: grid; border-bottom: 1px solid var(--rule); }
  .files thead { display: none; }
  .files td { border-bottom: 0; padding: 6px 12px; }
  .files td:first-child { padding-top: 10px; }
  .files td:last-child { padding-bottom: 10px; font-size: 15px; }
}

@media print {
  body { background: #fff; }
  .dl-card { box-shadow: none; }
  .stamp { animation: none; }
}
