:root {
  color-scheme: light;
  --ink: #192722;
  --muted: #50615a;
  --surface: #fff;
  --canvas: #f5f7f3;
  --line: #d6e1d9;
  --green: #214d3c;
  --pale: #edf4ef;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 20px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, textarea { font: inherit; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #a56826; outline-offset: 3px; }
.shell { width: min(100% - 40px, 1080px); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--green); color: #fff; font-size: 14px; }
.nav-link { font-size: 14px; font-weight: 650; }
.intro { padding: 40px 0 23px; }
.intro h1 { margin: 0; font-size: clamp(34px, 6vw, 53px); line-height: 1.08; letter-spacing: -.055em; }
.intro p { margin: 10px 0 0; max-width: 660px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.input-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(215px, .37fr); }
.input-panel form, .format, .result-panel { padding: 22px; }
.format { border-left: 1px solid var(--line); background: #f9fbf9; border-radius: 0 var(--radius) var(--radius) 0; }
.format h2 { font-size: 17px; }
.format dl { display: grid; gap: 12px; margin: 14px 0 16px; }
.format dt { font-weight: 680; font-size: 14px; }
.format dd { margin: 0; color: var(--muted); font-size: 13px; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; line-height: 1.3; }
.muted { color: var(--muted); font-size: 14px; margin: 8px 0; }
.bar, .actions, .form-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar, .form-footer { justify-content: space-between; }
textarea {
  display: block; width: 100%; min-height: 160px; resize: vertical; margin: 12px 0;
  border: 1px solid #a4b2a9; border-radius: 10px; padding: 12px;
  background: #fbfcfa; color: var(--ink); font: 14px/1.65 Consolas, "Courier New", monospace;
}
textarea::placeholder { color: #53645a; opacity: 1; }
select, button { min-height: 42px; border-radius: 8px; }
select { padding: 4px 8px; border: 1px solid #9fac9f; background: #fff; color: var(--ink); }
button { padding: 7px 13px; font-weight: 680; cursor: pointer; }
button:disabled { opacity: .56; cursor: not-allowed; }
.primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.primary:not(:disabled):hover { background: #173a2c; }
.secondary { background: #f5f9f5; color: var(--green); border: 1px solid #a9bcb0; }
.secondary:not(:disabled):hover { background: var(--pale); }
.week-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
#column-details { margin: 0 0 12px; color: var(--green); }
summary { cursor: pointer; font-weight: 680; }
.column-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.column-fields label { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13px; color: var(--ink); }
.column-fields select { max-width: 100%; }
.error { color: #953a24; margin-bottom: 0; }
.result-panel { margin-top: 16px; }
.scroll-table { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; margin-top: 12px; }
table { width: 100%; border-spacing: 0; text-align: left; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; min-width: 90px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; vertical-align: top; }
th { position: sticky; top: 0; background: var(--pale); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tbody tr:focus-within td { background: #f5f9f5; }
#review-table th:first-child, #review-table td:first-child { min-width: 43px; }
#review-table th:nth-child(3), #review-table td:nth-child(3) { min-width: 190px; }
#review-table td:nth-child(n+4) { min-width: 106px; max-width: 280px; overflow-wrap: break-word; white-space: pre-wrap; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0; accent-color: var(--green); }
.notes { margin: 20px 0 0; padding: 12px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.notes summary { color: var(--green); }
.notes p { max-width: 760px; }
.footer { margin-top: 20px; padding: 12px 0 26px; color: var(--muted); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); }
  .intro { padding-top: 29px; }
  .input-panel { display: block; }
  .input-panel form, .format, .result-panel { padding: 16px; }
  .format { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  .format dl { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
}
