:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f2f4f7;
  --text: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eff4ff;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --ok: #027a48;
  --ok-soft: #ecfdf3;
  --sidebar: 244px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% 0%, #eaf2ff 0%, rgba(234, 242, 255, 0) 55%),
    var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

::selection { background: #cfe0ff; color: #0b2b66; }

.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  background: rgba(255, 255, 255, .92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .22);
}
.brand-text { font-size: 15px; letter-spacing: -.01em; }
.brand-text b { color: var(--accent); font-weight: 750; }

.project-chip {
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.project-name { font-size: 13px; font-weight: 650; }
.project-domain { margin-top: 2px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-title {
  padding: 0 10px 5px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.nav-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #475467;
  font-size: 13.5px;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.version { color: var(--muted-2); font-size: 11px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar); }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(10px);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--muted-2); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px #ecfdf3; }
.user {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

/* Page */
.page { max-width: 1280px; margin: 0 auto; padding: 30px 28px 64px; }

.page-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
h2 { margin: 30px 0 12px; font-size: 17px; line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }
h3 { margin: 20px 0 8px; font-size: 14px; font-weight: 650; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.danger { color: var(--danger); }
.small { font-size: 13px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cards.cards-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.card-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.card-value { margin-top: 7px; font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.card-value.small { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.card-value.danger { color: var(--danger); }

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.table th, .table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f1f3f6;
}
.table th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody tr:hover td { background: #fcfcfd; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .url {
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #344054;
}

/* Badges */
.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #475467;
  font-size: 11.5px;
}
.sev {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.sev-crit, .sev-critical { background: var(--danger-soft); color: var(--danger); }
.sev-high { background: var(--warn-soft); color: var(--warn); }
.sev-med, .sev-medium { background: var(--accent-soft); color: var(--accent); }
.sev-low, .sev-info { background: var(--surface-3); color: var(--muted); }

/* Buttons and controls */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
button.secondary, .btn.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: #344054;
  box-shadow: none;
}
button.secondary:hover, .btn.secondary:hover { background: var(--surface-2); color: var(--text); }

select, input[type="text"], input[type="number"], input[type="search"], input[type="url"], input[type="date"] {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select:focus, input:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
button:focus-visible, a:focus-visible { outline: 2px solid #84adff; outline-offset: 2px; }

/* Filters and inline forms */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 16px; }
.filters label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11.5px; font-weight: 600; }

.inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline input[type="text"] { min-width: 190px; }
.inline select { min-width: 150px; }

/* Panels */
.panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; }
.panel ul { margin: 0; padding-left: 18px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.empty {
  padding: 26px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
}

pre {
  margin: 12px 0;
  padding: 14px;
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.5;
}
pre.json { max-height: 420px; }

.shot {
  max-width: 100%;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Task and settings forms */
.task-form, .settings-form { display: grid; gap: 12px; align-items: end; margin: 12px 0; }
.task-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-form label, .settings-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.task-form input, .task-form select,
.settings-form input, .settings-form select { width: 100%; }
.settings-form .checkbox-label { flex-direction: row; align-items: center; gap: 8px; }
.settings-form .checkbox-label input { width: auto; min-height: 0; }

.check-table .param {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 12px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
}
.check-table input[type="number"] { width: 110px; min-height: 32px; padding: 5px 7px; }
.check-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

@media (max-width: 1100px) {
  .cards, .cards.cards-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .app-shell { display: block; }
  .sidebar {
    position: static;
    width: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 10px;
  }
  .project-chip { display: none; }
  .sidebar-nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .nav-group { display: contents; }
  .nav-title { display: none; }
  .nav-item { min-height: 32px; padding: 6px 10px; font-size: 13px; }
  .sidebar-footer { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page { padding: 22px 16px 48px; }
}

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; gap: 4px; }
  h1 { font-size: 21px; }
  .settings-grid, .task-form, .settings-form { grid-template-columns: 1fr 1fr; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 9px 10px; }
  .table .url { max-width: 230px; }
  .topbar-right .status { display: none; }
}

@media (max-width: 520px) {
  .cards, .task-form, .settings-form { grid-template-columns: 1fr; }
  .table .url { max-width: 170px; }
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin: 0; }
  .page { max-width: none; padding: 0; }
  body { background: #fff; }
  .card, .table { box-shadow: none; }
  a { color: inherit; }
  tr { break-inside: avoid; }
}

/* Hints and clickable cards */
.tip {
  border-bottom: 1px dashed var(--muted-2);
  cursor: help;
  position: relative;
}
.tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 50;
  width: 280px;
  max-width: 80vw;
  padding: 9px 11px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: normal;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
}
.tip:hover::after, .tip:focus::after { opacity: 1; transform: translateY(0); }

a.card { display: block; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.card:hover {
  color: inherit;
  border-color: #b2c7ff;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
  transform: translateY(-1px);
}
a.card .card-arrow { float: right; color: var(--muted-2); font-weight: 400; }
a.card:hover .card-arrow { color: var(--accent); }

.chart { width: 100%; height: auto; display: block; margin: 8px 0 4px; }
.chart .grid { stroke: #eef1f5; stroke-width: 1; }
.chart .axis { fill: #98a2b3; font-size: 10px; }
.chart .line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { opacity: .12; }
.chart .dot { stroke: #fff; stroke-width: 1.5; }
.chart-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }

.report-section { margin-top: 28px; }
.report-section .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kpi-delta { margin-top: 4px; font-size: 12px; font-weight: 600; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--muted); }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.glossary { margin: 0; }
.glossary dt { margin-top: 12px; font-weight: 650; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .help-grid { grid-template-columns: 1fr; }
}

.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.donut-legend-item b { margin-left: auto; color: var(--text); }
.donut-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-grid .full { grid-column: 1 / -1; }
.chart-card { padding: 16px 16px 8px; }
.chart-card h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.report-cover {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f4f8ff 100%);
  box-shadow: var(--shadow);
}
.report-cover h1 { font-size: 28px; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }

.report-grid { align-items: start; }
@media print {
  .report-section { break-inside: avoid; }
  .report-cover { break-after: avoid; }
}

/* Public landing and auth */
.public-body { background: #f6f8fc; }
.public-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.public-nav { display: flex; align-items: center; gap: 18px; }
.public-nav a { font-size: 13.5px; }
.public-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 28px 70px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.hero h1 span { color: var(--accent); }
.hero-lead { max-width: 540px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 14px; }
.hero-note { font-size: 12px; }
.hero-visual { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 450px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .14);
  overflow: hidden;
  transform: rotate(1.2deg);
}
.mock-top { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #fbfcfe; border-bottom: 1px solid var(--line); }
.mock-top span { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; }
.mock-body { padding: 18px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-kpi { display: flex; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.mock-kpi small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.mock-kpi b { margin-top: 4px; font-size: 18px; }
.mock-kpi i { color: var(--ok); font-size: 10px; font-style: normal; }
.mock-chart { height: 120px; margin: 18px 0; display: flex; align-items: end; gap: 8px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.mock-chart span { flex: 1; min-height: 8px; background: #cfe0ff; border-radius: 5px 5px 0 0; }
.mock-chart span:nth-child(3n) { background: var(--accent); }
.mock-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f2f4f7; color: var(--muted); font-size: 12px; }
.mock-row b { color: var(--text); }
.landing-section { max-width: 1200px; margin: 0 auto; padding: 56px 28px; }
.landing-head { margin-bottom: 24px; }
.landing-head h2 { margin: 8px 0 0; font-size: 30px; letter-spacing: -.03em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.feature-num { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.feature h3 { margin: 12px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.landing-steps { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.landing-steps h2 { margin: 10px 0 22px; font-size: 30px; letter-spacing: -.03em; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); line-height: 2; }
.steps b { color: var(--text); }
.steps-card { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.steps-card h3 { margin: 10px 0; font-size: 22px; }
.auth-shell { min-height: calc(100vh - 190px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(440px, 100%); padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 10px 0 8px; font-size: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-form input { width: 100%; }
.auth-form button { margin-top: 4px; }
.form-error, .notice { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 10px 0; }
.form-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecdca; }
.notice { background: var(--ok-soft); color: var(--ok); border: 1px solid #abefc6; }
.project-select { width: 100%; margin-bottom: 4px; font-weight: 600; }
.user-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 8px; }
.user-email { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 11px; font-weight: 600; box-shadow: none; }
.link-button:hover { background: none; color: var(--accent-2); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 28px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .landing-steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .public-header, .public-footer { padding-left: 16px; padding-right: 16px; }
  .hero, .landing-section { padding-left: 16px; padding-right: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
}

.project-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f4f8ff 100%);
  box-shadow: var(--shadow);
}
.project-hero h1 { margin: 8px 0 6px; font-size: 30px; }
.project-hero p { margin: 0 0 16px; max-width: 620px; }
.health-ring {
  --score: 50;
  width: 132px;
  height: 132px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), #e9eef7 0);
  display: grid;
  place-items: center;
  position: relative;
}
.health-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.health-ring-inner { position: relative; text-align: center; }
.health-ring-inner b { display: block; font-size: 32px; line-height: 1; letter-spacing: -.04em; }
.health-ring-inner span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.health-caption { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 760px) { .project-hero { flex-direction: column; align-items: flex-start; } .health-ring { margin: 10px 0 0 12px; } }

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.pagination { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 16px; }

.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.preset-save input[type="text"] { min-width: 190px; }

.job-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.job-actions form { margin: 0; }

/* Rewritten landing: editorial, no generic card grid */
.landing-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 58px 28px 72px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 52px;
  align-items: center;
}
.landing-hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(44px, 5.7vw, 76px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 750;
}
.landing-hero h1 em { font-style: normal; color: var(--accent); }
.landing-sub { max-width: 590px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.landing-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; }
.landing-points li::before { content: "—"; margin-right: 7px; color: var(--accent); }
.landing-shot { margin: 0; }
.landing-shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(16, 24, 40, .13);
}
.landing-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 11px; }
.landing-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.landing-stats b { color: var(--text); font-weight: 650; }
.editorial { max-width: 1200px; margin: 0 auto; padding: 48px 28px; border-top: 1px solid var(--line); }
.editorial-head { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; margin-bottom: 26px; }
.editorial-head h2 { margin: 0; max-width: 720px; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.work-list { border-top: 1px solid var(--text); }
.work-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.work-item .num { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.work-item h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.work-item p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.work-item .detail { color: var(--muted); font-size: 12px; line-height: 1.6; border-left: 2px solid var(--accent-soft); padding-left: 14px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.principle { padding: 22px 24px 0 0; border-right: 1px solid var(--line); }
.principle:last-child { border-right: 0; padding-right: 0; }
.principle b { display: block; margin-bottom: 8px; font-size: 14px; }
.principle p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.audience h3 { margin: 0 0 6px; font-size: 16px; }
.audience p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.landing-cta {
  max-width: 1200px;
  margin: 0 auto 54px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.landing-cta h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.03em; }
.landing-cta p { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) {
  .landing-hero { grid-template-columns: 1fr; gap: 30px; padding-top: 34px; }
  .editorial-head { grid-template-columns: 1fr; gap: 10px; }
  .work-item { grid-template-columns: 44px 1fr; }
  .work-item .detail { grid-column: 2; }
}
@media (max-width: 720px) {
  .landing-hero, .editorial { padding-left: 16px; padding-right: 16px; }
  .principles, .audience { grid-template-columns: 1fr; }
  .principle { border-right: 0; padding-right: 0; }
  .landing-cta { margin-left: 16px; margin-right: 16px; flex-direction: column; align-items: flex-start; }
}

/* Legal pages */
.legal-shell { max-width: 1120px; margin: 0 auto; padding: 36px 28px 60px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 42px; align-items: start; }
.legal-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 3px; }
.legal-nav .nav-title { padding-left: 10px; }
.legal-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.legal-nav a:hover { background: var(--surface-3); color: var(--text); }
.legal-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.legal-body { max-width: 760px; }
.legal-body h1 { margin: 8px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.legal-meta { color: var(--muted); font-size: 12px; }
.operator-card { margin: 22px 0 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; line-height: 1.65; }
.legal-body h2 { margin: 28px 0 10px; font-size: 19px; letter-spacing: -.02em; }
.legal-body h3 { margin: 20px 0 6px; font-size: 15px; }
.legal-body p, .legal-body li { color: #344054; font-size: 14px; line-height: 1.72; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul, .legal-body ol { margin: 0 0 14px; padding-left: 20px; }
.legal-body li { margin: 4px 0; }
.legal-body a { text-decoration: underline; text-underline-offset: 2px; }
.legal-body .note { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: #344054; font-size: 13px; }
@media (max-width: 900px) { .legal-shell { grid-template-columns: 1fr; gap: 20px; padding-left: 16px; padding-right: 16px; } .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; } .legal-nav .nav-title { display: none; } }

/* Cookie dialog */
.cookie-dlg {
  width: 420px;
  max-width: calc(100vw - 28px);
  margin: 0;
  padding: 20px;
  position: fixed;
  inset: auto 18px 18px auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 50px rgba(16, 24, 40, .22);
  z-index: 70;
}
.cookie-dlg::backdrop { background: transparent; }
.cookie-dlg:not([open]) { display: none; }
.cookie-dlg h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.02em; }
.cookie-dlg p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.cookie-dlg .ck-more { display: grid; gap: 7px; margin: 0 0 12px; }
.cookie-dlg .ck-more[hidden] { display: none; }
.ck-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ck-opt input { flex: none; margin-top: 3px; accent-color: var(--accent); }
.ck-opt span { display: grid; gap: 2px; }
.ck-opt b { font-size: 12.5px; font-weight: 650; }
.ck-opt i { color: var(--muted); font-size: 11.5px; font-style: normal; line-height: 1.4; }
.ck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck-actions .btn { min-height: 40px; padding: 8px 10px; font-size: 12.5px; white-space: normal; }
.ck-actions .btn[hidden] { display: none; }
#cookie-error { color: var(--danger); font-size: 12px; }
@media (max-width: 520px) { .cookie-dlg { inset: auto 0 0; width: auto; max-width: none; border-radius: 14px 14px 0 0; } }

/* Larger, calmer form controls */
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], input[type="date"], textarea {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}
textarea { min-height: 110px; resize: vertical; }
select:focus, input:focus, textarea:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
button:not(.link-button), .btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px;
}
.auth-form label, .settings-form label, .task-form label { font-size: 12px; }
.auth-form { gap: 14px; }

.public-footer { flex-wrap: wrap; align-items: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: flex-end; max-width: 650px; }
.footer-links a { color: var(--muted); font-size: 11.5px; }
.footer-links a:hover { color: var(--accent); }
.footer-links .link-button { font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) { .footer-links { justify-content: flex-start; } }
