:root {
  --ink: #13253a;
  --muted: #536173;
  --line: #dde3ea;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --accent: #13253a;
  --accent-dark: #0b1726;
  --amber: #e8a317;
  --ok: #1e7a46;
  --err: #b42318;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.02em; max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.3rem; letter-spacing: .04em; color: var(--ink); text-decoration: none; margin: 0; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); padding: 12px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-small { padding: 8px 14px; font-size: .9rem; color: #fff !important; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--bg-alt); }

.hero { padding: 88px 0 72px; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--accent); font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.card p { color: var(--muted); margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.steps li { counter-increment: step; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; }

.points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 28px; }
.points li { padding-left: 18px; border-left: 3px solid var(--accent); }
.points strong { display: block; }

.notice { background: #fff8e6; border: 1px solid #f0d58a; border-radius: var(--radius); padding: 12px 16px; font-size: .95rem; }

form { display: grid; gap: 16px; margin-top: 24px; }
label { display: block; font-weight: 600; font-size: .95rem; }
label > input, label > textarea { display: block; margin-top: 6px; }
.optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #c3ccd6; border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.choice legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; width: 100%; }
.choice label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
.section-intro { color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.consent input { margin-top: 5px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.5em; }
.form-status.ok { color: var(--ok); font-weight: 600; }
.form-status.err { color: var(--err); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; color: var(--muted); font-size: .95rem; }
.small { font-size: .85rem; }

.prose { max-width: 720px; padding: 48px 16px 72px; margin: 0 auto; }
.prose h2 { font-size: 1.25rem; margin-top: 2em; }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 56px 0 48px; }
}

/* Logo */
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 42px; width: auto; }
.site-footer .brand img { height: 36px; }
.tagline { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin-top: 4px; }
.hero { border-top: 4px solid var(--amber); }
.points li { border-left-color: var(--amber); }

