:root {
  --bg: #f7f9f8; --surface: #fff; --ink: #14201a; --muted: #5b6b62; --line: #e1e8e4;
  --brand: #0f9d58; --brand-dark: #0b7a44; --brand-soft: #e5f6ec; --accent: #0b1f17;
  --warn: #b45309; --warn-soft: #fef3c7; --err: #b42318; --err-soft: #fee4e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,40,28,.06), 0 8px 24px rgba(16,40,28,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1511; --surface: #14201a; --ink: #e8f1ec; --muted: #9bb0a5; --line: #243329;
    --brand: #2fc27a; --brand-dark: #55d896; --brand-soft: #14301f; --accent: #050a07;
    --warn-soft: #3a2a08; --err-soft: #3d1511; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
img, svg { max-width: 100%; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: ui-monospace, monospace; font-size: .95rem; }
nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
nav.main a:hover, nav.main a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  nav.main { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 16px; }
  nav.main.open { display: flex; }
}

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.small { padding: 6px 12px; font-size: .875rem; border-radius: 8px; }
.btn.danger { background: var(--err); }
.btn.block { width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; font-weight: 500; background: var(--surface); }
.check input { width: auto; margin-top: 4px; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* layout blocks */
section.block { padding: 72px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.hero { background: radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--accent); color: #fff; padding: 88px 0 80px; }
.hero p.lead { font-size: 1.2rem; max-width: 620px; color: #c5d8cd; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn.secondary { background: transparent; color: #fff; border-color: #ffffff55; }
.hero .btn.secondary:hover { background: #ffffff18; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #ffffff1a; color: #bff0d6; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 6px; }
.card .price { color: var(--brand-dark); font-weight: 700; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 10px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.steps li { list-style: none; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }
ul.steps { padding: 0; margin: 0; }
.page-head { padding: 48px 0 24px; }
.layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding-bottom: 72px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .opt-grid { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label { margin: 0; padding: 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); height: 100%; }
.choice input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
.choice input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.choice b { display: block; font-size: 1.05rem; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.slot:hover { border-color: var(--brand); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* summary & tables */
.summary dl { margin: 0; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.summary .row:last-child { border: 0; }
.summary .total { font-size: 1.4rem; font-weight: 800; color: var(--brand-dark); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.alert.error { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--brand-soft); color: var(--brand-dark); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.status.paid, .status.confirmed, .status.done, .status.accepted { background: var(--brand-soft); color: var(--brand-dark); }
.status.cancelled { background: var(--err-soft); color: var(--err); }

/* footer */
.site-footer { background: var(--accent); color: #b9cbc1; padding: 48px 0 28px; margin-top: 0; }
.site-footer a { color: #bff0d6; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }

/* invoice document */
.doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.doc a { color: inherit; }
.doc th { color: #555; } .doc td, .doc th { border-color: #e5e5e5; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.doc-total { margin-left: auto; width: min(320px, 100%); margin-top: 16px; }
.doc-total .row { display: flex; justify-content: space-between; padding: 6px 0; }
.doc-total .row.grand { border-top: 2px solid #111; font-weight: 800; font-size: 1.15rem; margin-top: 6px; padding-top: 10px; }
.stamp { display: inline-block; border: 3px solid var(--brand); color: var(--brand); font-weight: 800; padding: 2px 14px; border-radius: 8px; transform: rotate(-6deg); text-transform: uppercase; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .doc { border: 0; box-shadow: none; padding: 0; }
}
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat b { display: block; font-size: 1.6rem; }
[hidden] { display: none !important; }
