:root {
  --ink: #13201f; --ink-2: #3c4a49; --muted: #6b7877;
  --paper: #f7f5f0; --paper-2: #efece4; --card: #ffffff; --line: #e2ddd2;
  --accent: #0d5c56; --accent-soft: #dcefe9; --warm: #e8a33d;
  /* chart roles (validated categorical: teal, amber, indigo) */
  --s1: #0b8f80; --s2: #cf7a1c; --s3: #5b6fd0; --grid: #ece8df;
  --good: #1f8a5b; --warn: #b7791f; --crit: #c4473a;
  --radius: 18px; --max: 1140px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; font-size: 16.5px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

header { position: sticky; top: 0; z-index: 50; background: rgba(247,245,240,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; font-size: 15px; }
.mono { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 15px; }
.nav-r { display: flex; align-items: center; gap: 10px; }
.back { font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; }
.back:hover { background: var(--paper-2); }
.lang { display: flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; padding: 6px 12px; font: 600 12.5px var(--sans); color: var(--muted); cursor: pointer; border-radius: 999px; }
.lang button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.hero { padding: 64px 0 40px; }
.crumb { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 16px; max-width: 900px; }
.hero h1 em { color: var(--accent); }
.hero .sub { font-size: 18.5px; color: var(--ink-2); max-width: 760px; margin-bottom: 26px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta > span { font-size: 13.5px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.meta > span > b { color: var(--ink); font-weight: 600; }
.sim { margin-top: 18px; display: inline-flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #7a5212; background: #fdf0db; border: 1px solid #f3dcb3; padding: 8px 14px; border-radius: 12px; max-width: 760px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.kpi .v { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.kpi .v.acc { color: var(--accent); }
.kpi .l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

section { padding: 64px 0 0; }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.sec-h .n { font-family: var(--serif); color: var(--muted); font-size: 15px; font-weight: 600; }
.sec-h h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.01em; line-height: 1.2; }
.prose { max-width: 780px; color: var(--ink-2); }
.prose p { margin-bottom: 14px; }
.prose ul { padding-left: 20px; margin-bottom: 14px; } .prose li { margin-bottom: 6px; }
.prose b { color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.step .k { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.step p { font-size: 15px; color: var(--ink-2); }
code, .mono-t { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }

/* dashboard */
.dash { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 20px 50px -30px rgba(19,32,31,.25); }
.dash-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.dash-bar .ttl { font-weight: 700; font-size: 14px; margin-right: auto; display: flex; align-items: center; gap: 8px; }
.dash-bar .ttl::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.ctl { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
select { font: 500 14px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 7px 30px 7px 12px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7877' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.seg-btns { display: inline-flex; background: var(--paper-2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg-btns button { border: 0; background: transparent; font: 600 13px var(--sans); color: var(--muted); padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.seg-btns button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.grid2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.grid2.even { grid-template-columns: 1fr 1fr; }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.panel h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.panel .hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.panel + .panel, .full { margin-top: 18px; }
.grid2 .panel + .panel { margin-top: 0; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.box { height: 10px; width: 10px; border-radius: 3px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 10px; white-space: nowrap; opacity: 0; transform: translate(-50%, -110%); transition: opacity .12s; z-index: 5; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.tip b { font-weight: 700; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.axis text { font-size: 11.5px; fill: var(--muted); font-family: var(--sans); }
.lbl { font-size: 12px; fill: var(--ink-2); font-family: var(--sans); }
.lbl.b { font-weight: 700; fill: var(--ink); }

/* matrix */
.matrix { display: grid; grid-template-columns: 34px repeat(3, 1fr); gap: 4px; }
.matrix .h { font-size: 12.5px; font-weight: 700; color: var(--muted); display: grid; place-items: center; padding: 4px; text-align: center; }
.cell { border-radius: 10px; padding: 12px 10px; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; cursor: default; transition: transform .12s, box-shadow .12s; }
.cell:hover { transform: scale(1.02); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.cell .t { font-size: 12px; font-weight: 700; opacity: .85; }
.cell .v { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.1; }
.cell .s { font-size: 11.5px; opacity: .85; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
th:hover { color: var(--ink); }
th .ar { opacity: .5; margin-left: 4px; }
td { padding: 9px 10px; border-bottom: 1px solid var(--paper-2); white-space: nowrap; }
tr:hover td { background: var(--paper); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.High { background: #f9e1dd; color: var(--crit); } .pill.High::before { content: "▲"; font-size: 9px; }
.pill.Medium { background: #fbecd4; color: #8a5a0b; } .pill.Medium::before { content: "●"; font-size: 8px; }
.pill.Low { background: #dcf1e6; color: var(--good); } .pill.Low::before { content: "✓"; font-size: 10px; }
.segtag { font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 700; background: var(--paper-2); padding: 2px 7px; border-radius: 6px; }
.bar-in { position: relative; height: 8px; width: 90px; background: var(--paper-2); border-radius: 4px; display: inline-block; vertical-align: middle; margin-left: 8px; }
.bar-in i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--s1); }
.tbl-toggle { margin-top: 10px; font: 600 13px var(--sans); color: var(--accent); background: none; border: 0; cursor: pointer; }

/* findings / recs */
.finds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.find { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.find .big { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1.1; margin-bottom: 6px; }
.find p { color: var(--ink-2); font-size: 15px; }
.recs { counter-reset: r; display: grid; gap: 12px; }
.rec { counter-increment: r; display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.rec::before { content: counter(r); width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.rec h3 { font-size: 16.5px; margin-bottom: 4px; }
.rec p { font-size: 15px; color: var(--ink-2); }

.dl { display: flex; flex-wrap: wrap; gap: 10px; }
.dl a { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 12px; }
.dl a:hover { border-color: var(--ink); }
.next { margin: 70px 0 50px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.next a { flex: 1; min-width: 240px; background: var(--ink); color: #fff; border-radius: 18px; padding: 22px 24px; }
.next a.light { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.next small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.next span { font-family: var(--serif); font-size: 20px; font-weight: 600; }
footer { padding: 30px 0 40px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2, .grid2.even, .two, .finds, .method { grid-template-columns: 1fr; }
  .grid2 .panel + .panel { margin-top: 18px; }
  .brand .name { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .dash { padding: 14px; border-radius: 18px; }
  .panel { padding: 14px; }
  .kpi .v { font-size: 27px; }
  .cell { min-height: 70px; padding: 8px; } .cell .v { font-size: 17px; }
  .back .txt { display: none; }
}
@media print { header, .next, .lang, .dash-bar .ctl { display: none !important; } body { background: #fff; } .dash { box-shadow: none; } }
