/* SME Business Operations Hub - "Ledger" design system.
   Distinct from the other diagnostack.cloud products: aubergine + brass palette, all-sans typography,
   dark sidebar shell, soft elevated cards, segmented tabs. System fonts only (no third-party requests). */
:root {
  --ink: #1B1530; --ink-2: #3A3350; --muted: #6B6680; --line: #E6E3EE; --line-2: #D6D1E2;
  --canvas: #F5F4F8; --surface: #FFFFFF;
  --plum: #5B2A86; --plum-d: #45206A; --plum-t: #F1EAF8; --plum-2: #7A45A8;
  --brass: #B8862B; --brass-d: #8F6614; --brass-t: #FAF1DE;
  --ok: #1E7F5C; --ok-t: #E3F3EC; --warn: #B7791F; --warn-t: #FCF1DC; --bad: #C2413A; --bad-t: #FBE7E5; --info: #2F5DB5; --info-t: #E7EEFA;
  --night: #1B1530; --night-2: #261D40; --night-3: #332852; --night-text: #CFC8E0;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r-s: 8px; --r-m: 12px; --r-l: 18px;
  --shadow: 0 1px 2px rgba(27, 21, 48, .05), 0 10px 28px -14px rgba(27, 21, 48, .18);
  --shadow-lg: 0 2px 6px rgba(27, 21, 48, .06), 0 28px 60px -24px rgba(27, 21, 48, .35);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.6 var(--font); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--plum-d); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h2 { font-size: 1.15rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; max-width: 72ch; }
