/* Ship It | minimalist rebuild (2026-09-12).
   One column, one accent (orange) plus teal for completion ticks and links.
   Mobile-first: base styles are for 320px, then breakpoints turn the week list
   into one row (760px) and then a rail beside the week panel (1000px). */

:root {
  --ink: #0b1b3d;
  --body: #4e5a6b;
  --muted: #6b7280;
  --line: #e5e5e0;
  --line-soft: #efefeb;
  --page: #fbfaf7;
  --card: #ffffff;
  --orange: #f05a24;
  --orange-ink: #c2521b;
  --orange-tint: #fff5f0;
  --teal-ink: #0f7d76;
  --radius: 14px;
  --maxw: 760px;
  --maxw-wide: 1000px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 16px/1.6 var(--sans);
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }

.label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}

/* ---------- hero (this IS the header now: the heading carries the brand, there is no
   separate logo lockup) ---------- */

.hero { padding: 44px 0 4px; }
/* One line at every width tested from 320px up. Deliberately NOT nowrap: if a viewport is
   narrower than the clamp can serve, the headline wraps rather than forcing the page into
   horizontal scroll. */
h1 { font-size: clamp(23px, 7vw, 46px); font-weight: 800; letter-spacing: -.035em; }
/* the brand inside the heading: dark "Ship", brand-red "It" */
h1 em { font-style: normal; color: var(--orange); }
.lede { margin: 16px 0 0; color: var(--body); }

/* ---------- the sprint ---------- */

.sprint { padding: 36px 0 0; }
.progress { font-size: 13px; color: var(--muted); }
/* shown only when the page was opened from a DomainRiff riff page (?riff=) */
.handoff { margin-top: 4px; font-size: 13px; color: var(--body); }
.sprint-body { margin-top: 12px; }

.weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wk {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 46px; padding: 0 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--body); text-decoration: none;
}
.wk:hover { border-color: #d5d5cf; color: var(--ink); }
.wk[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
/* a locked week can still be opened and read; it just cannot be ticked yet */
.wk.is-locked:not([aria-current="true"]) { background: #f6f7f9; border-color: #ebedf0; color: var(--muted); }
.wk.is-locked::after {
  content: ""; flex: none; width: 11px; height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7.5a4 4 0 0 1 8 0V10'/%3E%3C/svg%3E") no-repeat center / contain;
}
.wk[aria-current="true"].is-locked::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9c2cf' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7.5a4 4 0 0 1 8 0V10'/%3E%3C/svg%3E");
}
.tick { color: var(--teal-ink); font-weight: 700; }
.wk[aria-current="true"] .tick { color: #86e0da; }

.week { margin-top: 14px; }
/* sits directly above the tasks it explains, inside the week card */
.lock-note {
  display: flex; align-items: center; gap: 7px;
  margin: 16px 0 0; font-size: 13.5px; color: var(--muted);
}
.lock-note::before {
  content: ""; flex: none; width: 13px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7.5a4 4 0 0 1 8 0V10'/%3E%3C/svg%3E") no-repeat center / contain;
}
.wpanel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px 18px; scroll-margin-top: 24px;
}
.wp-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wpanel h3 { margin-top: 6px; font-size: clamp(21px, 5.2vw, 26px); }
.out { margin-top: 8px; color: var(--body); font-size: 15px; }

.tasks { list-style: none; margin: 20px 0 0; padding: 0; }
.tasks li { border-top: 1px solid var(--line-soft); }
.tasks label { display: flex; align-items: flex-start; gap: 12px; min-height: 54px; padding: 14px 2px; cursor: pointer; font-size: 15px; }
.tasks input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 24px; height: 24px; margin: 0;
  background: #fff; border: 2px solid #8a94a3; border-radius: 7px; cursor: pointer;
}
.tasks input[type="checkbox"]:checked {
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2310203a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3 8.6 6.3 12 13 4.4'/%3E%3C/svg%3E") center / 15px no-repeat;
  border-color: var(--orange);
}
.tasks input[type="checkbox"]:checked + span { color: var(--muted); }
.tasks input[type="checkbox"]:disabled {
  background: #f1f2f4; border-color: #d5d9df; cursor: default;
}
.wpanel.is-locked .tasks label { color: var(--muted); cursor: default; }

.checkpoint {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 14.5px; color: var(--ink);
}
.cp { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); }

.agent { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 4px; }
.agent summary { display: flex; align-items: center; min-height: 46px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--teal-ink); }
.agent summary:hover { color: var(--orange-ink); }
.agent pre {
  margin: 12px 0 14px; padding: 16px; background: #f4f6f9; border: 1px solid var(--line-soft);
  border-radius: 10px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: break-word; color: var(--body);
}
.btn-copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; margin-bottom: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.btn-copy:hover { border-color: var(--orange); color: var(--orange-ink); }

.reset-row { margin-top: 16px; text-align: right; }
.btn-reset {
  min-height: 44px; padding: 0 14px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 13px; color: var(--muted); cursor: pointer;
}
.btn-reset:hover { border-color: #d5d5cf; color: var(--body); }
.btn-reset.is-armed { background: var(--orange-tint); border-color: var(--orange); color: var(--orange-ink); font-weight: 600; }

/* ---------- ground rules ---------- */

.rules { padding: 46px 0 0; }
/* The full-width list (no ch cap) is what keeps each rule on ONE line on a desktop:
   the longest rule measures ~770px and the desktop column is 960px inside the wrap. */
.rule-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.rule-list li { font-size: 14.5px; color: var(--body); }
.rule-list strong { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

.site-foot { margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 2px 20px; font-size: 13.5px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--body); }
.foot-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); max-width: 72ch; }
.foot-note + .foot-note { margin-top: 6px; }

/* ---------- copy feedback ---------- */

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  margin: 0; padding: 10px 18px; background: var(--ink); color: #fff;
  border-radius: 999px; font-size: 13px; box-shadow: 0 10px 24px -12px rgba(6, 32, 60, .5);
}

/* ---------- breakpoints ---------- */

@media (min-width: 600px) {
  .wpanel { padding: 26px 26px 22px; }
}

@media (min-width: 760px) {
  .weeks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sprint { padding-top: 52px; }
  /* Every rule on one line in a desktop window, however narrow it is: below 1000px the
     column is capped at 720px of text, so the longest rule (118 chars) needs ~13px. */
  .rule-list li { font-size: clamp(13px, 1.45vw, 14.5px); }
}

/* Desktop: the page keeps its single column of type, but the sprint itself gets the
   width it needs - the week list becomes a rail beside the week panel instead of a
   row above it, which is the same one switcher in a different shape. */
@media (min-width: 1000px) {
  .wrap { max-width: var(--maxw-wide); }
  .sprint-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .weeks { grid-template-columns: 1fr; gap: 6px; }
  .wk { justify-content: flex-start; padding: 0 14px; font-size: 13.5px; }
  .wk .tick { margin-left: auto; }
  .wk.is-locked::after { margin-left: auto; }
  .week { margin-top: 0; }
  .wpanel { padding: 26px 28px 22px; }
}

@media print {
  .btn-copy, .agent, .reset-row, .toast { display: none; }
  body { background: #fff; }
  .wpanel { border-color: #ccc; break-inside: avoid; }
}
