/* PlantPass. One stylesheet, system fonts, no external requests. */
:root {
  --ink: #0e1c26;
  --ink-2: #334a5a;
  --muted: #627684;
  --line: #dde4e9;
  --line-2: #eef2f5;
  --bg: #f4f6f8;
  --card: #fff;
  --brand: #0d5c63;
  --brand-2: #0a474d;
  --brand-soft: #e3f0f0;
  --gold: #f2b33d;
  --ok: #157a3c; --ok-bg: #e6f4ea;
  --warn: #a35a00; --warn-bg: #fcf1df;
  --pend: #2251b8; --pend-bg: #e6edfb;
  --bad: #b42318; --bad-bg: #fbe9e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14, 28, 38, .06), 0 1px 1px rgba(14, 28, 38, .04);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 15px; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .95rem; margin-top: 1.4em; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.red { color: var(--bad); } .amber { color: var(--warn); } .green { color: var(--ok); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.inline { display: inline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1240px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 70vh; }

/* top bar */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topin { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; max-width: 1240px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand .logo { width: 30px; height: 30px; color: var(--brand); }
.brand small { font-weight: 500; font-size: .78rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .93rem; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }
.nav a.btn { color: #fff; border: 0; padding: 7px 14px; }
.nav .who { color: var(--muted); font-size: .85rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .82rem; padding: 18px 0; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: .86rem; }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.busy { opacity: .75; cursor: progress; }
.btn:disabled { cursor: progress; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; align-content: start; }
.field label, .filters label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field.check label, label.check { font-weight: 500; display: flex; gap: 8px; align-items: flex-start; }
input, select { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9d3da; border-radius: 8px; padding: 9px 11px; width: 100%; min-height: 40px; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--brand); flex: none; }
input:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(13, 92, 99, .25); outline-offset: 1px; border-color: var(--brand); }
.req { color: var(--bad); margin-left: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
fieldset.flags { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; display: grid; gap: 8px; }
fieldset.flags legend { font-weight: 600; font-size: .88rem; color: var(--ink-2); padding: 0 6px; }
[hidden] { display: none !important; }
.unit { display: flex; align-items: center; gap: 6px; }
.unit input { width: 90px; }
.ai-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; background: #efe7fb; color: #5b2fa8; border-radius: 4px; padding: 1px 5px; vertical-align: middle; }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.narrow { max-width: 560px; margin: 8px auto 18px; }
.card.narrow.wideish { max-width: 760px; }
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.cols > .card { margin-bottom: 0; }
.cols + .card { margin-top: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.linkcard { display: grid; gap: 4px; text-decoration: none; color: var(--ink); margin: 0; }
.linkcard:hover { border-color: var(--brand); }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pagehead h1 { margin-bottom: .2em; }
.pagehead p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pagehead .actions { margin: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.prose { max-width: 760px; margin: 0 auto; }
.lede { font-size: 1.08rem; color: var(--ink-2); }
.inlineform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inlineform label { flex: 1; min-width: 220px; display: grid; gap: 5px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }

/* notices */
.notice { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid; font-size: .93rem; }
.notice ul { margin: 0; padding-left: 18px; }
.n-ok { background: var(--ok-bg); border-color: #b9dfc5; color: #0f5129; }
.n-warn { background: var(--warn-bg); border-color: #f0d3a3; color: #6e3d00; }
.n-err { background: var(--bad-bg); border-color: #f1bdb7; color: #7d1810; }
.n-info { background: #f2edfb; border-color: #d8cbf1; color: #3f2380; }

/* status */
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge.big { font-size: 1rem; padding: 6px 16px; }
.s-cleared.badge { background: var(--ok-bg); color: var(--ok); border-color: #b9dfc5; }
.s-expiring.badge { background: var(--warn-bg); color: var(--warn); border-color: #f0d3a3; }
.s-pending.badge { background: var(--pend-bg); color: var(--pend); border-color: #c3d3f5; }
.s-not_cleared.badge { background: var(--bad-bg); color: var(--bad); border-color: #f1bdb7; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.s-cleared { background: var(--ok); } .dot.s-expiring { background: #d98b0b; } .dot.s-pending { background: var(--pend); } .dot.s-not_cleared { background: var(--bad); }
.tick { color: var(--ok); font-weight: 700; font-size: .85rem; }
.dstat { font-size: .78rem; font-weight: 600; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.d-verified { background: var(--ok-bg); color: var(--ok); } .d-submitted { background: var(--pend-bg); color: var(--pend); }
.d-draft { background: var(--line-2); color: var(--muted); } .d-rejected { background: var(--bad-bg); color: var(--bad); }

.reasons { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 7px; }
.reasons li { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.reasons .ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; margin-top: 1px; }
.lv-block .ic { background: var(--bad-bg); color: var(--bad); }
.lv-pending .ic { background: var(--pend-bg); color: var(--pend); }
.lv-warn .ic { background: var(--warn-bg); color: var(--warn); }
.lv-note .ic { background: var(--line-2); color: var(--muted); }
.lv-note { color: var(--ink-2); }
.reasons .rule { font-size: .78rem; color: var(--muted); }
.ok-line { color: var(--ok); font-weight: 600; }

/* chips & filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chips a { text-decoration: none; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .87rem; }
.chips a b { margin-left: 4px; color: var(--ink); }
.chips a.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.filters label { display: grid; gap: 4px; min-width: 140px; flex: 1; }
.filters label:has(.unit) { flex: 0 0 auto; min-width: 0; }
.filters .btn { flex: none; }

/* asset rows */
.assetlist { display: grid; gap: 8px; }
.assetrow { display: grid; grid-template-columns: 120px minmax(0, 1fr) 200px 200px auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.assetrow:hover { border-color: #c4d2da; }
.ar-title { font-weight: 650; text-decoration: none; color: var(--ink); }
.ar-title:hover { color: var(--brand); text-decoration: underline; }
.ar-sub { color: var(--muted); font-size: .86rem; }
.ar-why { font-size: .84rem; color: var(--ink-2); margin-top: 3px; }
.ar-vendor { font-size: .9rem; }
.ar-vendor a { color: var(--ink); text-decoration: none; }
.ar-due { font-size: .88rem; }
.ar-add { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.ar-add select { min-height: 32px; padding: 4px 8px; font-size: .84rem; max-width: 150px; }

/* passport */
.passhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; flex-wrap: wrap; }
.passhead.s-cleared { border-left-color: var(--ok); } .passhead.s-expiring { border-left-color: #d98b0b; }
.passhead.s-pending { border-left-color: var(--pend); } .passhead.s-not_cleared { border-left-color: var(--bad); }
.passhead h1 { margin-bottom: .25em; }
.passhead .cap { font-weight: 500; color: var(--muted); font-size: 1.1rem; }
.passhead p { margin: 0; }
.passstatus { text-align: right; display: grid; gap: 6px; justify-items: end; }
.kv { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 7px 14px; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.compact { font-size: .86rem; margin-bottom: 12px; }
.meter { display: flex; gap: 10px; align-items: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.meter label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); width: 120px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.tbl tbody th { font-weight: 600; color: var(--ink-2); width: 34%; }
.tbl tr.overdue td { color: var(--bad); }
.tbl tr.changed { background: #fff8e8; }
.evidence td:first-child { width: 30%; }
.evidence.company { margin-top: 10px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; }
.tile b { font-size: 1.7rem; line-height: 1.1; }
.tile span { color: var(--muted); font-size: .86rem; }
.tile.s-cleared { border-top-color: var(--ok); } .tile.s-expiring { border-top-color: #d98b0b; }
.tile.s-pending { border-top-color: var(--pend); } .tile.s-not_cleared { border-top-color: var(--bad); }
.todo { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: .92rem; }
.todo li { padding-left: 14px; border-left: 3px solid var(--line); }
.todo li.lv-block { border-color: var(--bad); } .todo li.lv-warn { border-color: #d98b0b; }
.steps ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.steps li.done { color: var(--muted); text-decoration: line-through; }

/* document review */
.review { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pv { position: sticky; top: 76px; }
/* No border-radius on the PDF frame: a rounded clip blanks Chrome's out-of-process PDF viewer (seen 2026-10-13). */
.preview { width: 100%; height: calc(100vh - 150px); min-height: 420px; border: 1px solid var(--line); background: #fff; }
img.preview { height: auto; max-height: calc(100vh - 150px); border-radius: var(--radius); object-fit: contain; }
.verdict .actions { margin: 6px 0 0; }

/* landing */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; padding: 26px 0 34px; }
.hero h1 { font-size: 2.3rem; line-height: 1.12; letter-spacing: -.02em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-card { display: grid; gap: 10px; }
.mini { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 3px; box-shadow: var(--shadow); }
.mini .badge { justify-self: start; }
.mini small { color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--line-2); border-radius: 9px; padding: 3px; margin: 8px 0 12px; }
.seg a { text-align: center; padding: 8px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.seg a.on { background: #fff; color: var(--brand-2); box-shadow: var(--shadow); }
.legend { display: grid; gap: 8px; margin: 14px 0 20px; }
.legend .badge { min-width: 112px; text-align: center; margin-right: 8px; }
.rulebox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; scroll-margin-top: 80px; }
.rulebox:target { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 92, 99, .15); }
.rulebox p { margin: 0 0 4px; }

/* dossier (print) */
.dossier { max-width: 860px; margin: 0 auto; background: #fff; padding: 28px 34px; border: 1px solid var(--line); }
.dossier h1 { font-size: 1.35rem; }
.dossier h2 { font-size: 1rem; margin-top: 1.4em; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.dhead { display: flex; justify-content: space-between; font-size: .85rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; color: var(--ink-2); }
.tbl.sign td { color: var(--muted); font-size: .8rem; height: 42px; vertical-align: bottom; border-bottom: 1px solid var(--line); }
@media print {
  body { background: #fff; font-size: 12px; }
  .no-print, .top, .foot { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .dossier { border: 0; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
  .tbl th, .tbl td { padding: 5px 6px; }
}

/* narrow screens */
@media (max-width: 900px) {
  .assetrow { grid-template-columns: 1fr auto; grid-template-areas: "main status" "vendor due" "add add"; }
  .ar-status { grid-area: status; justify-self: end; align-self: start; }
  .ar-main { grid-area: main; }
  .ar-vendor { grid-area: vendor; }
  .ar-due { grid-area: due; text-align: right; }
  .ar-add { grid-area: add; justify-content: flex-start; }
  .cols, .review, .hero, .grid3 { grid-template-columns: 1fr; }
  .pv { position: static; }
  .preview { height: 70vh; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 14px; }
  .brand small { display: none; }
  .nav { gap: 12px; font-size: .88rem; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
  .card { padding: 16px; }
  .passstatus { text-align: left; justify-items: start; }
  .filters label { min-width: 46%; }
  .tbl { font-size: .84rem; }
  .tbl th, .tbl td { padding: 7px 6px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