/* ---- Multi-page layout ---- */
.skip { position: absolute; left: -10000px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Main menu: dropdowns open on hover and keyboard focus; phones get a menu button. */
.site-nav { display: flex; align-items: center; gap: 20px; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.menu > li { position: relative; }
.menu-link { display: block; padding: 20px 12px; color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.menu > li:hover > .menu-link, .menu > li.is-current > .menu-link { color: var(--ink); box-shadow: inset 0 -3px 0 var(--amber); }
.has-sub > .menu-link::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.sub { display: none; position: absolute; top: 100%; left: -8px; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 28px rgba(19, 37, 58, .12); padding: 8px; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.sub a:hover, .sub a:focus { background: var(--bg-alt); }
.sub strong { display: block; font-size: .95rem; }
.sub span { display: block; color: var(--muted); font-size: .85rem; }
.sub .sub-all { font-weight: 600; font-size: .9rem; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.nav-toggle { display: none; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 20px; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 12px 28px rgba(19, 37, 58, .12); }
  .site-nav.open { display: flex; }
  .menu { flex-direction: column; gap: 0; }
  .menu-link { padding: 12px 4px; font-weight: 700; }
  .menu > li:hover > .menu-link, .menu > li.is-current > .menu-link { box-shadow: none; }
  .has-sub > .menu-link::after { display: none; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 8px; min-width: 0; }
  .sub span { display: none; }
  .sub a { padding: 8px 12px; }
  .sub .sub-all { border-top: 0; margin-top: 0; }
  .site-nav .btn { text-align: center; margin-top: 8px; }
}

.page-head { padding: 64px 0 40px; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.page-head h1 { max-width: 24ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.more { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--amber); }
.more:hover { color: var(--accent-dark); }
.narrow-left > * { max-width: 820px; }

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.card-link .arrow { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .95rem; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 48px; }
.who { margin-top: 8px; }
.plain { padding-left: 1.1em; margin: 0 0 1em; }
.plain li { margin-bottom: 8px; }

.timeline { list-style: none; counter-reset: t; padding: 0; margin: 0; }
.timeline li { counter-increment: t; position: relative; padding: 0 0 18px 48px; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.timeline li::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline strong { display: block; }

.faq { margin: 8px 0 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.cta-band { background: var(--ink); color: #fff; padding: 48px 0; }
.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #c9d4e0; }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #f1b638; }

.guide-card .tag { align-self: flex-start; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: var(--bg-alt); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.reviewed { font-size: .85rem; color: var(--muted); }
.guide-card .reviewed { margin-top: auto; padding-top: 14px; }
.article { padding: 56px 0 72px; }
.article h2 { font-size: 1.3rem; margin-top: 1.8em; }
.article .eyebrow a { color: inherit; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: 6px; }
.article .btn { margin-top: 16px; }

.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin: 8px 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-base { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.company-line { margin-top: 24px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---- Admin inbox (/admin, behind Cloudflare Access) ---- */
.admin-user { display: flex; gap: 18px; font-size: .9rem; }
.admin-user a { color: var(--muted); }
.admin-main { padding-top: 28px; padding-bottom: 64px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.admin-top h1 { font-size: 1.8rem; margin: 0; }
.btn-small-dark { padding: 8px 14px; font-size: .9rem; }
.admin-tools { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 20px 0 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: .9rem; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs span { font-weight: 400; opacity: .75; margin-left: 4px; }
.search { min-width: 260px; font-size: .85rem; }
.search input { font: inherit; display: block; width: 100%; margin-top: 4px; padding: 8px 12px; border: 1px solid #c3ccd6; border-radius: 8px; }
.admin-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 24px; align-items: start; }
.req-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.req-list li + li { border-top: 1px solid var(--line); }
.req-row { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 0; padding: 12px 14px; cursor: pointer; }
.req-row { box-shadow: inset 5px 0 0 var(--st, #c3ccd6); padding-left: 18px; }
.req-row.status-new { --st: #e8a317; background: #fff6e0; }
.req-row.status-quoted { --st: #3b6ea8; background: #edf3fa; }
.req-row.status-ordered { --st: #2f8a55; background: #eaf7ef; }
.req-row.status-closed { --st: #8a96a3; background: #f3f4f6; color: #4a5562; }
.req-row:hover { filter: brightness(.97); }
.req-row.active { outline: 2px solid var(--ink); outline-offset: -2px; }
.req-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.req-row-meta { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.badge { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge-new { background: #fdecc8; color: #7a4d00; }
.badge-quoted { background: #dbe7f5; color: #163a63; }
.badge-ordered { background: #d7f0e0; color: #1e5a36; }
.badge-closed { background: #eceef1; color: #4a5562; }
.req-detail { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: #fff; position: sticky; top: 84px; }
.req-detail { border-top: 6px solid var(--st, var(--line)); }
.req-detail.status-new { --st: #e8a317; }
.req-detail.status-quoted { --st: #3b6ea8; }
.req-detail.status-ordered { --st: #2f8a55; }
.req-detail.status-closed { --st: #8a96a3; }
.req-detail h2 { margin-bottom: 4px; padding-right: 40px; }
.req-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.req-close:hover { background: var(--bg-alt); }
.req-danger { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.link-danger { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: #a3261b; text-decoration: underline; cursor: pointer; }
.req-confirm { background: #fdeceb; border: 1px solid #f1b8b3; border-radius: 8px; padding: 14px 16px; }
.req-confirm p { margin: 0 0 12px; font-size: .95rem; }
.btn-danger { background: #a3261b; border-color: #a3261b; color: #fff; }
.btn-danger:hover { background: #861e15; }
.req-detail h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 6px; }
.req-fields { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 16px 0 0; }
.req-fields dt { color: var(--muted); font-size: .9rem; }
.req-fields dd { margin: 0; overflow-wrap: anywhere; }
.req-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--bg-alt); border-radius: 8px; padding: 12px 14px; margin: 0; }
.req-actions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 22px; }
.req-actions select { display: block; margin-top: 6px; font: inherit; padding: 10px 12px; border: 1px solid #c3ccd6; border-radius: 8px; background: #fff; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .req-detail { position: relative; top: auto; }
  .search { min-width: 0; width: 100%; }
}
