:root {
  /* Colors and shapes follow coss ui's dark theme (coss.com/ui), with the raced.gg yellow as the
     primary color. Two typefaces: Inter for everything, Barlow Condensed (800 italic) for headlines. */
  --bg: #111111;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --line: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.03);
  --hover: rgba(255, 255, 255, 0.05);
  --text: #f5f5f5;
  --muted: #8f8f8f;
  --ring: #737373;
  --accent: #f0ff00;
  --accent-hover: #d9e600;
  --accent-soft: rgba(240, 255, 0, 0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-card: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --max: 1120px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark; /* native checkboxes, radios, and pickers match the dark theme */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; color: var(--text); }
.logo svg { height: 26px; width: auto; aspect-ratio: 121.208 / 18; display: block; }
.footer-logo { color: var(--muted); }
.footer-logo svg { height: 20px; }
.hero-logo {
  display: block; width: min(560px, 100%); height: auto; aspect-ratio: 121.208 / 18;
  color: var(--text); margin-bottom: 48px;
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-style: italic;
  font-size: 28px; letter-spacing: 0.04em; text-decoration: none;
}
.wordmark span { color: var(--muted); }
.nav { display: flex; gap: 28px; align-items: center; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-toggle { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius);
  background: var(--accent); color: #000; border: 1px solid var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--shadow);
  font-family: var(--body); font-weight: 500; font-size: 15px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08); }
