/* ==========================================================================
   adMaster, s.r.o. — design system
   Bez externích závislostí: žádný Bootstrap, jQuery ani Google Fonts.
   ========================================================================== */

:root {
  /* Brand */
  --amber: #f4bb36;
  --amber-dark: #d99f18;
  --amber-deep: #8e561b;

  /* Neutrály */
  --ink: #16171b;
  --ink-2: #3b3b43;
  --body: #4a4b55;
  --muted: #6f6e6c;
  --line: #e4e4e8;
  --surface: #fff;
  --surface-2: #f7f7f9;
  --surface-3: #eef0f3;

  /* Tmavá sekce (hero, footer) */
  --night: #17181d;
  --night-2: #21232a;
  --night-line: #33353f;
  --night-text: #c9cad2;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(20 22 30 / .05), 0 8px 24px -12px rgb(20 22 30 / .12);
  --shadow-lg: 0 2px 4px rgb(20 22 30 / .06), 0 20px 48px -16px rgb(20 22 30 / .2);

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2f5;
    --ink-2: #dcdce3;
    --body: #b3b4be;
    --muted: #8e8f9a;
    --line: #2e3038;
    --surface: #14151a;
    --surface-2: #1a1c22;
    --surface-3: #22242b;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 20px 48px -16px rgb(0 0 0 / .6);
  }
}

:root[data-theme="dark"] {
  --ink: #f2f2f5;
  --ink-2: #dcdce3;
  --body: #b3b4be;
  --muted: #8e8f9a;
  --line: #2e3038;
  --surface: #14151a;
  --surface-2: #1a1c22;
  --surface-3: #22242b;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 20px 48px -16px rgb(0 0 0 / .6);
}

