:root {
  --ink: #2b302d;
  --muted: #626963;
  --line: #d9d9d1;
  --paper: #f5f2ec;
  --white: #fffdf9;
  --ok: #426151;
  --ok-soft: #e3eee8;
  --wait: #845248;
  --wait-soft: #f4e5df;
  --sans: "DM Sans", "Gowun Dodum", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.7 var(--sans); }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ok); outline-offset: 4px; }
header {
  display: grid;
  min-height: 70px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
header a { color: var(--muted); font-size: 13px; text-decoration: none; }
header a:last-child { text-align: right; }
header strong { font-size: 14px; letter-spacing: .08em; }
header small { margin-left: 6px; color: var(--muted); font-size: 12px; }
main { width: min(1100px, calc(100% - 40px)); margin: auto; padding: clamp(36px, 6vw, 68px) 0 80px; }
.heading { margin-bottom: 28px; }
.heading > p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.heading h1 { margin: 10px 0 12px; font-size: clamp(28px, 4vw, 42px); font-weight: 500; line-height: 1.3; letter-spacing: -.04em; }
.heading > span { display: block; max-width: 740px; color: var(--muted); word-break: keep-all; }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 22px; }
#checked-at { color: var(--muted); font-size: 13px; }
#refresh { min-height: 42px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); cursor: pointer; }
#refresh:disabled { cursor: wait; opacity: .6; }
.notice, .readiness-summary { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.notice.error, .error-copy { color: var(--wait); }
.notice.error { background: var(--wait-soft); }
.readiness-summary { background: #edf0e9; line-height: 1.8; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 36px; }
.quick-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); text-decoration: none; font-size: 13px; }
section + section { margin-top: 38px; }
.section-title { margin-bottom: 14px; }
.section-title h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.5; }
.section-help, #schema-summary { margin: 0 0 16px; color: var(--muted); }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.status-card, .inventory-card, .task { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.status-card, .inventory-card { padding: 20px; }
.status-card h3, .inventory-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.status-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; word-break: keep-all; }
.status-card .configuration { color: var(--ink); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; flex: none; max-width: 100%; padding: 4px 8px; border-radius: 8px; color: var(--wait); background: var(--wait-soft); font-size: 12px; font-weight: 500; line-height: 1.5; }
.ready .badge { color: var(--ok); background: var(--ok-soft); }
.operation-count { display: block; margin-top: 6px; font-size: 25px; font-weight: 500; }
.inventory-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.inventory-stats p { margin: 0; padding: 12px; border-radius: 10px; background: #f5f3ee; }
.inventory-stats span { display: block; color: var(--muted); font-size: 13px; }
.inventory-stats strong { display: block; margin-top: 5px; font-size: 21px; font-weight: 500; }
.task-list { display: grid; gap: 12px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 20px; }
.task-marker { width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--wait); }
.task.ready .task-marker { background: var(--ok); }
.task strong { font-size: 15px; }
.task p { margin: 7px 0 0; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.task .next-step { color: var(--ink); }
.task code { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.task > .badge { justify-self: end; }
.task-link { display: inline-block; margin-top: 10px; padding: 4px 0; color: var(--ok); font-size: 13px; }
details { padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
summary { cursor: pointer; font-weight: 500; }
.schema-list { padding: 0; margin: 16px 0 0; list-style: none; }
.schema-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.schema-list strong { margin-right: 8px; font-size: 14px; }
.schema-list code { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.schema-list p { margin: 5px 0 0; color: var(--wait); font-size: 13px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  header { grid-template-columns: 1fr auto; }
  header strong { display: none; }
  main { width: calc(100% - 28px); }
  .status-grid, .inventory-grid { grid-template-columns: 1fr; }
  .status-card, .inventory-card, .task, details { padding: 16px; }
  .task { grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
  .task > .badge { grid-column: 2; justify-self: start; }
  .quick-links { gap: 7px; }
  .quick-links a { padding: 7px 11px; }
}
