/* EU Compliance Translator - mineral grey workspace, petrol accent, battery-cell readiness gauge */
:root {
  --paper: #EEF1EE;
  --surface: #FFFFFF;
  --ink: #17211F;
  --muted: #56635F;
  --line: #D3DAD6;
  --accent: #0E5A55;
  --accent-hover: #0A4843;
  --complete: #1E7A46;
  --review: #A8660B;
  --missing: #B3261E;
  --na: #8A9491;
  --focus: #2A7FFF;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5;
       font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .8em; max-width: 72ch; }
small, .muted { color: var(--muted); }
.muted { font-size: .9rem; }

/* shell */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #DDE5E1; padding: 22px 16px; display: flex; flex-direction: column; gap: 20px; }
.brand { font-weight: 750; font-size: 1.02rem; color: #fff; text-decoration: none; line-height: 1.25; }
.brand span { display: block; font-weight: 400; font-size: .8rem; color: #9FB0AA; margin-top: 2px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: #DDE5E1; text-decoration: none; padding: 7px 10px; border-radius: 4px; font-size: .93rem; }
.side nav a:hover { background: #24322F; color: #fff; }
.side nav a.on { background: #24322F; color: #fff; box-shadow: inset 3px 0 0 #5FB3A6; }
.side .who { margin-top: auto; font-size: .82rem; color: #9FB0AA; }
.side .who strong { color: #fff; display: block; font-weight: 600; }
.side .who button { background: none; border: 0; color: #9FB0AA; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.main { padding: 28px 36px 60px; max-width: 1240px; width: 100%; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side .who { margin: 0; }
  .main { padding: 20px 16px 48px; }
}

/* surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 20px; }
.panel > h2:first-child { margin-bottom: .6em; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 960px) { .grid2 { grid-template-columns: 1fr; } }

/* flashes */
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; border: 1px solid; font-size: .93rem; }
.flash.ok { background: #E7F3EC; border-color: #B7D9C4; }
.flash.error { background: #FBEAE8; border-color: #EDBDB8; }

/* controls */
button, .btn { font: inherit; font-weight: 600; font-size: .92rem; border-radius: 4px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; display: inline-block; line-height: 1.3; }
button:hover, .btn:hover { background: var(--accent-hover); color: #fff; }
.btn.ghost, button.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover, button.ghost:hover { background: #E3EEEC; color: var(--accent-hover); }
button.danger { background: var(--missing); border-color: var(--missing); }
button.small, .btn.small { padding: 4px 10px; font-size: .84rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  font: inherit; width: 100%; padding: 8px 10px; border: 1px solid #B9C4BF; border-radius: 2px; background: #fff; color: var(--ink); }
textarea { min-height: 84px; resize: vertical; }
.field { margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
input[type=file] { font: inherit; font-size: .9rem; }

/* battery-cell readiness gauge: the one bold element */
.cell { display: flex; align-items: center; gap: 0; }
.cell .body { flex: 1; display: flex; height: 26px; border: 2px solid var(--ink); border-radius: 5px; padding: 2px; gap: 2px; background: var(--paper); min-width: 160px; }
.cell .nub { width: 5px; height: 12px; background: var(--ink); border-radius: 0 2px 2px 0; }
.cell .seg { height: 100%; border-radius: 2px; }
.cell .seg.complete { background: var(--complete); }
.cell .seg.review { background: repeating-linear-gradient(135deg, var(--review) 0 5px, #C98A2C 5px 10px); }
.cell .seg.missing { background: transparent; }
.cell.big .body { height: 44px; border-width: 3px; border-radius: 7px; padding: 3px; gap: 3px; }
.cell.big .nub { width: 8px; height: 18px; }
.gauge-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: .88rem; }
.gauge-legend b { font-size: 1.15rem; margin-right: 4px; }
.gauge-legend .c b { color: var(--complete); } .gauge-legend .r b { color: var(--review); } .gauge-legend .m b { color: var(--missing); }
.readiness { min-width: 320px; flex: 0 1 420px; }
.readiness .pct { font-size: 2.2rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1; }

/* status pills */
.pill { display: inline-block; font-size: .78rem; font-weight: 650; padding: 2px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid; }
.pill.complete { color: var(--complete); border-color: #A9D2B8; background: #EEF7F1; }
.pill.review { color: #8A5206; border-color: #E6C48C; background: #FCF4E6; }
.pill.missing { color: var(--missing); border-color: #EDBDB8; background: #FDF1EF; }
.pill.not_applicable { color: var(--na); border-color: var(--line); background: #F4F6F5; }
.pill.plain { color: var(--muted); border-color: var(--line); background: #F4F6F5; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th { text-align: left; font-weight: 650; font-size: .82rem; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #E4E9E6; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.matrix tr.grouphead td { background: #F5F7F6; font-weight: 650; font-size: .85rem; color: var(--muted); padding: 6px 10px; }
.matrix tr.f td:first-child { border-left: 4px solid transparent; }
.matrix tr.f.complete td:first-child { border-left-color: var(--complete); }
.matrix tr.f.review td:first-child { border-left-color: var(--review); }
.matrix tr.f.missing td:first-child { border-left-color: var(--missing); }
.matrix tr.f.not_applicable { color: var(--na); }
.matrix tr.f.not_applicable td:first-child { border-left-color: var(--line); }
.matrix .val { font-weight: 650; font-size: .98rem; }
.matrix .ref { display: block; font-size: .76rem; color: var(--muted); }
.src { display: inline-flex; flex-direction: column; gap: 1px; font-size: .84rem; }
.src a { font-weight: 600; }
.src .loc { color: var(--muted); }
.issue { color: #8A5206; font-size: .84rem; display: block; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 5px 12px; border-radius: 14px; text-decoration: none; font-size: .87rem; color: var(--ink); border: 1px solid var(--line); background: #fff; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
details.act summary { cursor: pointer; font-size: .85rem; color: var(--accent); font-weight: 600; list-style: none; }
details.act summary::-webkit-details-marker { display: none; }
details.act[open] summary { margin-bottom: 8px; }
.cand { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; background: #FAFBFA; font-size: .86rem; }
.cand form { display: inline; }
.cand .row { gap: 6px; margin-top: 6px; }
.cand input[type=text] { padding: 4px 8px; font-size: .85rem; }
.act-panel { min-width: 280px; }

/* lists */
.plist { display: grid; gap: 10px; }
.pcard { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(200px, 1fr) auto; gap: 18px; align-items: center;
         background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.pcard:hover { border-color: #9DB3AC; color: var(--ink); }
.pcard .name { font-weight: 650; font-size: 1.02rem; }
@media (max-width: 760px) { .pcard { grid-template-columns: 1fr; } }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.metrics div { background: var(--surface); padding: 12px 16px; }
.metrics b { display: block; font-size: 1.35rem; }
.metrics span { font-size: .82rem; color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; }
.empty p { margin: 0 auto 14px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.scope { padding: 10px 14px; border-radius: 4px; font-size: .9rem; margin-top: 12px; border: 1px solid; }
.scope.required { background: #E6F1EF; border-color: #A9CFC8; }
.scope.unknown { background: #FCF4E6; border-color: #E6C48C; }
.scope.not_required { background: #F4F6F5; border-color: var(--line); }
pre.mail { white-space: pre-wrap; font-family: inherit; font-size: .88rem; background: #FAFBFA; border: 1px solid var(--line); padding: 12px; border-radius: 4px; margin: 8px 0 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.plan.current { border: 2px solid var(--accent); }
.plan .price { font-size: 1.25rem; font-weight: 700; }
.plan form { margin-top: auto; }
.req-group { margin-top: 18px; }
.auth { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.auth .panel { padding: 26px; }
.disclaimer { font-size: .82rem; color: var(--muted); margin-top: 28px; max-width: 90ch; }
.portal { max-width: 760px; margin: 0 auto; padding: 32px 16px 60px; }
.portal .req { border-bottom: 1px solid var(--line); padding: 14px 0; }
.portal .req:last-of-type { border-bottom: 0; }
.unit { font-size: .82rem; color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* public landing + gap check */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; max-width: 1080px; margin: 0 auto; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.brand-dark { font-weight: 750; color: var(--ink); text-decoration: none; }
.landing { max-width: 880px; margin: 0 auto; padding: 24px 20px 64px; }
.landing h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.12; max-width: 22ch; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
/* the drop zone is drawn as a battery cell: charge it with documents */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 200px; margin: 26px 14px 0 0; padding: 24px; border: 3px solid var(--ink); border-radius: 12px; background: var(--surface);
  cursor: pointer; position: relative; font-weight: 400; }
.drop::after { content: ""; position: absolute; right: -14px; top: 50%; width: 11px; height: 54px; transform: translateY(-50%);
  background: var(--ink); border-radius: 0 4px 4px 0; }
.drop:hover, .drop.over { background: #E3EEEC; }
.drop.has-files { background: #DDEFE4; border-color: var(--complete); }
.drop.has-files::after { background: var(--complete); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop-title { font-size: 1.35rem; font-weight: 700; }
.drop-sub { color: var(--muted); max-width: 52ch; word-break: break-word; }
.check-options { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 16px; }
.check-options .field { margin: 0; min-width: 180px; }
.check-options button { padding: 10px 20px; font-size: 1rem; }
.micro { font-size: .86rem; color: var(--muted); margin-top: 10px; max-width: 80ch; }
.sample { margin-top: 18px; font-size: .95rem; }
button.linkish { background: none; border: 0; color: var(--accent); padding: 0; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
button.linkish:hover { color: var(--accent-hover); background: none; }
.covers { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 20px; }
.result-gauge { margin-top: 18px; }
.missing-list { border-left: 5px solid var(--missing); }
.missing-list ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.missing-list li span.muted { display: block; font-size: .88rem; }
.save-panel { border: 2px solid var(--accent); }
.topbar nav a { white-space: nowrap; }
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .brand-dark { font-size: .95rem; }
  .drop { min-height: 160px; }
  .check-options .field, .check-options button { width: 100%; }
}
.plainlist { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.plainlist li span.muted { display: block; font-size: .88rem; }
details.panel > summary { cursor: pointer; }
.site-footer { max-width: 880px; margin: 0 auto; padding: 24px 20px 40px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.prose-page h2 { margin-top: 28px; }
