/* PolyForge Code review copy. System fonts only; nothing loads from the web. */
:root {
  --ink: #1d2430; --muted: #556070; --paper: #ffffff; --wash: #f3f6fa;
  --line: #d5dce6; --accent: #1f5fbf; --accent-ink: #ffffff;
  --good: #1e7a3c; --good-wash: #e6f4ea; --warn: #8a5a00; --warn-wash: #fff4dc;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: var(--ink); background: var(--wash);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.5; font-size: 17px; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }

header.site { background: var(--paper); border-bottom: 1px solid var(--line); }
header.site .in, main, footer.site .in { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header.site .in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
nav a { margin-left: 14px; }
main { padding-top: 20px; padding-bottom: 40px; }
footer.site { color: var(--muted); font-size: 0.9rem; padding: 20px 0 30px; }
h1 { font-size: 1.7rem; margin: 0 0 6px; }
h2 { font-size: 1.25rem; margin: 22px 0 8px; }
.lead { color: var(--muted); margin: 0 0 16px; max-width: 62ch; }

/* Project board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 0; list-style: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card a.open { margin-top: auto; align-self: flex-start; }
.meta { color: var(--muted); font-size: 0.9rem; }
.chip { display: inline-block; font-size: 0.8rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--wash); }
.chip.doing { background: var(--warn-wash); border-color: #e9c46a; color: var(--warn); }
.chip.done { background: var(--good-wash); border-color: #8fd19e; color: var(--good); }
.start-here { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; color: var(--muted); }

/* Buttons */
.btn { font: inherit; font-size: 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 8px 14px; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.small { min-height: 36px; padding: 4px 10px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Project page */
.layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h2 { margin-top: 0; }
ol.steps { padding-left: 1.4em; margin: 0; }
ol.steps li { margin-bottom: 6px; }
dl.terms { margin: 0; }
dl.terms dt { font-weight: 700; }
dl.terms dd { margin: 0 0 6px; }
.hint { background: var(--warn-wash); border-left: 4px solid #e9c46a; padding: 6px 10px; margin: 6px 0; border-radius: 4px; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.palette .btn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }
textarea.editor { width: 100%; min-height: 300px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.45; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; color: var(--ink); tab-size: 2; }
.editor-help { color: var(--muted); font-size: 0.85rem; margin: 4px 0 10px; }
.preview { width: 100%; height: 360px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.preview.p5 { height: 440px; }
.output { min-height: 160px; max-height: 360px; overflow: auto; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; white-space: pre-wrap; }
.result { margin-top: 10px; padding: 10px 14px; border-radius: 8px; display: none; }
.result.show { display: block; }
.result.good { background: var(--good-wash); border: 1px solid #8fd19e; }
.result.try { background: var(--warn-wash); border: 1px solid #e9c46a; }
.result ul { margin: 6px 0 0; padding-left: 1.2em; }
.celebrate { font-size: 1.4rem; font-weight: 700; color: var(--good); }
@media (prefers-reduced-motion: no-preference) {
  .celebrate { animation: pop 0.5s ease-out; }
  @keyframes pop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
}
.pending { background: var(--warn-wash); border: 1px dashed #e9c46a; border-radius: 8px; padding: 12px; }

/* Parent page */
table { border-collapse: collapse; width: 100%; background: var(--paper); }
th, td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
th { background: var(--wash); }
@media print { header.site nav, .noprint { display: none; } body { background: #fff; } }
