/* One stylesheet for both portal pages — start.html (people) and
   index.html (developers) — so the two cannot drift apart in look. */
:root {
  --bg: #f6f6f4; --card: #ffffff; --ink: #111111; --muted: #5d5d5a; --line: #e2e2dd;
  --accent: #111111; --accent-ink: #ffffff; --warn-bg: #fff4d6; --warn-ink: #6b4b00;
  --ok: #1d6b3a; --err: #a3231a; --code: #f0f0ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --card: #1b1b1b; --ink: #f2f2ef; --muted: #a3a39e; --line: #2d2d2b;
    --accent: #f2f2ef; --accent-ink: #111111; --warn-bg: #3a2f12; --warn-ink: #f5d68a;
    --ok: #6fd193; --err: #ff8a80; --code: #232322;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
main { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 0 0 4px; }
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.topbar a { color: var(--muted); font-size: 14px; white-space: nowrap; text-decoration: none; }
.topbar a:hover { color: var(--ink); text-decoration: underline; }
.lede { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 180px; }
label { display: block; font-size: 13px; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--ink);
                          background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
textarea { min-height: 56px; resize: vertical; }
select[multiple] { min-height: 140px; }
.field { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.field small, .checklist small { color: var(--muted); }
.checklist { margin-top: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.checklist-head { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.checklist-head input { margin: 0; flex: 1 1 auto; background: var(--card); }
.checklist-count { white-space: nowrap; }
button.link { background: none; color: var(--ink); padding: 0; font-weight: 400; text-decoration: underline; }
.checklist-body { max-height: 360px; overflow-y: auto; padding: 4px 10px 8px; }
.checklist-group { border: 0; margin: 0; padding: 6px 0 0; }
.checklist-group legend { padding: 0; font-weight: 600; color: var(--ink); font-size: 13px; }
.checklist-group legend small { font-weight: 400; margin-left: 4px; }
.checklist-group[hidden] { display: none; }
.checklist-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
                   gap: 2px 16px; padding: 2px 0 6px; }
.checklist-items label.check { padding: 4px 0; color: var(--ink); font-size: 14px; cursor: pointer; }
.checklist-items select.count { width: auto; margin: 0 0 0 8px; padding: 2px 4px; font-size: 13px; }
.checklist-items select.count:disabled { opacity: .35; }
.checklist-items label.check small { margin-left: auto; padding-left: 8px; font-size: 12px; white-space: nowrap; }
.checklist-items label[hidden] { display: none; }
label.check { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-bottom: 9px; }
label.check input { width: auto; margin: 0; }
button { padding: 9px 16px; font: inherit; font-weight: 600; border: 0; border-radius: 6px;
         background: var(--accent); color: var(--accent-ink); cursor: pointer; }
button:disabled { opacity: .5; cursor: progress; }
.status { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 1.5em; }
.status.err { color: var(--err); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.crop img { width: 100%; height: auto; display: block; border-radius: 6px; background: var(--code); }
.crop h3, .variant h3 { font-size: 14px; margin: 8px 0 2px; }
.meta { font-size: 12px; color: var(--muted); }
.warn { background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; border-radius: 6px; padding: 6px 8px; margin-top: 6px; }
.variant p { margin: 4px 0; }
.ok { color: var(--ok); font-size: 12px; }
pre { background: var(--code); border-radius: 6px; padding: 12px; overflow-x: auto; font-size: 12.5px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.links a { color: var(--ink); margin-right: 16px; }
.crop .actions { margin-top: 8px; }
.crop .actions button { padding: 6px 12px; font-size: 13px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
/* Adjust: the original photo fitted to the screen, a draggable box over it. */
.adjust { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.72); display: flex; flex-direction: column;
          align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.adjust-stage { position: relative; overflow: hidden; background: var(--code); border-radius: 6px; touch-action: none; user-select: none; }
.adjust-stage img { display: block; pointer-events: none; }
.adjust-box { position: absolute; box-sizing: border-box; border: 2px solid #ffffff; cursor: move; touch-action: none;
              box-shadow: 0 0 0 100vmax rgba(20,22,31,.55); }
.adjust-zone { position: absolute; background: rgba(193,85,68,.28); border: 1px dashed rgba(193,85,68,.8); pointer-events: none; }
.adjust-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; color: #f2f2ef; font-size: 13px; }
.adjust-bar label { display: flex; align-items: center; gap: 8px; color: #f2f2ef; }
.adjust-bar input[type=range] { width: 180px; margin: 0; padding: 0; background: transparent; border: 0; }
.adjust-bar .ghost { background: transparent; color: #f2f2ef; border: 1px solid rgba(255,255,255,.5); }
.adjust-bar .status { margin: 0; color: #f2f2ef; }
[hidden] { display: none !important; }
table.fields { border-collapse: collapse; margin: 12px 0; font-size: 14px; }
table.fields td { padding: 4px 12px 4px 0; vertical-align: top; }
.checklist-empty { display: block; padding: 10px; }