.btn:disabled { opacity: .64; cursor: default; }
.btn.ghost { background: var(--input-bg); color: var(--text); border-color: var(--input); box-shadow: var(--highlight), var(--shadow); }
.btn.ghost:hover { background: var(--hover); border-color: var(--input); }
.nav .btn { min-height: 34px; padding: 0 12px; font-size: 14px; color: #000; }
.nav .btn.ghost { color: var(--text); } /* e.g. Sign out: white text on the dark button */

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 120px 0 110px; border-bottom: 1px solid var(--line); }
.hero::before {
  /* checkered flag fade */
  content: ""; position: absolute; inset: 0 0 0 auto; width: 55%;
  background-image:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%),
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%);
  background-size: 96px 96px; background-position: 0 0, 48px 48px;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.9), transparent 85%);
  mask-image: linear-gradient(to left, rgba(0,0,0,.9), transparent 85%);
  /* skew from the bottom-right corner so the pattern always reaches the window's right edge */
  transform: skewX(-12deg); transform-origin: bottom right;
}
.hero .wrap { position: relative; }
.eyebrow {
  font-family: var(--body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--muted); margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(34px, 9.5vw, 112px); line-height: 0.92; letter-spacing: 0.01em;
  margin: 0 0 24px; white-space: nowrap;
}
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 52ch; margin: 0 0 36px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .actions .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head h2 {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 56px); line-height: 1; margin: 0 0 12px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* ---------- Services ---------- */
.service-group + .service-group { margin-top: 64px; }
.group-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 32px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.group-head h3 {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 32px; line-height: 1; margin: 0; color: var(--accent);
}
.group-head p { color: var(--muted); margin: 0; font-size: 15px; max-width: 52ch; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--highlight), var(--shadow); padding: 28px 24px; position: relative; display: flex; flex-direction: column; transition: background .2s ease; }
.service:hover { background: var(--surface-2); }
.service h4 { font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.service p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.price-tag {
  margin-top: auto; align-self: flex-start;
  font-family: var(--body); font-weight: 500; font-size: 12px; line-height: 1.4;
  color: var(--muted); background: var(--input-bg); border: 1px solid var(--input); border-radius: var(--radius-sm); padding: 3px 8px; text-decoration: none;
}
a.price-tag:hover { color: var(--text); background: var(--hover); }

/* ---------- Packages ---------- */
#packages { padding-top: 0; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--highlight), var(--shadow); padding: 28px 24px; }
.tier-name { font-family: var(--body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--muted); margin: 0; }
.tier-name.bronze { color: #977548; }
.tier-name.silver { color: #8f9499; }
.tier-name.gold { color: #e1a01f; }
.tier-name.platinum { color: #88b1dc; }
.price { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 64px; line-height: 1; margin: 8px 0 4px; }
.price-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.price-alt { font-size: 14px; margin: 0 0 20px; color: var(--muted); }
.price-alt strong { color: var(--text); font-weight: 600; }
.tier ul { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.tier li { padding: 6px 0 6px 22px; position: relative; color: var(--text); font-size: 15px; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tiers-cta { margin: 36px 0 0; }
.referral-note { margin: 28px 0 0; color: var(--muted); font-size: 15px; }
.referral-note strong { color: var(--accent); font-weight: 600; }
.total-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.total-note[hidden] { display: none; }
.hint a { color: var(--accent); }
.total-box { margin-top: 16px; border: 1px solid rgba(240, 255, 0, 0.4); border-radius: var(--radius); padding: 18px 20px; background: var(--accent-soft); }
.total-box[hidden] { display: none; }
.total-box ul { list-style: none; margin: 0 0 12px; padding: 0; }
.total-box li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; color: var(--muted); font-size: 14px; }
.total-box li span:last-child { color: var(--text); font-variant-numeric: tabular-nums; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
.total-row span { font-family: var(--body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; color: var(--muted); }
.total-row strong { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }

/* ---------- Process ---------- */
#process { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; counter-reset: step; }
.step { border-top: 2px solid var(--accent); padding-top: 20px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--display); font-weight: 800; font-style: italic; font-size: 56px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--text);
}
.step h3 { font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 12px 0 6px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Form ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--highlight), var(--shadow); padding: 40px; max-width: 860px; }
fieldset { border: 0; padding: 0; margin: 0 0 40px; }
fieldset:last-of-type { margin-bottom: 0; }
legend {
  font-family: var(--body); font-weight: 600; font-size: 16px; color: var(--text);
  padding: 0 0 12px; margin-bottom: 24px; border-bottom: 1px solid var(--line); width: 100%;
}
.field { margin-bottom: 22px; }
.field[hidden] { display: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label.q, .q { display: block; font-weight: 500; font-size: 14px; line-height: 1.4; margin-bottom: 8px; }
.req { color: var(--muted); font-weight: 400; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 40px; background: var(--input-bg); color: var(--text);
  border: 1px solid var(--input); border-radius: var(--radius); box-shadow: var(--highlight), var(--shadow);
  font: inherit; font-size: 16px; line-height: 1.4; padding: 8px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
::placeholder { color: var(--muted); opacity: .72; }
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(115, 115, 115, 0.24); }
select option { background: var(--surface); color: var(--text); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.choices.inline { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.choice {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--input-bg); border: 1px solid var(--input); border-radius: var(--radius);
  padding: 9px 12px; font-size: 14px; user-select: none; transition: border-color .15s ease, background .15s ease;
}
.choice:hover { background: var(--hover); }
.choice input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.choice:has(input:checked) { border-color: rgba(240, 255, 0, 0.4); background: var(--accent-soft); }
.choice:has(input:focus-visible) { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(115, 115, 115, 0.24); }
.group-error .choices .choice { border-color: rgba(255, 90, 90, 0.36); }
.error-msg { color: #ff8a8a; font-size: 12px; margin-top: 8px; display: none; }
.group-error .error-msg { display: block; }

.range-wrap { display: flex; align-items: center; gap: 16px; }
input[type=range] { flex: 1; accent-color: var(--accent); }
.range-val { font-family: var(--body); font-weight: 600; font-size: 20px; width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-right: 48px; }

input[type=file] {
  width: 100%; color: var(--muted); font-size: 14px;
  background: var(--input-bg); border: 1px dashed var(--input); border-radius: var(--radius); padding: 14px;
}
input[type=file]::file-selector-button {
  font-family: var(--body); font-weight: 500; font-size: 14px;
  background: var(--hover); color: var(--text); border: 1px solid var(--input);
  border-radius: var(--radius-sm); padding: 6px 12px; margin-right: 12px; cursor: pointer;
}

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.form-foot p { color: var(--muted); font-size: 13px; margin: 0; max-width: 44ch; }
.hp { position: absolute; left: -9999px; }

/* ---------- Portfolio ---------- */
.logo img { height: 26px; width: auto; display: block; }
.footer-logo img { height: 20px; opacity: .6; }
.nav a[aria-current="page"] { color: var(--text); }
#work { padding-top: 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head-row .section-head { margin-bottom: 0; }
.page-top { padding-top: 80px; }
.page-title {
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(48px, 8vw, 88px); line-height: .95; margin: 0 0 12px;
}

/* coss ui Tabs: a tray with the selected tab raised */
.filters, .tabs {
  display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 3px;
  background: rgba(255, 255, 255, 0.04); border-radius: var(--radius);
}
.filters { margin-bottom: 32px; }
.filters[hidden] { display: none; }
.filter, .tab {
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px;
  font-family: var(--body); font-weight: 500; font-size: 14px; line-height: 1.2;
  padding: 7px 12px; cursor: pointer; transition: color .15s ease, background .15s ease;
}
.filter:hover, .tab:hover { color: var(--text); background: var(--hover); }
.filter[aria-pressed="true"], .tab[aria-selected="true"] {
  color: var(--text); background: rgba(255, 255, 255, 0.1); box-shadow: var(--highlight), var(--shadow);
}

.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.work-grid[data-limit="3"] { grid-template-columns: repeat(3, 1fr); }
.work-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  background: var(--surface); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--highlight), var(--shadow);
  transition: border-color .2s ease, transform .2s ease;
}
.work-card:hover { border-color: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.work-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card:hover .work-thumb img { transform: scale(1.04); }
.work-more {
  position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.75); color: var(--text);
  font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: var(--radius-sm);
}
.work-info { display: block; padding: 18px 20px 20px; }
.work-cat { display: block; font-family: var(--body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); }
.work-title { display: block; font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 6px 0 2px; }
.work-service { display: block; color: var(--muted); font-size: 14px; }

.work-empty { border: 1px dashed var(--input); border-radius: var(--radius-card); padding: 48px 24px; text-align: center; color: var(--muted); }
.work-empty[hidden] { display: none; }
.work-empty p { margin: 0 0 8px; }
.work-empty strong { color: var(--text); }
.work-empty .btn { margin-top: 16px; }

.cta-band { border-top: 1px solid var(--line); padding: 72px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: clamp(32px, 5vw, 48px); margin: 0; }

.lightbox { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 72px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 200px); object-fit: contain; border-radius: var(--radius); }
.lightbox figcaption { margin-top: 16px; text-align: center; max-width: 60ch; }
.lightbox figcaption strong { display: block; font-family: var(--body); font-weight: 600; font-size: 20px; line-height: 1.3; margin: 4px 0; }
.lb-desc { display: block; color: var(--muted); font-size: 15px; }
.lb-count { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.lb-link { margin-top: 14px; }
.lb-link[hidden] { display: none; }
.work-avail {
  display: inline-block; margin-top: 10px; font-family: var(--body); font-weight: 500; font-size: 12px; line-height: 1.4;
  color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 3px 8px;
}
.lb-btn {
  position: fixed; z-index: 1; background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--input);
  width: 44px; height: 44px; border-radius: var(--radius); font-size: 26px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 760px) {
  .work-grid, .work-grid[data-limit="3"] { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .lightbox figure { padding: 72px 12px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* ---------- Social links ---------- */
.socials { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.socials-label { font-family: var(--body); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); margin-right: 4px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 48px; padding: 0 12px;
  border: 1px solid var(--input); border-radius: var(--radius); background: rgba(17, 17, 17, 0.6);
  box-shadow: var(--highlight), var(--shadow); transition: background .15s ease;
}
.social-btn:hover { background: var(--hover); }
.social-btn .social-tp { height: 24px; width: auto; }
.social-btn .social-ig { height: 22px; width: 22px; }
.footer-social { display: inline-flex; align-items: center; gap: 18px; }
.footer-social a { display: inline-flex; opacity: .6; transition: opacity .15s ease; }
.footer-social a:hover { opacity: 1; }
.footer-social .social-tp { height: 20px; width: auto; }
.footer-social .social-ig { height: 20px; width: 20px; }

/* ---------- Accounts: login, account, admin ---------- */
.account-page { padding: 64px 0 96px; min-height: 70vh; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.plain { margin: 0; padding: 12px 0; }
.auth-card { max-width: 440px; margin: 0 auto; }
.oauth { display: grid; gap: 10px; margin-top: 28px; }
.oauth-btn, .btn.full { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#email-login .btn { margin-top: 12px; }
.notice { border: 1px dashed var(--input); border-radius: var(--radius-card); padding: 24px; color: var(--muted); margin-top: 24px; }
.notice[hidden], .status[hidden], [data-panel][hidden], #admin-ui[hidden] { display: none; }
.notice strong { color: var(--text); }
.notice p { margin: 8px 0 0; }
.notice a, .muted a { color: var(--accent); }
.status { margin: 16px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.status.ok { border-color: rgba(240, 255, 0, 0.4); background: var(--accent-soft); }
.status.error { border-color: rgba(255, 90, 90, 0.4); background: rgba(255, 90, 90, 0.08); color: #ffb3b3; }
.nav-btn { min-height: 34px; padding: 0 12px; font-size: 14px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--highlight), var(--shadow); padding: 24px; margin-top: 24px; }
.panel-title { font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--text); margin: 0 0 16px; }
.panel-title.spaced { margin-top: 36px; }
.inline-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 240px; }
.stack-form { display: grid; gap: 10px; }
.stack-form .row { margin-bottom: 6px; }
.stack-form .q { margin-bottom: 4px; margin-top: 6px; }
.form-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.form-actions .btn[hidden] { display: none; }

.cust-project { border-top: 1px solid var(--line); padding: 20px 0; }
.cust-project:first-child { border-top: 0; padding-top: 0; }
.cust-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cust-title { font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 0; }
.cust-head p { margin: 4px 0 0; }
.cust-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.cust-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); display: block; }
.badge { flex-shrink: 0; font-family: var(--body); font-weight: 500; font-size: 12px; line-height: 1.4; padding: 3px 8px; border-radius: var(--radius-sm); border: 1px solid var(--input); background: var(--input-bg); color: var(--muted); }
.badge.done { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 12px; }
.file-btn, .link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.file-btn:disabled, .link-btn:disabled { opacity: .4; cursor: default; }
.link-btn.danger { color: #ff8080; }


.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.admin-row p { margin: 4px 0 0; }
.admin-row-main { display: flex; align-items: center; gap: 14px; }
.admin-thumb { width: 96px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); }
.admin-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 15px; }
.check-list .ok { color: var(--accent); }
.check-list .bad { color: #ff9a9a; }
.check-list .verdict { font-weight: 600; margin-top: 6px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 720px; padding-bottom: 96px; }
.legal h2 { font-family: var(--body); font-weight: 600; font-size: 20px; line-height: 1.3; margin: 40px 0 12px; }
.legal p, .legal li { color: #c9c9c9; font-size: 16px; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal li strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-link { color: var(--muted); margin-left: 12px; text-decoration: none; }
.footer-link:hover { color: var(--text); }

/* ---------- Thanks page ---------- */
.thanks { min-height: 80vh; display: flex; align-items: center; }
.thanks h1 { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: clamp(48px, 8vw, 96px); line-height: .95; margin: 0 0 20px; }
.thanks p { color: var(--muted); font-size: 18px; max-width: 48ch; margin: 0 0 32px; }

@media (min-width: 640px) {
  input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], select, textarea { font-size: 14px; min-height: 36px; padding: 7px 12px; }
  .btn { min-height: 36px; font-size: 14px; padding: 0 14px; }
  .nav .btn, .nav-btn { min-height: 32px; }
}
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .service-group + .service-group { margin-top: 48px; }
}
@media (max-width: 720px) {
  .site-header .logo svg, .site-header .logo img { height: 22px; }
  /* Mobile menu (nav.js): the links drop down below the header */
  .nav { gap: 8px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 4px 20px 12px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 14px 2px; font-size: 16px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 36px; height: 36px; padding: 0 9px; cursor: pointer;
    background: var(--input-bg); border: 1px solid var(--input); border-radius: var(--radius);
    box-shadow: var(--highlight), var(--shadow);
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 1px; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
  .menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding: 80px 0 72px; }
  .hero::before { width: 100%; opacity: .5; }
  section { padding: 72px 0; }
  .form-card { padding: 28px 20px; }
  .row { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .choices { grid-template-columns: 1fr; }
  .choices.inline { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
