/* Operations Check — mobile-first compliance checklist */

:root {
  --green: #12372c;
  --green-700: #1b4a3b;
  --green-600: #2a5c4a;
  --pale: #e7eeea;
  --pale-2: #f1f5f2;
  --cream: #f4f1e8;
  --paper: #f6f7f4;
  --ink: #15211c;
  --muted: #5f7268;
  --line: #dde5df;
  --ok: #1b7a4c;
  --ok-soft: #e3f1e9;
  --fail: #a3202b;
  --fail-soft: #f8e3e5;
  --na: #6c7a72;
  --na-soft: #edf0ee;
  --amber: #b45309;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18, 55, 44, 0.06), 0 8px 24px rgba(18, 55, 44, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  touch-action: manipulation;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

h1, h2, h3, p, ul, li { margin: 0; }
ul { list-style: none; padding: 0; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--paper);
  position: relative;
  overflow-x: hidden;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- topbar */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: var(--green);
  color: #fff;
}

.bar__t { flex: 1; min-width: 0; }
.bar__t h1 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar__t p {
  font-size: 11.5px;
  color: #b7cfc2;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  margin-left: -8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.12); }

.chip {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip--ok { background: #d8ecdf; color: #14512f; }
.chip--mid { background: #f6e3c6; color: #7a4104; }
.chip--bad { background: #f4d3d6; color: #7d1720; }
.chip--none { background: rgba(255, 255, 255, 0.14); color: #fff; }
.chip.is-hidden { display: none; }

/* ---------------------------------------------------------------- home */

.home { padding-bottom: 40px; }

.brand {
  padding: 26px 20px 40px;
  background: var(--green);
  color: #fff;
}
.brand__eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9dbcb0;
  font-weight: 600;
}
.brand h1 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-top: 8px;
  font-weight: 680;
}
.brand p {
  margin-top: 8px;
  font-size: 13px;
  color: #c3d7cd;
  line-height: 1.4;
}

.pad { padding: 0 16px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.setup { margin-top: -22px; position: relative; z-index: 2; padding: 6px 16px; }

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.field:last-child { border-bottom: 0; }
.field label {
  width: 74px;
  flex: none;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  padding: 2px 0;
  outline: none;
}
.field input::placeholder { color: #a9b8b0; }
.field input:focus { border-bottom: 1px solid var(--green-600); }

.overview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  margin-top: 14px;
}
.overview__t { flex: 1; }
.overview__t h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.overview__t p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.overview__bar {
  height: 6px;
  border-radius: 99px;
  background: var(--pale);
  margin-top: 10px;
  overflow: hidden;
}
.overview__bar i {
  display: block;
  height: 100%;
  background: var(--green-600);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.ring { flex: none; position: relative; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--pale); }
.ring .fill {
  stroke: var(--green-600);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring__label b {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ring__label span {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 26px 4px 10px;
}
.section-head h2 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.section-head span { font-size: 12px; color: var(--muted); }

.tile {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.tile:active { transform: scale(0.985); border-color: #b9ccc1; }

.tile__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tile__top h3 {
  flex: 1;
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.01em;
}
.tile__top .pct {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tile__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.tile__bar {
  height: 4px;
  border-radius: 99px;
  background: var(--pale);
  margin-top: 11px;
  overflow: hidden;
}
.tile__bar i {
  display: block;
  height: 100%;
  background: var(--green-600);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.tile__bar.is-empty i { background: #c9d6cf; }
.tile__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tile__foot .done { color: var(--green-600); font-weight: 600; }

.tile--summary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.tile--summary .tile__sub,
.tile--summary .tile__foot { color: #b7cfc2; }
.tile--summary .tile__bar { background: rgba(255, 255, 255, 0.18); }
.tile--summary .tile__bar i { background: #cfe3d6; }
.tile--summary .tile__top .pct { color: #fff; }

.ghost {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border-radius: 12px;
  border: 1px dashed #c3d1c9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.ghost:active { background: var(--pale-2); }

.note-line {
  text-align: center;
  font-size: 11.5px;
  color: #8b9b93;
  margin-top: 16px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- checklist */

.progress {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 60px);
  height: 3px;
  background: var(--pale);
  z-index: 19;
}
.progress i {
  display: block;
  height: 100%;
  background: #7fb39a;
  transition: width 0.3s ease;
}

.list { padding: 6px 12px 96px; }

.area { margin-top: 14px; }

.area__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  position: sticky;
  top: calc(env(safe-area-inset-top) + 63px);
  background: var(--paper);
  z-index: 10;
}
.area__h span {
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green-600);
}
.area__h b {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 13px 11px;
  margin-bottom: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.item[data-state="ok"] { border-color: #b7dcc7; background: #fbfefc; }
.item[data-state="fail"] { border-color: #e8b7bd; background: #fffbfb; }
.item[data-state="na"] { background: #fafbfa; }

.item__t {
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.005em;
  display: flex;
  gap: 8px;
}
.item__t .n {
  flex: none;
  width: 18px;
  font-size: 11px;
  color: #9aaba2;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr;
  gap: 7px;
  margin-top: 11px;
}

.ans {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 620;
  color: #56665d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}
.ans span { font-size: 14px; line-height: 1; }
.ans:active { transform: scale(0.97); }

.ans--ok[aria-pressed="true"] {
  background: var(--ok-soft);
  border-color: #7cc39c;
  color: #14512f;
}
.ans--fail[aria-pressed="true"] {
  background: var(--fail-soft);
  border-color: #dd97a0;
  color: #7d1720;
}
.ans--na[aria-pressed="true"] {
  background: var(--na-soft);
  border-color: #c3cbc7;
  color: #3f4a44;
}

.note-btn {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.note-btn::before {
  content: "+";
  font-size: 13px;
  font-weight: 700;
  color: #9aaba2;
}
.note-btn.has-note::before { content: "•"; color: var(--amber); }

.note {
  width: 100%;
  margin-top: 8px;
  min-height: 62px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  outline: none;
}
.note:focus { border-color: #a9c7b7; background: #fff; }
.note[hidden] { display: none; }

/* ---------------------------------------------------------------- footbar */

.footbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  max-width: 560px;
  margin: 0 auto;
}
.footbar span {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: 1;
}

.btn {
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--green); color: #fff; }
.btn--ghost { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn--wide { width: 100%; }

/* ---------------------------------------------------------------- summary */

.summary-wrap { padding: 14px 12px 30px; }

.summary {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(18, 55, 44, 0.07);
}

.summary__head {
  background: var(--green);
  color: #fff;
  padding: 14px 18px 13px;
}
.summary__eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9dbcb0;
  font-weight: 700;
}
.summary__site {
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.02em;
  margin-top: 5px;
  line-height: 1.2;
}
.summary__meta {
  font-size: 11.5px;
  color: #b7cfc2;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.summary__score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.summary__score .big {
  font-size: 34px;
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.summary__score .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.35;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0 20px;
  align-items: end;
  flex: 1;
}
.stats div { display: grid; }
.stats b {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stats span {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}
.scorecol { flex: 1; display: grid; gap: 8px; }
.scorecol__note {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.summary__rows { padding: 6px 18px; }
.srow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2ef;
  font-size: 13.5px;
}
.srow:last-child { border-bottom: 0; }
.srow span { flex: 1; color: #2c3a33; }
.srow b {
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 700;
}
.srow small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  width: 52px;
  text-align: right;
}
.srow--empty span { color: #97a69e; }

.summary__issues {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: #fcfdfc;
}
.summary__issues h4 {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.issue {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 6px 0;
  border-bottom: 1px dotted #e4eae6;
}
.issue:last-child { border-bottom: 0; }
.issue i {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--fail-soft);
  color: var(--fail);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-style: normal;
  margin-top: 1px;
}
.issue p { flex: 1; }
.issue em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}
.issue--none { color: var(--ok); font-size: 12.5px; }

.summary__foot {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--pale-2);
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.share { padding: 16px 2px 0; display: grid; gap: 9px; }
.hint {
  font-size: 11.5px;
  color: #8b9b93;
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* actions */
.actions { margin-top: 22px; }
.actions h3 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 4px 8px;
}
.action {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.4;
}
.action p { flex: 1; }
.action small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 3px;
}
.action button {
  color: #a3b2aa;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}
.action-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 9px;
}
.action-form input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 16px;
  background: #fbfcfb;
  outline: none;
}
.action-form input:focus { border-color: #a9c7b7; background: #fff; }
.action-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-form .btn { height: 42px; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