small { font-size: .84rem; }
.muted, small.muted { color: var(--muted); }
.muted { font-size: .92rem; }
:focus-visible { outline: 3px solid rgba(184, 134, 43, .65); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 max(1.25rem, var(--safe-r)) 0 max(1.25rem, var(--safe-l)); }
.narrow { max-width: 480px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; gap: 1.1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .grid2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.fine { font-size: .86rem; color: var(--muted); }
.kicker { font-size: .85rem; font-weight: 600; color: var(--brass-d); margin: 0 0 .7rem; letter-spacing: .01em; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 58ch; }
.mono { font-family: var(--mono); font-size: .9em; background: var(--canvas); padding: .08rem .35rem; border-radius: 5px; }
.mono-block { font-family: var(--mono); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-s); padding: .7rem .9rem; overflow-x: auto; font-size: .88rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 10px; font: 600 .95rem/1.2 var(--font);
  text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(27, 21, 48, .06); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.go { background: linear-gradient(180deg, var(--plum-2), var(--plum)); border-color: var(--plum-d); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px -6px rgba(91, 42, 134, .55); }
.btn.go:hover { background: var(--plum-d); color: #fff; }
.btn.ghost { background: var(--surface); }
.btn.danger { color: var(--bad); border-color: #EBC3BF; background: var(--surface); }
.btn.danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { min-height: 36px; padding: .3rem .8rem; font-size: .88rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--night-text); font: inherit; cursor: pointer; min-height: 44px; }
.linkbtn:hover { color: #fff; }

/* ---------- forms ---------- */
.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; color: var(--ink-2); }
.field small { display: block; margin-top: .3rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .8rem; font: 16px/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--plum); box-shadow: 0 0 0 4px rgba(91, 42, 134, .14); outline: none; }
input[type=file] { font-size: 15px; min-height: 44px; padding: .5rem; border: 1px dashed var(--line-2); border-radius: 10px; width: 100%; background: var(--canvas); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset[disabled] { opacity: .75; }
legend { font-weight: 700; padding: 0; margin-bottom: .5rem; font-size: .92rem; }
.check { margin: 0 0 .75rem; }
.check label { display: flex; gap: .65rem; align-items: flex-start; min-height: 44px; padding-top: .55rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; flex: none; accent-color: var(--plum); }
.check small { display: block; margin: -.3rem 0 0 2rem; color: var(--muted); }
.hp { position: absolute; left: -5000px; }
.formrow { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .formrow { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.filters { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 1.1rem; padding: .9rem; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); }
.filters .field { margin: 0; }
.filters .field label { font-size: .78rem; color: var(--muted); }
@media (min-width: 1000px) { .filters { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; } }
.code-input { font: 700 1.6rem/1 var(--mono) !important; letter-spacing: .35em; text-align: center; }

/* ---------- messages ---------- */
.flash { padding: .8rem 1rem; border-radius: var(--r-s); margin: 0 0 1rem; background: var(--ok-t); color: #134E39; border: 1px solid #BFE3D2; }
.flash.error { background: var(--bad-t); color: #7E231D; border-color: #F0C6C2; }
.flash.warn { background: var(--warn-t); color: #6E4A0C; border-color: #F0DCB2; }
.errors { padding: .8rem 1rem .8rem 2rem; margin: 0 0 1rem; border-radius: var(--r-s); background: var(--bad-t); color: #7E231D; border: 1px solid #F0C6C2; }
.banner { padding: .6rem 1.2rem; background: var(--brass-t); color: #5C420C; border-bottom: 1px solid #EEDCB5; font-size: .92rem; }
.banner.stop { background: var(--bad-t); color: #7E231D; border-color: #F0C6C2; }
.banner a { color: inherit; font-weight: 700; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border-radius: var(--r-m); padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); border: 1px solid #EEEBF3; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel.flat { background: transparent; box-shadow: none; border: 0; padding-left: .2rem; padding-right: .2rem; }
.panel-alert { border-top: 3px solid var(--bad); }
.panel-go { border-top: 3px solid var(--plum); background: linear-gradient(180deg, #FBF8FE, #FFFFFF 60%); }
.empty { padding: 2rem 1.5rem; background: var(--surface) radial-gradient(circle at 100% 0, var(--plum-t), transparent 45%); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); border: 1px solid #EEEBF3; margin-bottom: 1.1rem; }
.panel .table-wrap { box-shadow: none; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .78rem; font-weight: 600; color: var(--muted); background: #FAF9FC; white-space: nowrap; letter-spacing: .01em; }
tbody tr:hover td { background: #FCFBFE; }
tr:last-child td { border-bottom: 0; }
.bar-col { width: 40%; }
meter { width: 100%; height: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: center; margin: 1rem 0; }

/* badges, status and deadline chips */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 6px; font-size: .76rem; font-weight: 600; background: var(--canvas); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.badge.confirmed, .badge.done { background: var(--ok-t); color: var(--ok); border-color: #C7E6D8; }
.badge.pending { background: var(--warn-t); color: var(--warn); border-color: #F0DCB2; }
.badge.cancelled { background: var(--bad-t); color: var(--bad); border-color: #F0C6C2; }
.badge.in_progress { background: var(--info-t); color: var(--info); border-color: #CAD8F2; }
.badge.pri-high { background: var(--bad-t); color: var(--bad); border-color: #F0C6C2; }
.badge.restricted { background: var(--plum-t); color: var(--plum); border-color: #DECDEF; }
.due { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .5rem; border-radius: 6px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.due::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.due-over { background: var(--bad); color: #fff; }
.due-over::before { background: #fff; }
.due-today { background: var(--brass); color: #fff; }
.due-today::before { background: #fff; }
.due-soon { background: var(--warn-t); color: var(--warn); }
.due-near { background: var(--info-t); color: var(--info); }
.due-later { background: var(--canvas); color: var(--muted); }
.type-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .18rem .5rem; border-radius: 6px; white-space: nowrap; letter-spacing: .01em; }
.t-renewal { background: var(--brass-t); color: var(--brass-d); }
.t-document { background: var(--info-t); color: var(--info); }
.t-task { background: var(--plum-t); color: var(--plum); }
.dl-item { display: grid; grid-template-columns: 5.4rem 1fr auto; gap: .7rem; align-items: start; }
.dl-main { min-width: 0; overflow-wrap: anywhere; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin-bottom: 1.2rem; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; display: block; background: var(--surface); border-radius: var(--r-m); padding: 1rem 1.1rem 1rem 1.25rem; box-shadow: var(--shadow); border: 1px solid #EEEBF3; overflow: hidden; color: var(--ink); text-decoration: none; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--plum); }
.kpis .kpi:nth-child(2)::before { background: var(--brass); }
.kpis .kpi:nth-child(3)::before { background: var(--info); }
.kpis .kpi:nth-child(4)::before { background: var(--ok); }
.kpi b { display: block; font: 700 1.75rem/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .86rem; }
a.kpi:hover { box-shadow: var(--shadow-lg); color: var(--ink); }
.kpi-alert { background: linear-gradient(180deg, #FFF6F5, #FFFFFF); }
.kpis .kpi-alert::before { background: var(--bad); }
.kpi-alert b { color: var(--bad); }

/* segmented tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; margin-bottom: 1.1rem; background: #EAE7F0; border-radius: 12px; }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: .35rem .9rem; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a:hover { background: rgba(255, 255, 255, .6); }
.tabs a[aria-current=page] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 21, 48, .15); }

/* chips (quick add) */
.quick summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; gap: .5rem; list-style: none; }
.quick summary::-webkit-details-marker { display: none; }
.quick summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 7px; background: var(--brass-t); color: var(--brass-d); font-weight: 800; }
.quick[open] summary::before { content: "-"; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .7rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .35rem .85rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--plum); color: var(--plum); background: var(--plum-t); }

/* tasks */
.tasklist { padding: .3rem 1.1rem; }
.task-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; }
.task-row form { margin: 0; }
.task-main { min-width: 0; overflow-wrap: anywhere; }
.task-row.is-done .task-main b { text-decoration: line-through; color: var(--muted); }

/* misc app bits */
.setup li { display: flex; gap: .7rem; align-items: center; }
.tick { width: 1.5rem; height: 1.5rem; border-radius: 8px; border: 2px solid var(--line-2); flex: none; display: inline-grid; place-items: center; font-size: .78rem; color: #fff; }
.tick.on { background: var(--ok); border-color: var(--ok); }
.catgrid { display: grid; gap: 0 .8rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.catgrid .field { margin-bottom: .6rem; }
.subform { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1.1rem; }
.share { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .75rem .9rem; background: var(--canvas); border: 1px dashed var(--line-2); border-radius: var(--r-s); }
.share code { font-family: var(--mono); font-size: .84rem; word-break: break-all; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head h1 { margin: 0 0 .15rem; }
.page-head p { margin: 0; }
.summary { background: var(--canvas); border-radius: var(--r-s); padding: 1rem; margin-bottom: 1rem; }
.only-mobile { display: block; }
.more-menu a { display: flex; align-items: center; min-height: 46px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }

/* ---------- app shell: dark sidebar ---------- */
.app-top { display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: 0 max(1rem, var(--safe-r)) 0 max(1rem, var(--safe-l)); background: var(--night); color: #fff; position: sticky; top: 0; z-index: 30; }
.app-top .brand { color: #fff; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1rem/1.1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.ws-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.topsearch { flex: 1; max-width: 26rem; margin-left: auto; }
.topsearch input { min-height: 38px; padding: .35rem .9rem; border-radius: 999px; background: var(--night-3); border-color: transparent; color: #fff; }
.topsearch input::placeholder { color: #A99FC2; }
.topsearch input:focus { background: #fff; color: var(--ink); box-shadow: 0 0 0 4px rgba(184, 134, 43, .35); }
@media (max-width: 560px) { .topsearch { display: none; } .app-top .bell { margin-left: auto; } }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #fff; border-radius: 10px; }
.bell:hover { background: var(--night-3); color: #fff; }
.bell svg { width: 22px; height: 22px; }
.bell .n { position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brass); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.shell { display: block; }
.side { display: none; }
.main { padding: 1.3rem max(1rem, var(--safe-r)) calc(6rem + var(--safe-b)) max(1rem, var(--safe-l)); min-width: 0; max-width: 1240px; }
.tabbar { position: fixed; left: .6rem; right: .6rem; bottom: calc(.6rem + var(--safe-b)); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--night); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 40; padding: .3rem; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; font-size: .7rem; color: var(--night-text); text-decoration: none; border-radius: 14px; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current=page] { background: var(--night-3); color: #fff; }
.tabbar a[aria-current=page] svg { color: var(--brass); }
@media (min-width: 960px) {
  .app-top { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; flex-direction: column; align-items: stretch; padding: 1.1rem .9rem; gap: 1rem; background: var(--night); }
  .app-top .topsearch { order: 2; margin: 0; max-width: none; flex: none; }
  .app-top .bell { position: absolute; top: 1rem; right: .7rem; }
  .app-top .brand { padding-right: 2.6rem; }
  .shell { display: block; margin-left: 248px; }
  .side { display: block; position: fixed; left: 0; top: 7.6rem; bottom: 0; width: 248px; overflow-y: auto; padding: .4rem .8rem 2rem; z-index: 31; }
  .main { padding: 2rem 2.4rem 3rem; margin: 0 auto; }
  .tabbar { display: none; }
  .only-mobile { display: none; }
  .banner { margin-left: 248px; }
}
.side a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; min-height: 42px; color: var(--night-text); text-decoration: none; border-radius: 10px; font-weight: 500; font-size: .94rem; }
.side a svg { width: 18px; height: 18px; color: #8E84A8; }
.side a:hover { background: var(--night-2); color: #fff; }
.side a[aria-current=page] { background: var(--night-3); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.side a[aria-current=page] svg { color: var(--brass); }
.side .group { font-size: .74rem; color: #8E84A8; padding: 1.1rem .75rem .35rem; font-weight: 600; letter-spacing: .02em; }
.side form { padding: .8rem .75rem; }

/* ---------- public site ---------- */
.top { background: var(--night); color: #fff; position: relative; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.top .brand { color: #fff; }
.top nav { display: flex; gap: .2rem 1.2rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--night-text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; font-weight: 500; font-size: .95rem; }
.top nav a:hover { color: #fff; }
.top nav a.btn { color: #fff; }
.top nav a.btn:not(.go) { background: transparent; border-color: #5A4E78; box-shadow: none; }
.hero { position: relative; padding: 4rem 0 4.5rem; background: radial-gradient(1200px 500px at 85% -10%, #4A2A70 0%, transparent 60%), linear-gradient(180deg, var(--night) 0%, #22193A 100%); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(184, 134, 43, .6), transparent); }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -.03em; max-width: 17ch; }
.hero .lede { color: #D9D3E8; }
.hero .kicker { color: #E2B866; }
.hero .fine { color: #A99FC2; }
.hero .btn:not(.go) { background: transparent; color: #fff; border-color: #5A4E78; box-shadow: none; }
.hero .btn:not(.go):hover { border-color: #fff; }
.hero-grid { display: grid; gap: 2.6rem; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero-slim { padding: 3rem 0 3.2rem; }
.hero-slim h1 { max-width: 22ch; }
/* product window mock-up */
.board { margin: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-l); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.1rem; background: #FAF9FC; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.board-head::before { content: ""; width: 42px; height: 10px; margin-right: .8rem; background: radial-gradient(circle at 5px 5px, #E9747A 4px, transparent 4.5px), radial-gradient(circle at 21px 5px, #E8C36A 4px, transparent 4.5px), radial-gradient(circle at 37px 5px, #7CC8A0 4px, transparent 4.5px); }
.board-head b { color: var(--ink); margin-right: auto; font-weight: 700; }
.demo-list { list-style: none; margin: 0; padding: .4rem 1.1rem .8rem; }
.demo-list li { display: grid; grid-template-columns: 5.2rem 1fr auto; gap: .7rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.demo-list li:last-child { border-bottom: 0; }
.demo-list b { display: block; font-weight: 600; }
.demo-list small { color: var(--muted); }
.demo-list li.done b { text-decoration: line-through; color: var(--muted); }
.section { padding: 4rem 0; }
.section.alt { background: var(--surface); }
.section h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.025em; }
.features { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.6rem; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid #EEEBF3; border-radius: var(--r-l); padding: 1.3rem 1.3rem 1.1rem; box-shadow: var(--shadow); }
.section.alt .feature { background: #FCFBFE; }
.feature h3 { display: flex; gap: .7rem; align-items: center; font-size: 1.02rem; }
.feature h3::before { content: ""; width: 2.1rem; height: 2.1rem; border-radius: 10px; flex: none; background: var(--c, var(--plum)); box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .7); }
.feature p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.c0 { --c: var(--plum); } .c1 { --c: var(--info); } .c2 { --c: var(--plum-2); } .c3 { --c: var(--brass); }
.c4 { --c: var(--bad); } .c5 { --c: var(--ok); } .c6 { --c: var(--ink-2); } .c7 { --c: #B4467E; }
.industries { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0; padding: 0; list-style: none; }
.industries li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .4rem .85rem; font-size: .92rem; font-weight: 500; }
.steps { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } .steps-compact { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border-radius: var(--r-l); padding: 1.3rem; border: 1px solid #EEEBF3; box-shadow: var(--shadow); }
.steps li::before { content: "0" counter(step); display: block; font: 800 1.6rem/1 var(--display); color: var(--brass); margin-bottom: .7rem; letter-spacing: -.02em; }
.steps p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.plans { display: grid; gap: 1.1rem; grid-template-columns: 1fr; margin-top: 1.6rem; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); } .plans-2 { grid-template-columns: repeat(2, minmax(0, 24rem)); } }
.plan { position: relative; background: var(--surface); border-radius: var(--r-l); padding: 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow); border: 1px solid #EEEBF3; }
.plan.featured { border: 2px solid var(--plum); box-shadow: var(--shadow-lg); }
.plan.featured::before { content: "Most popular"; position: absolute; top: -.8rem; left: 1.4rem; background: var(--plum); color: #fff; font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; }
.plan .price { font: 800 2.4rem/1.05 var(--display); letter-spacing: -.03em; margin: .6rem 0 .1rem; font-variant-numeric: tabular-nums; }
.plan ul { padding: 0; margin: 1rem 0 1.4rem; flex: 1; list-style: none; }
.plan li { padding: .35rem 0 .35rem 1.6rem; position: relative; font-size: .95rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .75rem; width: .8rem; height: .45rem; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.compare th[scope=row] { font-weight: 600; background: #FAF9FC; }
.compare td:last-child { color: var(--plum); font-weight: 600; }
.faq details { background: var(--surface); border: 1px solid #EEEBF3; border-radius: var(--r-m); padding: .2rem 1.1rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brass-d); font-weight: 400; }
.faq details[open] summary::after { content: "-"; }
.faq details p { color: var(--ink-2); }
.cta-band { background: linear-gradient(120deg, var(--plum-d), var(--plum) 55%, #6D3A9C); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #E7DDF3; }
.cta-band .btn.go { background: #fff; color: var(--plum-d); border-color: #fff; box-shadow: none; }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); box-shadow: none; }
.foot { padding: 2.2rem 0 calc(2.2rem + var(--safe-b)); background: var(--night); color: #A99FC2; font-size: .9rem; }
.foot nav { display: flex; gap: .3rem 1.2rem; flex-wrap: wrap; }
.foot a { color: var(--night-text); min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.foot a:hover { color: #fff; }
.legal { max-width: 74ch; padding: 2.5rem 0 3.5rem; }
.legal h2 { margin-top: 2rem; }
.guide-list { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.6rem 0 2.2rem; }
@media (min-width: 760px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-card { display: block; background: var(--surface); border-radius: var(--r-l); padding: 1.3rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); border: 1px solid #EEEBF3; }
.guide-card:hover { box-shadow: var(--shadow-lg); color: var(--ink); }
.guide-card h2 { font-size: 1.1rem; }
.guide-card p { color: var(--ink-2); }
.guide-card span { color: var(--plum); font-weight: 700; }
.dl-templates li { margin-bottom: .5rem; }
.guide ul { max-width: 72ch; }
.guide-cta { margin-top: 2.6rem; border-top: 3px solid var(--brass); }
.auth-card { background: var(--surface); border-radius: var(--r-l); padding: 1.8rem; margin: 2.5rem auto 3rem; box-shadow: var(--shadow-lg); border: 1px solid #EEEBF3; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--muted); margin: 1.1rem 0; font-size: .88rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gbtn { width: 100%; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; padding: 0 1.2rem; background: #0F0B1C; color: #fff; }
.admin-bar .brand { color: #fff; }
.admin-bar .btn { background: transparent; color: #fff; border-color: #4A3F66; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .side, .tabbar, .app-top, .no-print { display: none !important; } .shell { margin: 0; } .main { padding: 0; } }
.hero .fine { margin-top: .9rem; }
@media (max-width: 640px) {
  .dl-item, .demo-list li { grid-template-columns: 1fr auto; grid-template-areas: "tag due" "main main"; row-gap: .35rem; }
  .dl-item .type-tag, .demo-list .type-tag { grid-area: tag; justify-self: start; }
  .dl-item .dl-main, .demo-list li > span:nth-child(2) { grid-area: main; }
  .dl-item > div:last-child, .demo-list .due { grid-area: due; justify-self: end; }
  .page-head .row .btn { flex: 1 1 auto; }
}

/* ---------- knowledge base, free tools, positioning ---------- */
.pillars-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.pillars { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; padding-top: 1.8rem; padding-bottom: 1.8rem; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillars h2 { font-size: 1rem; margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem; }
.pillars h2::before { content: ""; width: .55rem; height: .55rem; border-radius: 3px; background: var(--brass); }
.pillars p { color: var(--muted); font-size: .92rem; margin: 0; }
.mt { margin-top: 2.4rem; }
.tpl-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.2rem; }
@media (min-width: 760px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl { background: var(--surface); border: 1px solid #EEEBF3; border-radius: var(--r-l); padding: 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tpl p { color: var(--ink-2); font-size: .93rem; flex: 1; }
.tpl .btn { align-self: flex-start; }
.tool-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-card { display: block; background: var(--surface); border-radius: var(--r-l); padding: 1.6rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-lg); border: 1px solid #EEEBF3; border-top: 4px solid var(--plum); }
.tool-card:hover { color: var(--ink); transform: translateY(-1px); }
.tool-card h2 { font-size: 1.3rem; margin-top: .8rem; }
.tool-card p { color: var(--ink-2); }
.tool-ic { display: inline-block; font-size: .74rem; font-weight: 700; padding: .25rem .6rem; border-radius: 6px; }
.go-link { color: var(--plum); font-weight: 700; }

.tool-form td { padding: .45rem .5rem; }
.tool-pick { grid-template-columns: 1fr auto; max-width: 640px; }
.article-wrap { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-bottom: 3rem; }
@media (min-width: 1000px) { .article-wrap { grid-template-columns: minmax(0, 1fr) 300px; } .article-side { padding-top: 2.5rem; position: sticky; top: 1rem; align-self: start; } }
.side-card { background: var(--surface); border: 1px solid #EEEBF3; border-radius: var(--r-m); padding: 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.side-card p { color: var(--ink-2); font-size: .92rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.compare-box { margin-top: 2.6rem; background: var(--surface); border-radius: var(--r-l); padding: 1.5rem; box-shadow: var(--shadow-lg); border-top: 4px solid var(--brass); }
.cmp { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 700px) { .cmp { grid-template-columns: 1fr 1fr; } }
.cmp > div { background: var(--canvas); border-radius: var(--r-m); padding: 1rem 1.1rem; }
.cmp ul { margin: 0; padding-left: 1.1rem; }
.cmp-good { background: var(--plum-t) !important; }
.checklist-sheet { background: var(--surface); border-radius: var(--r-l); padding: 1.6rem; box-shadow: var(--shadow-lg); border: 1px solid #EEEBF3; margin-bottom: 1.4rem; }
.cl-grid { display: grid; gap: 1.2rem 2rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 860px) { .cl-grid { grid-template-columns: 1fr 1fr; } }
.cl-block h3 { color: var(--plum); border-bottom: 2px solid var(--plum-t); padding-bottom: .3rem; }
.cl { list-style: none; margin: 0; padding: 0; }
.cl li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.box { width: 1.05rem; height: 1.05rem; border: 2px solid var(--ink-2); border-radius: 4px; flex: none; margin-top: .2rem; }
.print-only { display: none; }
@media print {
  .top, .foot, .no-print, .hero { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .section { padding: 0; }
  .checklist-sheet { box-shadow: none; border: 0; padding: 0; }
  .cl-grid { grid-template-columns: 1fr 1fr; }
}
