/* B38 OR2 P2 — crew pages (DESIGN.md §3.2): phone first, one column, 16 px gutters, 44 px targets.
   Served from /c/_a/crew.css under `style-src 'self'`: no inline style anywhere in the crew templates. */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #17201c;
  --ink-2: #4b5650;
  --line: #d5dad6;
  --accent: #0b5d4b;
  --accent-ink: #ffffff;
  --focus: #1f6feb;
  --ok-bg: #e3f3e8;   --ok-ink: #155c2e;
  --wait-bg: #fff3d6; --wait-ink: #6b4a00;
  --bad-bg: #fde4e1;  --bad-ink: #8c1d12;
  --idle-bg: #eceeed; --idle-ink: #3d4641;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101513;
    --surface: #18201c;
    --ink: #e8ece9;
    --ink-2: #a9b3ad;
    --line: #2d3832;
    --accent: #5cc7a7;
    --accent-ink: #06231b;
    --focus: #79b0ff;
    --ok-bg: #133523;   --ok-ink: #9fe2b6;
    --wait-bg: #3a2e0d; --wait-ink: #f3d68c;
    --bad-bg: #401a16;  --bad-ink: #ffb3a8;
    --idle-bg: #232c27; --idle-ink: #c3ccc6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}
.page { max-width: 36rem; margin: 0 auto; padding: 0 16px 48px; }
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 0 8px; }
.brand-name { font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand-sub { color: var(--ink-2); font-size: 15px; }
h1 { font-size: 26px; line-height: 1.2; margin: 12px 0 8px; }
h2 { font-size: 20px; margin: 28px 0 8px; }
p { margin: 8px 0; }
.lead { color: var(--ink-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.notice { border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); }
.notice.wait { background: var(--wait-bg); color: var(--wait-ink); }
.notice strong { display: block; }
.hint { color: var(--ink-2); font-size: 15px; }

label, legend { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type="text"], input[type="email"], input[type="date"], select {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
  font: inherit;
}
input[type="checkbox"] { width: 24px; height: 24px; margin: 0 10px 0 0; flex: none; }
.tick { display: flex; align-items: center; min-height: 44px; font-weight: 400; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.code { text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: 44px; padding: 10px 18px; margin: 12px 0 0;
  border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.block, button.block { display: flex; width: 100%; }
.btn.quiet, button.quiet { background: transparent; color: var(--accent); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; margin: 0; }
button[disabled] { opacity: .6; cursor: progress; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent); }

.file-pick { position: relative; display: flex; }
.file-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-pick + .file-pick { margin-top: 8px; }
.picked { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; min-height: 1.4em; }
.is-hidden { display: none !important; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
                padding: 12px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.slot-name { font-weight: 600; flex: 1 1 12rem; }
.slot-name small { display: block; font-weight: 400; color: var(--ink-2); }
.state { display: inline-block; border-radius: 12px; padding: 4px 12px; font-size: 15px; }
.state.approved { background: var(--ok-bg); color: var(--ok-ink); }
.state.ready, .state.received, .state.attention, .state.checking { background: var(--wait-bg); color: var(--wait-ink); }
.state.rejected, .state.expired, .state.rejected_det { background: var(--bad-bg); color: var(--bad-ink); }
.state.missing, .state.superseded { background: var(--idle-bg); color: var(--idle-ink); }
.slot-actions { flex: 1 0 100%; display: flex; gap: 8px; flex-wrap: wrap; }

.uploads { list-style: none; margin: 0; padding: 0; }
.uploads li { padding: 12px 0; border-top: 1px solid var(--line); }
.uploads li:first-child { border-top: 0; }
.uploads .what { font-weight: 600; }
.uploads .when { color: var(--ink-2); font-size: 15px; }
.views { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.elig { list-style: none; margin: 0; padding: 0; }
.elig li { padding: 10px 0; border-top: 1px solid var(--line); }
.elig li:first-child { border-top: 0; }

.pending { list-style: decimal inside; padding: 0; margin: 8px 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
footer { margin-top: 32px; color: var(--ink-2); font-size: 14px; }

/* "Your profile" (ruling 134): the card at the top of my page — information only, no page image, no View link. */
.profile-card h1 { margin: 0 0 12px; }
.profile-card h2 { font-size: 18px; margin: 20px 0 8px; }
.profile-card h3 { font-size: 17px; margin: 20px 0 6px; }
.profile-card .checklist, .profile-card .counted, .profile-card .elig { margin-top: 4px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: minmax(7.5rem, 34%) 1fr; gap: 4px 12px; padding: 8px 0;
               border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--ink-2); font-weight: 400; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; }
.facts .unset { color: var(--ink-2); font-weight: 400; font-style: italic; }
.counted { list-style: none; margin: 0; padding: 0; }
.counted li { padding: 10px 0; border-top: 1px solid var(--line); }
.counted li:first-child { border-top: 0; }
.counted .what { display: block; font-weight: 600; }
.counted .dates { display: block; color: var(--ink-2); font-size: 15px; }
.print-only { display: none !important; }

/* Printed (or saved as PDF) from my page: "My crew profile" — the card alone, black on white. */
@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff; --surface: #ffffff; --ink: #000000; --ink-2: #333333; --line: #999999; --accent: #000000;
    --ok-bg: #ffffff; --ok-ink: #000000; --wait-bg: #ffffff; --wait-ink: #000000; --bad-bg: #ffffff;
    --bad-ink: #000000; --idle-bg: #ffffff; --idle-ink: #000000;
  }
  @page { margin: 15mm; }
  body { background: #ffffff; color: #000000; font-size: 11pt; }
  .page { max-width: none; padding: 0; }
  .page > :not(.brand):not(.profile-card) { display: none !important; }
  .profile-card { border: 0; padding: 0; margin: 0; }
  .screen-only, .no-print, .slot-actions, [data-print] { display: none !important; }
  span.print-only { display: inline !important; }
  p.print-only, div.print-only { display: block !important; }
  .notice, .state { border: 1px solid var(--line); }
  a { color: #000000; text-decoration: none; }
  .facts > div, .checklist li, .counted li, .elig li { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
