:root {
  --ink: #14213d;
  --ink-2: #3d4a66;
  --muted: #6b7489;
  --line: #dfe3ea;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #1f6f5c;
  --accent-2: #e6f2ee;
  --warn-bg: #fff6e0;
  --warn: #7a5a00;
  --danger: #a3261b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }

.notice { background: var(--warn-bg); color: var(--warn); font-size: .85rem; text-align: center; padding: .45rem 1rem; }
header.site { background: var(--card); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--accent); }
.langs { display: flex; gap: .35rem; flex-wrap: wrap; }
.langs a { font-size: .85rem; text-decoration: none; color: var(--ink-2); padding: .2rem .5rem; border-radius: 6px; }
.langs a.on { background: var(--accent-2); color: var(--accent); font-weight: 600; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
main { padding: 2rem 0 3rem; }
footer.site { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: .85rem; color: var(--muted); }
footer.site a { color: var(--muted); margin-right: 1rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.25rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); }

.promises { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; color: var(--ink-2); }
.promises li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: .4rem; }

form .field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
label .opt { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: .3rem; }
.help { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
select, input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number] {
  width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #c8ced9; border-radius: 8px; background: #fff; color: var(--ink);
}
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: .75rem 1.25rem; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: .4rem .75rem; font-size: .9rem; }
.errors { background: #fdecea; color: var(--danger); border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.errors p { margin: 0; }

.hero-count { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.hero-count .n { font-size: clamp(3rem, 10vw, 4.5rem); font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.hero-count .n.text { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.hero-count .what { font-size: 1.2rem; color: var(--ink-2); max-width: 28ch; }
.profile-line { color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; background: var(--warn-bg); color: var(--warn); font-size: .75rem; font-weight: 600; border-radius: 99px; padding: .1rem .55rem; vertical-align: middle; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { margin-bottom: .7rem; }
.bars .row { display: flex; justify-content: space-between; gap: .5rem; font-size: .95rem; }
.bars .row b { white-space: nowrap; }
.bar { height: 8px; background: var(--accent-2); border-radius: 99px; margin-top: .25rem; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bars .sub { font-size: .8rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: .25rem .75rem; font-size: .9rem; }
.stat { font-size: 1.8rem; font-weight: 700; }
.value { font-size: 1.9rem; font-weight: 700; margin: .25rem 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: #fbfcfd; }
.step h3 { margin-bottom: .3rem; }
.step p { font-size: .92rem; color: var(--ink-2); margin: 0; }

.consents { border: 1px solid var(--line); border-radius: 10px; padding: .25rem 1rem; margin: .5rem 0 1rem; }
.consent { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); font-weight: 400; margin: 0; cursor: pointer; }
.consent:last-child { border-bottom: 0; }
.consent input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--accent); }
.consent b { display: block; }
.consent span { font-size: .9rem; color: var(--ink-2); }

.email-preview { border: 1px dashed #b9c1ce; border-radius: 10px; background: #fff; padding: 1rem 1.25rem; }
.email-preview .hdr { font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: .75rem; }
.email-preview pre { white-space: pre-wrap; font: inherit; margin: 0; }

.sector-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.sector-list a { display: flex; justify-content: space-between; gap: .5rem; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.sector-list a:hover { border-color: var(--accent); }
.sector-list b { color: var(--accent); white-space: nowrap; }

/* Dashboard */
.dash main { padding-top: 1.25rem; }
.dash .wrap { max-width: 1200px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.kpi .n { font-size: 1.6rem; font-weight: 700; }
.kpi .l { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr.link:hover { background: #f9fafb; cursor: pointer; }
.pill { display: inline-block; font-size: .75rem; border-radius: 99px; padding: .1rem .5rem; background: var(--accent-2); color: var(--accent); margin: 0 .2rem .2rem 0; white-space: nowrap; }
.pill.grey { background: #eef0f4; color: var(--ink-2); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.status { font-weight: 600; }
.flash { background: var(--accent-2); color: var(--accent); border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.draft h3 { margin-top: 1rem; }
.draft ul { margin: .25rem 0 .75rem; padding-left: 1.2rem; }
.draft .opening { background: var(--accent-2); border-radius: 8px; padding: .75rem 1rem; font-size: 1.05rem; }
.inline { display: inline; }
.checks { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.checks label { font-weight: 400; display: flex; gap: .35rem; align-items: center; margin: 0; font-size: .9rem; }

.chips li.pending { background: var(--warn-bg); border-color: #f0dfae; color: var(--warn); }
dialog.modal { border: 0; border-radius: var(--radius); padding: 1.25rem; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(20, 33, 61, .3); }
dialog.modal::backdrop { background: rgba(20, 33, 61, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.modal-head p { margin: 0; }

.lookup { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.lookup-row { display: flex; gap: .5rem; }
.lookup-row input { flex: 1; min-width: 0; }
.lookup-msg { font-size: .9rem; margin-top: .35rem; }
.lookup-msg.ok { color: var(--accent); }
.lookup-msg.err { color: var(--danger); }