/* --------------------------------------------------------------- základ -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.075rem; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--amber-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--amber-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a { color: var(--amber); }
}
:root[data-theme="dark"] a { color: var(--amber); }

img, svg { max-width: 100%; height: auto; }
strong { color: var(--ink); font-weight: 650; }

:focus-visible {
  outline: 2.5px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: .8rem 1.2rem;
  background: var(--amber);
  color: #16171b;
  font-weight: 650;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header[data-scrolled] {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px -14px rgb(20 22 30 / .35);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--amber-dark); font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand b { color: var(--amber); }
}
:root[data-theme="dark"] .brand b { color: var(--amber); }

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  padding: .5rem .68rem;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: .935rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a[aria-current="true"] { color: var(--ink); font-weight: 650; }

/* .nav a přebíjí barvu tlačítek — vrátíme jim vlastní. */
.nav a.btn-primary,
.nav a.btn-primary:hover { color: #1a1508; }
.nav a.btn-ghost,
.nav a.btn-ghost:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .ico-x { display: none; }
.nav-toggle[aria-expanded="true"] .ico-x { display: block; }
.nav-toggle[aria-expanded="true"] .ico-bars { display: none; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: .1rem;
    padding: .6rem var(--gutter) 1.2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav[data-open] { display: flex; }
  .nav a { padding: .7rem .5rem; font-size: 1rem; }
  .nav .btn { margin-top: .5rem; text-align: center; }
}

/* --------------------------------------------------------------- tlačítka -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  color: #1a1508;
  box-shadow: 0 1px 2px rgb(20 22 30 / .1), 0 10px 22px -12px rgb(244 187 54 / .9);
}
.btn-primary:hover { background: var(--amber-dark); color: #1a1508; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); border-color: var(--muted); }

.btn-on-dark {
  background: rgb(255 255 255 / .07);
  border-color: rgb(255 255 255 / .22);
  color: #fff;
}
.btn-on-dark:hover { background: rgb(255 255 255 / .14); color: #fff; }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
  background: var(--night);
  color: var(--night-text);
  overflow: hidden;
}
/* medová mřížka místo původního bitmapového pozadí */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 150%;
  z-index: -2;
  background:
    radial-gradient(58% 46% at 78% 8%, rgb(244 187 54 / .17), transparent 68%),
    radial-gradient(48% 42% at 8% 96%, rgb(142 86 27 / .3), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16Z'/%3E%3Cpath d='M28 48.5 56 64.5v32L28 112.5 0 96.5v-32Z'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-lede {
  max-width: 56ch;
  margin-bottom: 2rem;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: #d6d7de;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.4rem;
  padding: .38rem .85rem .38rem .6rem;
  border: 1px solid rgb(244 187 54 / .3);
  border-radius: 999px;
  background: rgb(244 187 54 / .08);
  color: var(--amber);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.eyebrow svg { width: 15px; height: 15px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  background: var(--night-line);
  overflow: hidden;
}
.hero-stats > div { padding: 1.15rem 1.3rem; background: var(--night-2); }
.hero-stats dt {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #90929e;
}
.hero-stats dd {
  margin: .3rem 0 0;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.025em;
  color: #fff;
}
.hero-stats dd small {
  display: block;
  margin-top: .15rem;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: 0;
  color: #83848f;
}

/* ----------------------------------------------------------------- sekce -- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--surface-2); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p:last-child { margin-bottom: 0; color: var(--body); font-size: 1.06rem; }

.kicker {
  display: block;
  margin-bottom: .7rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber-dark);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kicker { color: var(--amber); }
}
:root[data-theme="dark"] .kicker { color: var(--amber); }

/* --------------------------------------------------------------- karty -- */

.grid { display: grid; gap: 1.15rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45rem; }
.card p { font-size: .955rem; margin-bottom: 0; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1.05rem;
  border-radius: 11px;
  background: linear-gradient(150deg, rgb(244 187 54 / .95), rgb(217 159 24 / .85));
  color: #1a1508;
}
.card-icon svg { width: 1.45rem; height: 1.45rem; }

/* -------------------------------------------------- pro koho / checklisty -- */

.split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.panel {
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-accent { border-top: 3px solid var(--amber); }

.checks { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.checks li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .55rem;
  font-size: .96rem;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgb(244 187 54 / .18) center/.72rem no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a37d25' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5 6.2 12 13 4.5'/%3E%3C/svg%3E");
}

.quote {
  margin: 0;
  padding-left: 1.4rem;
  border-left: 3px solid var(--amber);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-2);
}
.quote footer { margin-top: .7rem; font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------------- portfolio -- */

.segments {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.segment {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--surface);
}
.segment h3 {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  font-size: 1.06rem;
}
.segment h3 svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--amber-dark); }
.segment-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin-top: .35rem;
}
.segment-metrics div { min-width: 4.5rem; }
.segment-metrics dt {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.segment-metrics dd {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1.1rem;
  font-size: .86rem;
  color: var(--muted);
}

/* ----------------------------------------------------------------- pásek -- */

.band {
  padding: clamp(2.25rem, 5vw, 3.25rem);
  border-radius: var(--radius);
  background: var(--night);
  color: var(--night-text);
  background-image:
    radial-gradient(60% 100% at 88% 0%, rgb(244 187 54 / .15), transparent 70%);
}
.band h2 { color: #fff; }
.band p { color: #cfd0d8; max-width: 60ch; }
.band .btn { margin-top: .6rem; }

/* --------------------------------------------------------------- kontakt -- */

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  margin-bottom: .38rem;
  font-size: .89rem;
  font-weight: 600;
  color: var(--ink);
}
.field .req { color: var(--amber-deep); }
.field input,
.field textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .96rem;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgb(244 187 54 / .22);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: #d9534f; }

.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  margin-top: .3rem;
}
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }

