/* Kendex - the look of an engineer's calc pad.
   Inputs sit on a plain page; results are written on a pale green gridded calc sheet, the one memorable surface.
   Red pencil marks what governs; dimension blue is used only in the diagrams. */
/* Kendex - a digital engineering workbench.
   Warm paper, Workshop Navy for the frame, Blueprint Blue for what you can press, copper only as a small accent.
   Results sit on Drawing White; drafting marks (sheet numbers, dimension lines) appear sparingly. */
:root{
  /* brand */
  --brand-navy:#172536; --brand-blue:#315F82; --brand-blue-light:#6D91AC; --brand-copper:#B87950;
  /* backgrounds */
  --background:#F3F0E8; --surface:#FBFAF6; --surface-muted:#EAE8E0; --sidebar:#172536;
  /* text (secondary is Slate, a shade darker so small text keeps AA contrast on the paper) */
  --text-primary:#303943; --text-secondary:#5E6A76; --text-inverse:#FBFAF6;
  /* borders */
  --border:#D7D8D2; --border-strong:#B9BDB9; --border-input:#8E948F;
  /* status */
  --success:#5D8068; --warning:#C18A42; --error:#B85D54; --info:#315F82;
  /* type */
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  /* shape, space, elevation */
  --radius-sm:4px; --radius-md:6px; --radius-lg:8px;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px;
  --shadow-sm:0 1px 2px rgba(23,37,54,.06); --shadow-md:0 3px 8px rgba(23,37,54,.08);
  --side-w:248px;

  /* the older names the rest of this sheet uses, mapped onto the brand */
  --page:var(--background); --ink:var(--text-primary); --muted:var(--text-secondary);
  --paper:var(--surface); --grid:#ECEAE3; --rule:var(--border); --field:var(--surface);
  --redline:var(--brand-copper);          /* what governs: a small copper mark */
  --redline-soft:#F3E6DC;
  --dim:var(--brand-blue);
  --ok:#4E6E58;
  --warn-ink:#6E4A12; --warn-bg:#F6ECDB; --warn-edge:var(--warning);
  --bad-ink:#9A4740;  --bad-bg:#F6E4E1;
  --good-ink:#4E6E58;
  --focus:var(--brand-blue);
  --ui:var(--font-sans); --ui-narrow:var(--font-sans);
  --math:"STIX Two Text","Cambria Math",Cambria,Georgia,serif;
  --r:var(--radius-md);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--background);color:var(--text-primary);font:15.5px/1.55 var(--font-sans);font-variant-numeric:tabular-nums}
svg[font-family]{font-family:var(--font-sans)}
a{color:var(--brand-blue)}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
h1,h2,h3{font-family:var(--font-sans);font-weight:600;line-height:1.2;margin:0;color:var(--text-primary)}
h1{font-size:1.95rem;letter-spacing:-.015em}
h2{font-size:1.2rem}
h3{font-size:1.02rem}
p{margin:.4em 0}
sub,sup{font-size:.72em;line-height:0}
code,kbd{font-family:var(--font-mono);font-size:.9em}
.skip{position:absolute;left:-999px;top:8px;z-index:50;background:var(--surface);padding:6px 12px;border-radius:var(--radius-sm)}
.skip:focus{left:8px}

/* ------------------------------------------------------------------ shell: navy sidebar + paper workspace */
.shell{display:flex;min-height:100vh}
.side{position:sticky;top:0;align-self:flex-start;height:100vh;width:var(--side-w);flex:none;background:var(--sidebar);color:#C9D3DC;
  display:flex;flex-direction:column;padding:16px 10px 12px;overflow-y:auto;z-index:30}