.form-status {
  margin-top: 1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  display: none;
}
.form-status[data-state="ok"] {
  display: block;
  border: 1px solid rgb(58 150 88 / .35);
  background: rgb(58 150 88 / .1);
  color: #2b7a48;
}
.form-status[data-state="err"] {
  display: block;
  border: 1px solid rgb(200 60 55 / .35);
  background: rgb(200 60 55 / .09);
  color: #b3423c;
}
.form-status[data-state="sending"] { display: block; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status[data-state="ok"] { color: #6ec98d; }
  :root:not([data-theme="light"]) .form-status[data-state="err"] { color: #f0918c; }
}
:root[data-theme="dark"] .form-status[data-state="ok"] { color: #6ec98d; }
:root[data-theme="dark"] .form-status[data-state="err"] { color: #f0918c; }

.contact-list { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.contact-list li {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  margin-bottom: 1.05rem;
}
.contact-list svg {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: .28rem;
  color: var(--amber-dark);
}
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list address { font-style: normal; }
.contact-list .lbl {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 2rem;
  background: var(--night);
  color: #9a9ba6;
  font-size: .89rem;
}
.site-footer a { color: #cfd0d8; text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.footer-top {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--night-line);
}
.footer-top h4 {
  margin-bottom: .8rem;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: .45rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-brand span { color: #fff; font-size: 1.18rem; font-weight: 700; letter-spacing: -.03em; }
.footer-brand b { color: var(--amber); }

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-top: 1.5rem;
  font-size: .82rem;
}
.legal p { margin: 0; }
.legal dl {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.15rem;
  margin: .5rem 0 0;
  width: 100%;
  color: #7f808b;
}
.legal dl div { display: flex; gap: .35rem; }
.legal dt { color: #6d6e78; }
.legal dd { margin: 0; font-variant-numeric: tabular-nums; }

.social { display: flex; gap: .5rem; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--night-line);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / .04);
  transition: background .18s, border-color .18s;
}
.social a:hover { background: rgb(244 187 54 / .16); border-color: rgb(244 187 54 / .4); }
.social svg { width: 1.15rem; height: 1.15rem; }

/* ------------------------------------------------------- k horní hraně -- */

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top[data-show] { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 1.2rem; height: 1.2rem; }

/* ===================================================== /tech — podstránky == */

.doc-header {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0 clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.doc-header h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .4rem; }
.doc-header p { margin: 0; max-width: 65ch; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .5rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
  font-size: .86rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.doc-layout {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) 265px;
  align-items: start;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 4.5rem);
}
@media (max-width: 940px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-aside { order: -1; }
}
.doc-layout-single { grid-template-columns: minmax(0, 75ch); }

.doc-body details {
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.doc-body summary {
  padding: .9rem 1.15rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.doc-body summary:hover { color: var(--amber-dark); }
.doc-body details[open] summary { border-bottom: 1px solid var(--line); }
.vendor-list {
  max-height: 26rem;
  margin: 0 !important;
  padding: 1rem 1.15rem 1rem 2.4rem !important;
  overflow-y: auto;
  font-size: .88rem;
  overflow-wrap: anywhere;
}
.vendor-list li { margin-bottom: .3rem; }

.doc-body { min-width: 0; font-size: 1.005rem; }
.doc-body h2 {
  margin-top: 2.4rem;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  scroll-margin-top: 6rem;
}
.doc-body h3 { margin-top: 1.9rem; font-size: 1.15rem; }
.doc-body > :first-child { margin-top: 0; }
.doc-body ul, .doc-body ol { margin: 0 0 1.2rem; padding-left: 1.35rem; }
.doc-body li { margin-bottom: .45rem; }
.doc-body li > ul { margin-top: .45rem; }

.doc-body pre {
  margin: 0 0 1.3rem;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .855rem;
  line-height: 1.55;
  tab-size: 2;
}
.doc-body code {
  padding: .12em .38em;
  border-radius: 4px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: .89em;
}
.doc-body pre code { padding: 0; background: none; font-size: 1em; }

.table-scroll {
  margin: 0 0 1.4rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.doc-body table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: .92rem;
}
.doc-body th, .doc-body td {
  padding: .68rem .9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.doc-body thead th {
  position: sticky;
  top: 0;
  background: var(--surface-3);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.doc-body tbody tr:last-child td { border-bottom: 0; }
.doc-body tbody th { color: var(--ink); font-weight: 650; white-space: nowrap; }
.doc-body td code { white-space: nowrap; }

.callout {
  display: flex;
  gap: .9rem;
  margin: 0 0 1.5rem;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: .93rem;
}
.callout svg { flex: none; width: 1.2rem; height: 1.2rem; margin-top: .18rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-legacy {
  border-left-color: var(--amber);
  background: rgb(244 187 54 / .09);
}
.callout-legacy svg { color: var(--amber-dark); }

.doc-aside { position: sticky; top: 5.5rem; }
.doc-nav {
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.doc-nav h2 {
  margin: 0 0 .8rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-nav h2 + ul { margin-top: 0; }
.doc-nav ul { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .915rem; }
.doc-nav ul:last-child { margin-bottom: 0; }
.doc-nav li { margin-bottom: .1rem; }
.doc-nav a {
  display: block;
  padding: .4rem .6rem;
  border-radius: 7px;
  color: var(--body);
  text-decoration: none;
  transition: background .16s, color .16s;
}
.doc-nav a:hover { background: var(--surface-3); color: var(--ink); }
.doc-nav a[aria-current="page"] {
  background: rgb(244 187 54 / .16);
  color: var(--ink);
  font-weight: 650;
}

.doc-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.doc-cards li { margin: 0; }
.doc-cards a {
  display: block;
  height: 100%;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.doc-cards a:hover {
  transform: translateY(-2px);
  border-color: rgb(244 187 54 / .55);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.doc-cards strong { display: block; margin-bottom: .3rem; font-size: 1.03rem; }
.doc-cards span { font-size: .9rem; color: var(--body); }

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}

/* -------------------------------------------------------------- utility -- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media print {
  .site-header, .site-footer, .doc-aside, .to-top, .hero-actions { display: none; }
  body { color: #000; background: #fff; }
  .doc-layout { grid-template-columns: 1fr; padding-top: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