.side .brand{display:flex;align-items:center;gap:10px;padding:2px 8px 16px;margin-bottom:6px;border-bottom:1px solid rgba(201,211,220,.14);color:var(--text-inverse);text-decoration:none}
.kmark{width:32px;height:32px;flex:none;display:block}
.kmark .k-k{fill:currentColor}
.kmark .k-guide{stroke:var(--brand-blue-light);stroke-width:.8;opacity:.55;fill:none}
.kmark .k-node{fill:var(--brand-copper);stroke:var(--sidebar);stroke-width:1.6}
.wordmark{font-weight:700;font-size:1.12rem;letter-spacing:.14em}
.nav{display:flex;flex-direction:column;gap:14px;margin-top:10px}
.nav-group{display:flex;flex-direction:column;gap:1px}
.nav-sec{display:block;font-size:.7rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#9AA3AD;padding:4px 10px 6px;text-decoration:none}
a.nav-sec:hover{color:var(--text-inverse)}
a.nav-sec[aria-current=page]{color:var(--text-inverse)}
.side a[data-key]{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:var(--radius-sm);color:#C9D3DC;text-decoration:none;font-size:.93rem;line-height:1.25}
.side a[data-key]:hover{background:rgba(201,211,220,.08);color:var(--text-inverse)}
.side a[data-key][aria-current=page]{background:var(--brand-blue);color:#fff}
.side :focus-visible{outline-color:#C9D3DC}
.ic{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.side-foot{margin-top:auto;padding-top:12px;border-top:1px solid rgba(201,211,220,.14);display:flex;flex-direction:column;gap:4px}
.account{display:flex;flex-direction:column;gap:6px;font-size:.88rem}
.acct-row a,.acct-row{display:flex;align-items:center;gap:10px;color:#C9D3DC;text-decoration:none;padding:6px 10px;border-radius:var(--radius-sm);min-width:0}
.acct-row a{padding:0}
.acct-row a:hover .acct-txt{color:var(--text-inverse)}
.acct-ic{display:inline-flex;width:28px;height:28px;flex:none;align-items:center;justify-content:center;border-radius:50%;background:rgba(201,211,220,.12);margin-left:-5px}
.acct-txt{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere;line-height:1.25}
.acct-txt small{color:#9AA3AD;font-size:.76rem}
.side button.acct-out{align-self:flex-start;margin-left:10px;background:transparent;color:#C9D3DC;border-color:rgba(201,211,220,.35)}
.side button.acct-out:hover{background:rgba(201,211,220,.1);color:#fff}
.side-fold{display:flex;align-items:center;gap:10px;background:transparent;border:0;color:#9AA3AD;padding:6px 10px;font-size:.82rem;text-align:left}
.side-fold:hover{color:#fff;background:transparent}
.work{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.mtop{display:none}
main{width:100%;max-width:1280px;margin:0 auto;padding:30px 32px 64px;flex:1 0 auto}
main:focus{outline:none}
.lede{color:var(--text-secondary);max-width:68ch;margin-top:6px}
/* a drawing-style sheet number above each page title */
#view > h1::before,#view > .pj-head > h1::before,#view > .settings > .pj-head > h1::before{content:var(--ref,none);display:block;font:600 .7rem/1 var(--font-mono);letter-spacing:.1em;color:var(--brand-copper);margin-bottom:8px}

/* narrow sidebar: the K and the icons only */
body.side-narrow{--side-w:64px}
body.side-narrow .side .wordmark,body.side-narrow .side a[data-key] span,body.side-narrow .nav-sec,body.side-narrow .acct-txt,body.side-narrow .side-fold span,body.side-narrow .acct-out{display:none}
body.side-narrow .side .brand{justify-content:center;padding-left:0;padding-right:0}
body.side-narrow .side a[data-key],body.side-narrow .acct-row,body.side-narrow .side-fold{justify-content:center;padding-left:0;padding-right:0}
body.side-narrow .nav-group{padding-top:8px;border-top:1px solid rgba(201,211,220,.1)}
body.side-narrow .nav-group:first-child{border-top:0}
body.side-narrow .side-fold svg{transform:rotate(180deg)}
body.side-narrow .acct-ic{margin:0}

@media (max-width:900px){
  .side{position:fixed;left:0;top:0;bottom:0;height:100vh;height:100dvh;width:270px;transform:translateX(-100%);transition:transform .18s ease;box-shadow:none}
  .side.open{transform:none;box-shadow:0 0 0 100vmax rgba(23,37,54,.35)}
  body.side-narrow{--side-w:248px}
  body.side-narrow .side .wordmark,body.side-narrow .side a[data-key] span,body.side-narrow .nav-sec,body.side-narrow .acct-txt{display:revert}
  .side-fold{display:none}
  .side-scrim{position:fixed;inset:0;z-index:25}
  .mtop{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--sidebar);color:var(--text-inverse);position:sticky;top:0;z-index:20}
  .mtop .brand{display:flex;align-items:center;gap:8px;color:var(--text-inverse);text-decoration:none}
  .mtop .kmark{width:28px;height:28px}
  .menu-btn{background:transparent;border:1px solid rgba(201,211,220,.35);color:var(--text-inverse);padding:6px 8px;display:flex}
  .menu-btn:hover{background:rgba(201,211,220,.1)}
  main{padding:22px 16px 48px}
}

/* ------------------------------------------------------------------ tool layout: form | calc sheet */
.tool{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:32px;margin-top:22px;align-items:start}
.sheet-wrap{position:sticky;top:16px}
@media (max-width:980px){.tool{grid-template-columns:minmax(0,1fr)}.sheet-wrap{position:static}}

fieldset{border:0;border-top:1px solid var(--rule);margin:0;padding:18px 0 22px;min-width:0}
fieldset:first-child{border-top:0;padding-top:0}
legend{font-family:var(--ui-narrow);font-weight:600;font-size:1.2rem;padding:0;margin-bottom:6px;float:left;width:100%}
legend + *{clear:both}
.why{color:var(--muted);font-size:.93rem;margin:0 0 12px;max-width:62ch}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px 18px}
.f{display:flex;flex-direction:column;gap:4px;min-width:0;margin-bottom:12px}
.f > label{font-weight:500;font-size:.95rem}
.f small{color:var(--muted);font-size:.84rem}
.f .err{color:var(--bad-ink);font-size:.86rem;font-weight:500}
input[type=text],input[type=number],select{font:inherit;font-size:1rem;color:var(--ink);background:var(--field);border:1px solid var(--border-input);border-radius:var(--r);padding:7px 9px;min-width:0;width:100%}
input[aria-invalid=true]{border-color:var(--bad-ink);background:#FBF3F1}
select{padding-right:28px}
.check{display:flex;gap:9px;align-items:flex-start;margin:4px 0 12px;font-size:.95rem}
.check input{margin-top:4px;width:17px;height:17px;accent-color:var(--ink)}
.inline-seg{margin-bottom:12px}

/* "Picture:" drawings beside the fields that need a measurement */
details.pic{margin:2px 0 14px;border-left:3px solid var(--dim);padding-left:12px}
details.pic > summary{cursor:pointer;color:var(--dim);font-size:.92rem;font-weight:500;list-style:none}
details.pic > summary::-webkit-details-marker{display:none}
details.pic > summary::before{content:"+ ";font-weight:700}
details.pic[open] > summary::before{content:"\2212  "}
details.pic figure{margin:10px 0 0}
details.pic svg{width:100%;max-width:620px;height:auto;display:block}
details.pic figcaption{color:var(--muted);font-size:.88rem;margin-top:6px;max-width:66ch}
details.more{margin:6px 0 12px}
details.more > summary{cursor:pointer;font-weight:500}
details.more > summary .sum{font-weight:400;color:var(--muted);margin-left:6px;font-size:.9rem}
details.more > .body{padding-top:10px}

/* ------------------------------------------------------------------ the calc sheet */
.sheet{background-color:var(--paper);
  background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);
  background-size:100% 22px,22px 100%;background-position:-1px -1px;
  border:1px solid var(--border);border-radius:2px;padding:22px 26px 26px;min-height:360px;box-shadow:0 1px 0 var(--border),0 2px 0 transparent}
.sheet .head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;border-bottom:2px solid var(--ink);padding-bottom:8px;margin-bottom:16px}
.sheet .head h2{font-size:1.1rem}
.sheet .head .meta{color:var(--muted);font-size:.85rem}
.answer{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:6px 0 4px}
.answer .val{font-family:var(--ui-narrow);font-weight:700;font-size:3.2rem;line-height:1;letter-spacing:-.02em}
.answer .unit{font-size:1.2rem;font-weight:600}
.answer .alt{color:var(--muted);font-size:1.05rem}
.basis{max-width:62ch;margin:6px 0 18px}
.box{background:var(--surface);border:1px solid var(--border);padding:12px 14px;margin:14px 0}
.sheet h3{margin:20px 0 8px}
table{border-collapse:collapse;width:100%;font-size:.94rem;background:var(--surface)}
th,td{border:1px solid var(--border);padding:5px 8px;text-align:right;vertical-align:top}
td:not(:first-child){white-space:nowrap}
th:first-child,td:first-child{text-align:left}
th{font-weight:600;background:var(--surface-muted)}
tr.gov td{font-weight:600}
tr.gov td:first-child{box-shadow:inset 4px 0 0 var(--redline)}
.gov-tag{color:var(--redline);font-weight:600;white-space:nowrap}
.tbl-scroll{overflow-x:auto}
dl.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;margin:6px 0}
dl.kv dt{color:var(--muted)}
dl.kv dd{margin:0}

/* formulas, written out like a hand calc */
.calc{font-family:var(--math);font-size:1.02rem;line-height:1.7}
.calc h4{font-family:var(--ui-narrow);font-size:1rem;margin:14px 0 2px;font-weight:600}
.calc p{margin:0 0 2px;padding-left:14px;text-indent:-14px;overflow-wrap:anywhere}
.calc b{font-weight:700}
details.calc-wrap > summary{cursor:pointer;font-weight:600;font-family:var(--ui-narrow);font-size:1.05rem;margin-top:18px}

.note{border-left:4px solid;padding:8px 12px;margin:10px 0;font-size:.94rem;max-width:72ch}
.note.warn{background:var(--warn-bg);border-color:var(--warn-edge);color:var(--warn-ink)}
.note.bad{background:var(--bad-bg);border-color:var(--bad-ink);color:var(--bad-ink)}
.note.info{background:var(--surface);border-color:var(--dim)}
ul.assume{margin:6px 0;padding-left:20px;font-size:.93rem}
ul.assume li{margin:3px 0}
.empty{color:var(--muted);font-size:1.05rem;padding:30px 0}
.empty b{color:var(--ink)}
.actions{display:flex;gap:8px;flex-wrap:wrap}
button{font:inherit;font-size:.92rem;color:var(--ink);background:var(--surface);border:1px solid var(--ink);border-radius:var(--r);padding:5px 12px;cursor:pointer}
button:hover{background:var(--page)}
button.primary{background:var(--redline);border-color:var(--redline);color:#fff}
button.small{font-size:.85rem;padding:3px 9px}
.busy{opacity:.55;transition:opacity .15s}

/* profile drawing on the sheet */
.profile svg{width:100%;height:auto;display:block;background:var(--surface);border:1px solid var(--border)}

/* ------------------------------------------------------------------ home */
.tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0;margin-top:28px;border-top:2px solid var(--ink)}
.tools a{display:block;padding:20px 22px 22px 0;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--rule)}
.tools a:hover h2{color:var(--redline)}
.tools h2{font-size:1.4rem;margin-bottom:6px}
.tools p{color:var(--muted);max-width:44ch}
.tools .soon{color:var(--muted)}
.tools .soon h2{color:var(--muted)}
.foot{margin-top:40px;color:var(--muted);font-size:.88rem;max-width:80ch}

@media (max-width:640px){
  h1{font-size:1.7rem}
  .sheet{padding:16px}
  .answer .val{font-size:2.5rem}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
@media print{
  .side,.mtop,.form-col,.actions,details.pic,.no-print{display:none!important}
  .tool{display:block}
  .sheet{box-shadow:none;border:0;background:var(--surface)}
  details.calc-wrap > *{display:block}
  body{background:var(--surface)}
}

/* ------------------------------------------------------------------ account + sign-in */
.signin{max-width:440px}
.signin .or{color:var(--muted);margin:14px 0 8px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ------------------------------------------------------------------ projects: a job register */
.pj-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.filters{display:flex;flex-wrap:wrap;gap:4px 16px;align-items:flex-end;margin:20px 0 6px;padding:14px 0 6px;border-top:2px solid var(--ink);border-bottom:1px solid var(--rule)}
.filters .f{margin-bottom:8px;min-width:140px}
.filters .f.grow{flex:1 1 280px}
.filters .check{margin:0 0 14px}
table.ledger{background:var(--surface);table-layout:fixed;min-width:640px}
table.ledger td{overflow-wrap:anywhere}
.add-label button{white-space:nowrap}
table.ledger th,table.ledger td{border:0;border-bottom:1px solid var(--rule);text-align:left;padding:8px 10px}
table.ledger th{font-weight:600;font-size:.86rem;color:var(--muted);background:transparent}
table.ledger td:first-child a{font-weight:600;color:var(--ink);text-decoration:none}
table.ledger td:first-child a:hover{color:var(--redline);text-decoration:underline}
table.ledger tr:hover td{background:#F6F4EE}
table.ledger td:last-child,table.ledger th:last-child{text-align:right}
.group{margin-top:22px}
.group h2{font-size:1.15rem;margin-bottom:6px}
.group h2 small{color:var(--muted);font-weight:400;font-size:.9rem;margin-left:6px}
.tag{display:inline-block;font-size:.84rem;line-height:1.3;padding:1px 8px;border-radius:999px;border:1px solid var(--tc);color:var(--tc);background:var(--surface);white-space:nowrap}
.newp{background:var(--surface);border:1px solid var(--rule);border-left:4px solid var(--redline);padding:16px 18px;margin:16px 0}
.newp h2{margin-bottom:10px}

/* one project */
.pj-title{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:4px 0 18px}
.title-input{font-family:var(--ui-narrow);font-weight:600;font-size:2rem;border:0;border-bottom:2px solid transparent;background:transparent;padding:2px 0;flex:1 1 300px;min-width:0;color:var(--ink)}
.title-input:hover{border-bottom-color:var(--rule)}
.title-input:focus{border-bottom-color:var(--ink);outline:none}
.pj-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.3fr);gap:36px;align-items:start}
@media (max-width:980px){.pj-grid{grid-template-columns:minmax(0,1fr)}}
.lbl{font-weight:500;font-size:.95rem}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 8px}
.chip{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.chip input{width:16px;height:16px;accent-color:var(--ink)}
.add-label{display:flex;gap:8px;max-width:340px}
.danger{border-top:1px solid var(--rule);margin-top:18px;padding-top:14px}
.results-ph{margin-top:26px;border-top:1px solid var(--rule);padding-top:14px}

/* notes: a sheet of the calc pad, ruled not gridded */
.notes-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.toolbar{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 0;padding:6px;background:var(--surface);border:1px solid var(--border);border-bottom:0}
.toolbar button{font-size:.86rem;padding:3px 9px;border-color:var(--border)}
.editor{min-height:280px;background-color:var(--surface);background-image:linear-gradient(transparent 27px,#E7E4DB 28px);background-size:100% 28px;
  border:1px solid var(--border);padding:8px 18px 18px;line-height:28px;font-size:1rem;overflow-wrap:anywhere}
.editor:focus{outline:2px solid var(--focus);outline-offset:-1px}
.editor p,.editor ul,.editor ol,.editor blockquote{margin:0}
.editor h2,.editor h3{font-size:1.15rem;line-height:28px;margin:0}
.editor ul[data-checklist],.ver-body ul[data-checklist]{list-style:none;padding-left:4px}
.editor ul[data-checklist] > li,.ver-body ul[data-checklist] > li{position:relative;padding-left:28px}
.editor ul[data-checklist] > li::before,.ver-body ul[data-checklist] > li::before{content:"";position:absolute;left:2px;top:6px;width:15px;height:15px;border:1.6px solid var(--ink);border-radius:2px;background:var(--surface);cursor:pointer}
.editor ul[data-checklist] > li[data-checked]::before,.ver-body ul[data-checklist] > li[data-checked]::before{background:var(--ink);box-shadow:inset 0 0 0 2.5px #fff}
.editor ul[data-checklist] > li[data-checked]{color:var(--muted);text-decoration:line-through}
.ver{border-bottom:1px solid var(--rule);padding:10px 0}
.ver-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.ver-body{color:var(--muted);font-size:.93rem;margin-top:6px;max-height:160px;overflow:auto}

.pw{display:flex;gap:6px}
.pw input{flex:1 1 auto}
.signin form{margin-bottom:8px}
.signin h2{font-size:1.15rem;margin:0 0 4px}

/* ------------------------------------------------------------------ drawing measure */
.btnlike{display:inline-block;font-size:.92rem;color:var(--ink);background:var(--surface);border:1px solid var(--ink);border-radius:var(--r);padding:4px 12px;text-decoration:none}
.btnlike:hover{background:var(--page)}
a.btnlike.primary{background:var(--redline);border-color:var(--redline);color:#fff;padding:6px 14px}
a.btnlike.primary:hover{filter:brightness(1.08);background:var(--redline)}
ul.plain{list-style:none;padding:0;margin:6px 0}
ul.plain li{padding:5px 0;border-bottom:1px solid var(--rule)}
.pj-drawings{margin-top:26px;border-top:1px solid var(--rule);padding-top:14px}
.dw-top .pj-title{margin-bottom:6px}
.dw-file{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.f.inline{flex-direction:row;align-items:center;gap:8px;margin:0}
.f.inline select{width:auto;max-width:320px}
.dw-tools{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:14px 0 4px;padding:6px;background:var(--surface);border:1px solid var(--rule);position:sticky;top:0;z-index:5}
.dw-tools button{font-size:.88rem;padding:4px 9px}
.dw-tools .dtool[aria-pressed=true]{background:var(--ink);color:#fff}
.dw-tools .sep{width:1px;height:22px;background:var(--rule);margin:0 4px}
.dw-hint{min-height:3em;margin:4px 0 8px}
.dw-main{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
@media (max-width:1100px){.dw-main{grid-template-columns:minmax(0,1fr)}}
.dw-pages{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.dw-pages button.on{background:var(--ink);color:#fff}
.dw-canvas{display:block;width:100%;height:max(480px,calc(100vh - 150px));background:#E8E6DE;border:1px solid var(--border);touch-action:none;user-select:none}
.dw-canvas .dlbl{font-family:var(--ui);font-weight:600;pointer-events:none}
.dw-canvas .item{cursor:pointer}
.dw-canvas .handle{cursor:move}
.dw-canvas .edge{cursor:pointer}
.dw-side section{border-top:1px solid var(--rule);padding:10px 0 12px}
.dw-side section:first-child{border-top:0;padding-top:0}
.dw-side h2{font-size:1.1rem;margin-bottom:4px}
.dw-side h2 small{color:var(--muted);font-weight:400}
.viewcard{background:var(--surface);border:1px solid var(--rule);padding:8px 10px;margin:8px 0}
.vc-head{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.vc-head input{flex:1 1 120px;width:auto}
.vc-head select{width:auto}
table.refs{background:transparent;font-size:.9rem;margin-bottom:6px}
table.refs th,table.refs td{border:0;border-bottom:1px solid var(--rule);padding:3px 4px;text-align:left}
table.refs tr.odd td{background:var(--bad-bg)}
table.refs input.rlen{padding:4px 6px}
.mini{font-size:.82rem;display:inline-flex;gap:3px;align-items:center;white-space:nowrap}
.grp{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:4px 0;border-bottom:1px solid var(--rule)}
.grp input.gname{flex:1 1 110px;width:auto;padding:4px 6px}
.grp input[type=color]{width:34px;height:28px;padding:0;border:1px solid var(--border-input);border-radius:var(--r)}
.gtot{font-size:.86rem;width:100%;padding-left:40px}
ol.mlist{list-style:none;padding:0;margin:0;max-height:60vh;overflow:auto}
ol.mlist li{display:flex;gap:8px;padding:7px 4px;border-bottom:1px solid var(--rule);cursor:pointer}
ol.mlist li.on{background:var(--surface);box-shadow:inset 3px 0 0 var(--ink)}
ol.mlist .sw{flex:none;width:10px;height:10px;border-radius:50%;margin-top:9px}
ol.mlist .mi{flex:1;min-width:0}
ol.mlist .mi > div:first-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
ol.mlist input.mlabel{flex:1 1 100px;width:auto;padding:3px 6px;font-size:.92rem}
ol.mlist .mval{white-space:nowrap}
ol.mlist .mrow{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:4px}
ol.mlist .mrow select,ol.mlist .mrow input{width:auto;padding:3px 6px;font-size:.86rem}

.settings{max-width:760px}
.settings fieldset{border-top:1px solid var(--rule)}
.choices{display:flex;flex-wrap:wrap;gap:10px}
.choice{display:flex;gap:8px;align-items:flex-start;border:1px solid var(--rule);background:var(--surface);padding:10px 14px;border-radius:var(--r);cursor:pointer;min-width:170px}
.choice:has(input:checked){border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.choice input{margin-top:4px;accent-color:var(--ink)}
.choice small{display:block;color:var(--muted);font-family:var(--ui)}
.settings select{max-width:360px}

.dw-canvas-wrap{position:relative}
.loupe{position:absolute;width:150px;height:150px;pointer-events:none;border-radius:50%;box-shadow:0 2px 10px rgba(0,0,0,.25);z-index:4}
.dw-tools #loupeBtn[aria-pressed=true]{background:var(--ink);color:#fff}
.dw-canvas .ref{cursor:pointer}

table.ledger tr[data-id]{cursor:pointer}
a.btnlike.small{font-size:.84rem;padding:2px 10px}
.pj-help{margin:-10px 0 16px}
.title-input{border-bottom:2px dashed var(--rule)}

main.wide{max-width:none;padding:14px 18px 40px}
#dw.nopanel .dw-main{grid-template-columns:minmax(0,1fr)}
#dw.nopanel .dw-side{display:none}
.dw-side{max-height:calc(100vh - 40px);overflow:auto;position:sticky;top:56px}
#dw:fullscreen{background:var(--page);padding:10px 14px;overflow:auto}
#dw:fullscreen .dw-top{display:none}
#dw:fullscreen .dw-canvas{height:calc(100vh - 110px)}
#dw:fullscreen .dw-side{max-height:calc(100vh - 110px);top:0}
#dw:fullscreen ol.mlist{max-height:none}
.vc-head .why{margin:0}

/* legal pages and footer */
.legal{max-width:76ch}
.legal h1{margin-bottom:4px}
.legal h2{font-size:1.15rem;margin:22px 0 6px}
.legal p,.legal li{line-height:1.6}
.legal-meta{color:var(--muted)}
.legal-key{background:var(--surface);border:1px solid var(--rule);border-left:4px solid var(--redline);padding:10px 18px;margin:16px 0}
.legal-key h2{margin-top:6px}
table.legal-table th,table.legal-table td{text-align:left;white-space:normal}
.site-foot{max-width:1320px;margin:0 auto;padding:18px 24px 30px;border-top:1px solid var(--rule);color:var(--muted);font-size:.86rem;display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap}
.site-foot nav{display:flex;gap:16px}
.site-foot a{color:var(--muted)}
.danger-zone{margin-top:14px}
.danger-zone .body{border-left:3px solid var(--bad-ink);padding-left:12px}
@media print{.site-foot{display:none}}

/* saved tool results */
.savebar{margin:4px 0 16px}
.savebar:empty{display:none}
.sb-row{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.sb-acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sb-form{background:var(--surface);border:1px solid var(--rule);padding:10px 14px;margin:10px 0;max-width:760px}
.sb-list{margin-top:8px}
.sb-list ul{margin:6px 0}
.pj-results{margin-top:26px}
.res-new{display:flex;gap:8px;flex-wrap:wrap}
.res-table{width:100%}
.res-table th,.res-table td{text-align:left;vertical-align:top}
.res-table td:first-child a{white-space:nowrap}
.res-table .res-ans{white-space:nowrap}
.res-chg td{border-top:0;padding-top:0}
.res-chg .note{margin:0}

/* plans */
.free-plan .side a[data-pro]::after,.free-plan .tools a[data-pro] h2::after{content:var(--pro-tag);font-size:.68rem;font-weight:600;letter-spacing:.02em;
  margin-left:6px;padding:1px 5px;border:1px solid currentColor;border-radius:3px;vertical-align:2px;color:var(--muted)}
.free-tag{display:none;font-size:.68rem;font-weight:600;margin-left:6px;padding:1px 5px;border:1px solid var(--good-ink,var(--ok));color:var(--good-ink,var(--ok));border-radius:3px;vertical-align:3px}
.free-plan .free-tag{display:inline}
.free-plan .res-new a[data-pro]::after{content:var(--pro-tag);font-size:.66rem;font-weight:600;margin-left:6px;padding:0 4px;border:1px solid currentColor;border-radius:3px;vertical-align:1px}
.pro-page{max-width:640px}
.pro-list li{margin:4px 0;line-height:1.5}

.home-cta{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:4px 0 22px}
.guest-note{max-width:900px}

/* unit converter */
.uc-cats{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 16px}
.uc-cats button{border-radius:999px;padding:4px 12px}
.uc-cats button[aria-selected=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.uc-form{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:start;max-width:980px}
.uc-swap{margin-top:30px}
.uc-side label{display:block;font-weight:600;margin-bottom:4px}
.uc-pair{display:flex;gap:8px;align-items:stretch}
.uc-pair input,.uc-ans{flex:1 1 50%;font-size:1.6rem;font-weight:600;min-width:0;padding:6px 10px}
.uc-ans{background:var(--surface);border:1px solid var(--rule);display:flex;align-items:center;overflow-x:auto;white-space:nowrap}
.uc-pair select{flex:1 1 50%;min-width:0}
.uc-swap{font-size:1.3rem;padding:6px 12px}
.uc-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:24px;margin-top:22px}
.uc-work .calc{padding:14px 16px}
.chain{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:6px 0 14px;font-size:1.05rem}
.chain .op{color:var(--muted)}
.chain .q{white-space:nowrap}
.chain .res{font-weight:700}
.frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;line-height:1.25}
.frac .num{border-bottom:1.5px solid currentColor;padding:0 4px 2px}
.frac .den{padding:2px 4px 0}
.chain .paren{font-size:2.1em;font-weight:300;line-height:1}
.chain sup{font-size:.8em;align-self:flex-start;margin-left:-4px}
.u.x{text-decoration:line-through;text-decoration-color:var(--redline);text-decoration-thickness:1.5px}
.uc-one{margin-top:10px}
.uc-table{width:100%}
.uc-table td{text-align:left;padding:3px 8px}
.uc-table td:first-child{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.uc-custom{margin-top:28px;max-width:980px}
.uc-def{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.uc-def>span{padding-bottom:10px}
.uc-minelist li{margin:6px 0}
@media (max-width:760px){.uc-form{grid-template-columns:1fr}.uc-swap{justify-self:start}.uc-grid{grid-template-columns:1fr}.uc-pair{flex-direction:column}}
.uc-work .notes-head label{display:flex;gap:6px;align-items:center;font-weight:400}
.uc-work .notes-head select{width:auto;padding:2px 6px}
.dw-del{margin-top:4px}

.uc-modes{display:inline-flex;border:1px solid var(--ink);border-radius:var(--r);overflow:hidden;margin:0 0 14px}
.uc-modes button{border:0;border-radius:0;padding:6px 16px}
.uc-modes button[aria-selected=true]{background:var(--ink);color:#fff}
.uc-type{max-width:980px}
.uc-type label{font-weight:600;display:block;margin-bottom:4px}
.uc-trow{display:flex;gap:8px}
.uc-trow input{flex:1;font-size:1.15rem;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.uc-eg{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0}
.uc-eg .eg{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.82rem}
.uc-verdict{font-size:1.05rem;margin:14px 0 8px}
.note.good{border-left-color:var(--good-ink,var(--ok));background:#E8EFE9}
#ucTOut .calc h4{margin:10px 0 2px}
.uc-base{font-size:2rem}
.uc-tsave{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}
.uc-tsave label{margin:0}
.uc-tsave input{width:auto;min-width:260px;padding:6px 10px;font-size:1rem}
.uc-tdef{background:var(--surface);border:1px solid var(--rule);padding:10px 14px;margin:12px 0}
.uc-saved{margin-top:20px}
.uc-saved code{font-size:.85rem;background:var(--surface);padding:1px 5px;border:1px solid var(--rule)}

.sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;border-top:2px solid var(--ink);padding-top:18px;margin-top:8px}
.sec-card h2{margin:0 0 8px;font-size:1.35rem}
.sec-card h2 a{color:var(--ink);text-decoration:none}
.sec-card>a{display:block;color:var(--ink);text-decoration:none;padding:10px 0;border-top:1px solid var(--rule)}
.sec-card>a:hover h3{text-decoration:underline}
.sec-card h3{margin:0 0 4px;font-size:1.05rem}
.sec-card p{margin:0;color:var(--muted)}
.free-plan .sec-card[data-pro] h2::after{content:var(--pro-tag);font-size:.68rem;font-weight:600;margin-left:8px;padding:1px 5px;border:1px solid currentColor;border-radius:3px;vertical-align:3px;color:var(--muted)}
.sec-card .free-tag{display:inline}
.home-cta .btnlike{padding:6px 14px}
@media (max-width:900px){.sections{grid-template-columns:1fr}}
/* unit library */
.uc-liblink{margin-left:14px;font-size:.92rem}
.free-plan .uc-modes button[data-pro]::after{content:var(--pro-tag);font-size:.66rem;font-weight:600;margin-left:6px;padding:0 4px;border:1px solid currentColor;border-radius:3px;vertical-align:2px}
.uc-upsell{max-width:820px}
.lib-top input{max-width:420px;font-size:1.05rem;padding:8px 10px}
.lib-grid{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:28px;margin:18px 0}
.lib-table{width:100%}
.lib-table th,.lib-table td,.lib-units th,.lib-units td{text-align:left;vertical-align:top;white-space:normal}
.lib-table th{width:30%}
.lib-table td.num{white-space:nowrap}
.lib-group{margin-top:22px}
.lib-units{width:100%}
.lib-units td:first-child{white-space:nowrap}
#lib code{font-size:.86rem;background:var(--surface);border:1px solid var(--rule);padding:0 4px;margin-right:3px}
@media (max-width:900px){.lib-grid{grid-template-columns:1fr}}

/* printed reports */
.rp-bar{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;max-width:860px;margin:0 auto 6px}
.rp-opts{display:flex;flex-wrap:wrap;gap:4px 14px;margin-left:auto}
.rp-opts label{font-size:.92rem;display:flex;gap:5px;align-items:center}
.rp-tip{max-width:860px;margin:0 auto 12px}
.report{max-width:860px;margin:0 auto 30px;background:var(--surface);border:1px solid var(--rule);box-shadow:0 2px 14px rgba(34,39,42,.08);padding:34px 40px;color:#1b1f21}
.rp-head{border-bottom:2px solid var(--ink);padding-bottom:14px;margin-bottom:18px}
.rp-brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:1.05rem}
.rp-brand span{font-weight:400;color:var(--muted);margin-left:6px}
.rp-head h1{margin:10px 0 8px;font-size:1.9rem}
.rp-meta{display:grid;grid-template-columns:max-content 1fr;gap:3px 16px;margin:0 0 12px}
.rp-meta dt{color:var(--muted)}
.rp-meta dd{margin:0}
.rp-disclaimer{border-left:3px solid var(--redline);padding:6px 12px;font-size:.88rem;background:#faf7f2}
.rp-toc{margin:0 0 10px}
.rp-toc ol{margin:4px 0 0}
.report h2{font-size:1.35rem;margin:26px 0 8px;padding-top:6px;border-top:1px solid var(--rule)}
.report h3{font-size:1.08rem;margin:18px 0 6px}
.report h3 small{font-weight:400;color:var(--muted)}
.rp-notebody{line-height:1.55}
.rp-sheetbox{border:1px solid var(--rule);padding:12px 16px;background:var(--surface)}
.rp-sheetbox .head .actions{display:none}
.rp-fig{position:relative;margin:8px 0;width:100%;border:1px solid var(--rule)}
.rp-fig img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
.rp-fig svg{position:absolute;inset:0;width:100%;height:100%}
.rp-table{width:100%;margin:8px 0;font-size:.92rem}
.rp-table th,.rp-table td{text-align:left;vertical-align:top;white-space:normal}
.rp-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:0}
.pj-title #pReport{margin-left:12px;white-space:nowrap}
@page{margin:16mm 14mm 18mm;
  @bottom-left{content:"Kendex: a calculation and measuring aid, not an engineering service";font-size:8pt;color:#5b625d}
  @bottom-right{content:"Page " counter(page) " of " counter(pages);font-size:8pt;color:#5b625d}}
@media print{
  .side,.mtop,.rp-bar,.rp-tip,.site-foot{display:none!important}
  main,main.wide{max-width:none;padding:0;margin:0}
  .report{border:0;box-shadow:none;padding:0;max-width:none;margin:0}
  .rp-head,.rp-sheet .rp-fig,.rp-table tr,.rp-disclaimer,.rp-sheetbox .answer,.rp-sheetbox table,.rp-sheetbox .box,.rp-sheetbox .calc h4+p{break-inside:avoid}
  .rp-result{break-before:auto}
  .rp-result+.rp-result{break-before:page}
  .rp-results,.rp-drawings{break-before:page}
  .report h2,.report h3{break-after:avoid}
  .rp-dot,.rp-disclaimer,.rp-fig svg{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  details.calc-wrap>summary{display:none}
}

/* measurements from drawings in the tools */
.f .pick-btn{display:inline-block;width:auto;margin-top:4px;font-size:.8rem;padding:1px 8px}
.link-note{font-size:.82rem;color:var(--muted);margin-top:3px}
.link-note .linkx{font-size:.75rem;padding:0 6px;margin-left:4px}
.pick-panel{background:var(--surface);border:1px solid var(--ink);box-shadow:0 6px 18px rgba(34,39,42,.15);padding:10px 12px;margin-top:6px;max-width:520px;position:relative;z-index:5}
.pick-top{display:flex;gap:10px;align-items:end;justify-content:space-between}
.pick-top label{font-size:.88rem}
.pick-list ul{margin:8px 0 0;max-height:280px;overflow:auto}
.pick-item{display:grid;grid-template-columns:auto 1fr;gap:0 10px;width:100%;text-align:left;border:0;border-top:1px solid var(--rule);border-radius:0;padding:6px 4px;background:none}
.pick-item:hover{background:var(--page)}
.pick-item b{grid-row:span 2;align-self:center;white-space:nowrap}
.pick-item small{color:var(--muted)}
/* wind and site climate */
.own-cp{width:100%;margin-top:6px}
.own-cp th{text-align:left;font-weight:600;font-size:.88rem}
.own-cp td{padding:2px 6px 2px 0;border:0}
.own-cp .f{margin:0}
.clim-table{width:100%;margin-bottom:8px}
.clim-table td{text-align:left}
.clim-table td:last-child{text-align:right;white-space:nowrap}
.clim-table small{color:var(--muted)}
#wsurf td small{color:var(--muted)}

/* construction calculator */
.cc-main{max-width:820px}
.cc-main>label{font-weight:600;display:block;margin-bottom:4px}
#ccGo{font-size:1.2rem;padding:4px 18px}
.cc-table{width:100%;max-width:520px;margin:6px 0 10px}
.cc-table td{text-align:left}
.cc-table td:last-child{text-align:right;font-variant-numeric:tabular-nums}
.cc-tape{margin-top:16px}
.cc-tape ol{margin:6px 0;max-height:260px;overflow:auto}
.cc-tapeitem{border:0;background:none;padding:3px 0;text-align:left;cursor:pointer}
.cc-tapeitem:hover code{text-decoration:underline}
.cc-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-top:26px;max-width:640px}
.cc-box{background:var(--surface);border:1px solid var(--rule);padding:12px 16px}
.cc-box h2{margin-top:0}
@media (max-width:860px){.cc-tools{grid-template-columns:1fr}}
.geo-key{color:var(--brand-blue);font-style:italic;display:inline-block;min-width:1.4em}
.geo-shapes{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.geo-shapes button{padding:5px 12px;font-size:.92rem}
.geo-shapes button[aria-selected=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.geo-panel{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:24px;align-items:start}
.geo-panel h2{margin-top:0}
.geo-pic{position:sticky;top:12px}
.geo-big{width:100%;max-width:260px;height:auto;display:block}
.geo-row{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(130px,1fr) minmax(90px,1fr);gap:10px;align-items:center;padding:5px 0;border-bottom:1px solid var(--border)}
.geo-row label{margin:0;font-weight:500}
.geo-row input{width:100%}
.geo-calc{color:var(--ok);font-weight:600;font-size:.95rem}
.geo-result{margin-top:20px}
.geo-result h3{font-size:1rem;font-weight:600}
.geo-table tr.geo-given td{background:var(--surface-muted)}
@media (max-width:640px){.geo-panel{grid-template-columns:1fr}.geo-pic{position:static;order:-1}.geo-row{grid-template-columns:1fr 1fr}.geo-row label{grid-column:1/-1}}
.wind-pic{margin:14px 0 18px}
.wind-pic svg{width:100%;max-width:720px;height:auto;display:block}
.wind-pic figcaption{font-size:.9rem;color:var(--muted);margin-top:4px}
@media print{.wind-pic{break-inside:avoid}}
body{--pro-tag:"Pro";--pro-tag-short:"Pro"}
body.pro-soon{--pro-tag:"In development";--pro-tag-short:"Soon"}

/* ------------------------------------------------------------------ Kendex components */
/* buttons: secondary by default, Blueprint Blue for the main action */
button,.btnlike{font:inherit;font-size:.9rem;font-weight:500;color:var(--text-primary);background:var(--surface);border:1px solid var(--border-input);border-radius:var(--radius-md);padding:6px 13px;cursor:pointer;line-height:1.35;transition:background-color .12s,border-color .12s}
button:hover,.btnlike:hover{background:var(--surface-muted);border-color:var(--text-secondary)}
button.primary,a.btnlike.primary{background:var(--brand-blue);border-color:var(--brand-blue);color:#fff}
button.primary:hover,a.btnlike.primary:hover{background:#284F6D;border-color:#284F6D;filter:none}
button.small,a.btnlike.small{font-size:.83rem;padding:3px 9px}
button:disabled{opacity:.55;cursor:default}
/* inputs: technical fields */
input[type=text],input[type=number],input[type=email],input[type=password],input[type=search],input:not([type]),select,textarea{font:inherit;font-size:.98rem;color:var(--text-primary);background:var(--surface);border:1px solid var(--border-input);border-radius:var(--radius-sm);padding:7px 9px;min-width:0}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand-blue);box-shadow:0 0 0 3px rgba(49,95,130,.18)}
.f > label,.lbl{font-weight:500;font-size:.92rem}
.check input,.chip input,.choice input{accent-color:var(--brand-blue)}
/* numbers people type and read: monospaced */
#ccExpr,.uc-trow input,.geo-row input,.uc-pair input,.uc-ans,.answer .val,.geo-calc,.cc-table td:last-child,.res-ans,.uc-table td:first-child{font-family:var(--font-mono)}
#ccExpr{font-size:1.05rem}
/* the results sheet: Drawing White, a ruled title strip, the answer in navy */
.sheet{background:var(--surface);background-image:none;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);padding:20px 24px 24px}
.sheet .head{border-bottom:1px solid var(--border-strong)}
.sheet .head h2{font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--text-secondary);font-weight:600}
.answer .val{color:var(--brand-navy);font-weight:600;font-size:2.4rem;letter-spacing:-.02em}
.answer .unit{color:var(--brand-navy)}
.box{background:var(--surface-muted);border:0;border-left:3px solid var(--brand-blue-light);border-radius:0 var(--radius-sm) var(--radius-sm) 0}
table{background:var(--surface);font-size:.92rem}
th,td{border:0;border-bottom:1px solid var(--border);padding:6px 9px}
th{background:var(--surface-muted);font-size:.84rem;color:var(--text-secondary);border-bottom:1px solid var(--border-strong)}
td:not(:first-child){font-family:var(--font-mono);font-size:.88rem}
td:not(:first-child) small,td:not(:first-child) .why{font-family:var(--font-sans)}
tr.gov td:first-child{box-shadow:inset 3px 0 0 var(--brand-copper)}
.gov-tag{color:#8E5A36}
.calc{background:transparent}
details.calc-wrap > summary{font-size:1rem;color:var(--text-primary)}
.uc-ans{background:var(--surface);border-radius:var(--radius-sm)}
/* status notes */
.note{border-left-width:3px;border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.note.info{background:#E9EFF3;border-color:var(--info);color:var(--text-primary)}
.note.good{background:#E8EFE9;border-left-color:var(--success)}
/* panels */
.cc-box,.newp,.sb-form,.uc-tdef,.viewcard,.legal-key{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}
.newp{border-left:3px solid var(--brand-blue)}
.legal-key{border-left:3px solid var(--brand-copper)}
.cc-box{padding:14px 18px}
.tag{background:var(--surface)}
.editor{border-radius:0 0 var(--radius-sm) var(--radius-sm)}
.toolbar{border-radius:var(--radius-sm) var(--radius-sm) 0 0}
.dw-tools{border-radius:var(--radius-sm)}
.dw-tools .dtool[aria-pressed=true],.dw-pages button.on,.dw-tools #loupeBtn[aria-pressed=true]{background:var(--brand-navy);border-color:var(--brand-navy);color:#fff}
.dw-canvas{border-radius:var(--radius-sm)}
table.ledger{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden}
table.ledger th{background:var(--surface-muted)}
table.ledger td:first-child a:hover{color:var(--brand-blue)}
table.ledger td{font-family:var(--font-sans)}
.filters{border-top:1px solid var(--border-strong)}
.title-input{font-family:var(--font-sans)}
/* segmented controls and chips: navy when on */
.seg,.uc-modes{border-color:var(--border-input);border-radius:var(--radius-md)}
.seg input:checked + span,.uc-modes button[aria-selected=true],.uc-cats button[aria-selected=true],.geo-shapes button[aria-selected=true]{background:var(--brand-navy);border-color:var(--brand-navy);color:#fff}
.seg label + label span{border-left-color:var(--border-input)}
.uc-cats button{border-radius:var(--radius-sm)}
.choice{border-radius:var(--radius-md)}
.choice:has(input:checked){border-color:var(--brand-blue);box-shadow:inset 0 0 0 1px var(--brand-blue)}
.geo-key{color:var(--brand-blue)}
.free-tag{border-color:var(--success);color:var(--ok)}
/* Pro / coming soon tags: quiet */
.free-plan .side a[data-pro]::after{content:var(--pro-tag-short);margin-left:auto;font-size:.64rem;font-weight:600;padding:0 5px;border:1px solid rgba(201,211,220,.35);border-radius:3px;color:#9AA3AD;letter-spacing:.02em}
.free-plan .side a.nav-sec[data-pro]::after{display:none}
.free-plan .side a[data-key][aria-current=page]::after{color:#fff;border-color:rgba(255,255,255,.5)}
body.side-narrow .side a[data-pro]::after{display:none}
.free-plan .sec-sub[data-pro]::after{content:var(--pro-tag);font-size:.66rem;font-weight:600;margin-left:8px;padding:1px 5px;border:1px solid currentColor;border-radius:3px;vertical-align:3px;color:var(--text-secondary)}

/* ------------------------------------------------------------------ home: a drafting-table header, then the tools */
.hero{position:relative;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px;align-items:center;margin:-30px -32px 0;padding:44px 32px 34px;
  background-color:var(--background);
  background-image:linear-gradient(rgba(109,145,172,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(109,145,172,.10) 1px,transparent 1px);
  background-size:24px 24px;border-bottom:1px solid var(--border)}
.hero h1{font-size:2.3rem;letter-spacing:-.02em;max-width:21ch}
.hero .lede{font-size:1.05rem}
.hero .home-cta{margin:18px 0 0}
.hero-sketch{width:100%;max-width:440px;justify-self:end;color:var(--brand-blue-light);opacity:.8}
.hero-sketch .dim{stroke:var(--brand-blue)}
.hero-sketch .tip{fill:var(--brand-blue);stroke:none}
.hero-sketch .node{fill:var(--brand-copper);stroke:none}
.hero-sketch .note-t{fill:var(--brand-blue);font:500 11px var(--font-mono);letter-spacing:.06em}
.sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;border-top:0;padding-top:0;margin-top:28px}
.sec-card h2{font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;color:var(--text-secondary);margin:0 0 10px;display:flex;align-items:center;gap:8px}
.sec-card h2 a{color:inherit;text-decoration:none}
.sec-card h2 a:hover{color:var(--brand-blue)}
.sec-card h2.sec-sub{margin-top:26px}
.sec-card .free-tag{letter-spacing:.02em;text-transform:none}
.sec-card > a.tile,.tools a.tile,.tile{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;margin:0 0 10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);color:var(--text-primary);text-decoration:none;transition:border-color .12s,box-shadow .12s}
.tile:hover{border-color:var(--brand-blue-light);box-shadow:var(--shadow-md)}
.tile:hover h3,.tile:hover h2{color:var(--brand-blue)}
.tile .ic{width:26px;height:26px;color:var(--brand-blue);margin-top:1px;stroke-width:1.4}
.tile h3,.tile h2{margin:0 0 3px;font-size:1rem}
.tile p{margin:0;color:var(--text-secondary);font-size:.92rem;max-width:56ch}
.sec-card > a{border-top:0}
.tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px;margin-top:24px;border-top:0}
.tools .tile{margin:0;padding:16px 18px}
.tools a:hover h2{color:var(--brand-blue)}
.foot{color:var(--text-secondary)}
@media (max-width:900px){
  .hero{grid-template-columns:1fr;margin:-22px -16px 0;padding:30px 16px 26px}
  .hero-sketch{display:none}
  .hero h1{font-size:1.85rem}
  .sections{grid-template-columns:1fr}
}
/* footer */
.site-foot{max-width:1280px;width:100%;margin:0 auto;padding:16px 32px 26px;border-top:1px solid var(--border)}
@media (max-width:900px){.site-foot{padding:16px}}
/* reports keep their own paper */
.report{border-radius:var(--radius-md)}
.rp-head{border-bottom:2px solid var(--brand-navy)}
.rp-brand .kmark{width:26px;height:26px;color:var(--brand-navy)}
.rp-brand .kmark .k-node{stroke:#fff}
.rp-brand{letter-spacing:.08em}
.rp-brand span{letter-spacing:0}

/* destructive: Error Red, used sparingly */
#delAcct,#dDelYes{background:var(--error);border-color:var(--error);color:#fff}
#delAcct:hover,#dDelYes:hover{background:#9A4740;border-color:#9A4740}

/* in development (Pro not open yet): faded, but still open to read about */
body.pro-soon.free-plan .side a[data-pro]:not([aria-current]){opacity:.55}
body.pro-soon.free-plan .side a[data-pro]:hover{opacity:.85}
body.pro-soon.free-plan .tile[data-pro],body.pro-soon.free-plan .tools .tile[data-pro]{opacity:.62;background:transparent;border-style:dashed}
body.pro-soon.free-plan .tile[data-pro]:hover{opacity:.9;box-shadow:none}
body.pro-soon.free-plan .uc-modes button[data-pro]{opacity:.6}
.soon-page{max-width:1100px}
.status-line{display:inline-flex;align-items:center;gap:8px;font:600 .74rem/1 var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:#7A5C1F;background:#F6ECDB;border:1px solid #E5CFA6;border-radius:var(--radius-sm);padding:6px 10px;margin:10px 0 4px}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--warning)}
.soon-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;margin-top:20px;align-items:start}
.soon-grid h2{font-size:1.05rem;margin:0 0 8px}
.soon-grid h2 + p{margin-top:0}
.soon-grid ul + h2{margin-top:22px}
.soon-list{margin:0;padding-left:20px}
.soon-list li{margin:5px 0}
.soon-pic details.pic{border-left:0;padding-left:0;margin:0}
.soon-pic details.pic > summary{display:none}
.soon-pic svg{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px}
@media (max-width:900px){.soon-grid{grid-template-columns:1fr}}
