/* Domovnik portal: local, CSP-safe design system. */
:root {
  color-scheme: light;
  --canvas: #f7f7f5;
  --canvas-glow: #f7f7f5;
  --surface: #ffffff;
  --surface-raised: #fcfcfb;
  --surface-muted: #f1f1ee;
  --border: #e3e3df;
  --border-strong: #cfcfca;
  --text: #20211f;
  --muted: #6f716c;
  --faint: #989994;
  --accent: #d95735;
  --accent-strong: #bd4528;
  --accent-soft: #fbe8e2;
  --ok: #177b57;
  --ok-soft: #e7f4ed;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --err: #c13f38;
  --err-soft: #fae8e6;
  --shadow: 0 1px 2px rgba(24, 25, 23, .04);
  --shadow-pop: 0 22px 56px rgba(23, 31, 55, .18);
  --radius: 16px;
  --radius-sm: 10px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171816;
  --canvas-glow: #171816;
  --surface: #20211f;
  --surface-raised: #262724;
  --surface-muted: #2b2c29;
  --border: #383a35;
  --border-strong: #50514d;
  --text: #f0f0eb;
  --muted: #b2b3ac;
  --faint: #85867f;
  --accent: #f18a68;
  --accent-strong: #f7a386;
  --accent-soft: #4a2b23;
  --ok: #74d6ad;
  --ok-soft: #183d30;
  --warn: #f0c767;
  --warn-soft: #493a18;
  --err: #ffaaa1;
  --err-soft: #4a2926;
  --shadow: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-pop: 0 22px 56px rgba(0, 0, 0, .46);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --canvas: #171816;
    --canvas-glow: #171816;
    --surface: #20211f;
    --surface-raised: #262724;
    --surface-muted: #2b2c29;
    --border: #383a35;
    --border-strong: #50514d;
    --text: #f0f0eb;
    --muted: #b2b3ac;
    --faint: #85867f;
    --accent: #f18a68;
    --accent-strong: #f7a386;
    --accent-soft: #4a2b23;
    --ok: #74d6ad;
    --ok-soft: #183d30;
    --warn: #f0c767;
    --warn-soft: #493a18;
    --err: #ffaaa1;
    --err-soft: #4a2926;
    --shadow: 0 1px 2px rgba(0, 0, 0, .28);
    --shadow-pop: 0 22px 56px rgba(0, 0, 0, .46);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(850px 470px at 50% -130px, var(--canvas-glow), transparent 72%), var(--canvas);
}
button, input, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

/* App shell and navigation */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, transparent); background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(16px); }
.topbar-inner { display: flex; align-items: center; gap: 24px; width: min(1180px, calc(100% - 40px)); min-height: 68px; margin: 0 auto; }
.brand { flex: 0 0 auto; color: var(--text); font-size: 16px; font-weight: 760; letter-spacing: -.04em; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-grid; width: 21px; height: 21px; margin-right: 7px; place-items: center; border-radius: 7px; color: #fff; font-size: 13px; font-weight: 800; background: linear-gradient(135deg, var(--accent), #7c76ff); vertical-align: -1px; }
.brand .dot { color: var(--accent); }
.nav { display: flex; flex: 1; gap: 3px; align-items: center; min-width: 0; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-muted); }
.nav a.on { color: var(--accent); background: var(--accent-soft); }
.nav-user { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.nav-email { max-width: 210px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.logout-form, .inline-form { margin: 0; }
.inline-form { display: inline-flex; }
.theme-toggle { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); box-shadow: none; font-size: 16px; }
.theme-toggle:hover { background: var(--surface-muted); color: var(--text); }

/* Authenticated portal: an application frame rather than a marketing-style page. */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 16px 18px; color: #d9def0; background: #171b2b; }
.sidebar-brand { padding: 0 10px; color: #fff; font-size: 19px; }
.sidebar-brand:hover { color: #fff; }
.sidebar .brand-mark { background: linear-gradient(135deg, #736bff, #9b96ff); }
.sidebar-caption { margin: 9px 10px 30px; color: #8e98b6; font-size: 10px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a { display: flex; gap: 11px; align-items: center; min-height: 42px; padding: 0 11px; border: 1px solid transparent; border-radius: 10px; color: #b8c0d8; font-size: 14px; font-weight: 650; }
.sidebar-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav a.on { border-color: rgba(164, 158, 255, .18); color: #fff; background: linear-gradient(90deg, rgba(127, 117, 255, .34), rgba(127, 117, 255, .12)); box-shadow: inset 3px 0 #938cff; }
.nav-glyph { display: inline-grid; width: 19px; place-items: center; color: #9f9adf; font-size: 16px; }
.sidebar-nav a.on .nav-glyph { color: #fff; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); }
.user-chip { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 0 8px; }
.user-avatar { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: #dcd9ff; background: #343a57; font-size: 12px; font-weight: 780; }
.user-email { overflow: hidden; color: #c7cde0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 0 8px; }
.sidebar .theme-toggle { width: 32px; height: 32px; border-color: rgba(255, 255, 255, .14); color: #cbd1e5; background: rgba(255, 255, 255, .06); }
.sidebar .theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.sidebar .btn.ghost { border-color: rgba(255, 255, 255, .14); color: #d8ddef; }
.sidebar .btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.app-content { min-width: 0; background: radial-gradient(760px 440px at 94% -60px, color-mix(in srgb, var(--accent-soft) 78%, transparent), transparent 75%), var(--canvas); }
.app-content .wrap { width: min(1240px, calc(100% - 96px)); margin: 0 auto; padding: 56px 0 80px; }
.app-content .wrap > h1 { margin-bottom: 5px; }
.mobile-brandbar, .mobile-nav { display: none; }

.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.overview-hero { position: relative; display: flex; gap: 26px; align-items: end; justify-content: space-between; overflow: hidden; min-height: 196px; margin-bottom: 20px; padding: 31px 34px; border: 1px solid color-mix(in srgb, var(--accent) 23%, var(--border)); border-radius: 22px; color: #fff; background: radial-gradient(circle at 80% 12%, rgba(152, 145, 255, .43), transparent 31%), linear-gradient(135deg, #302d68, #242a53 56%, #1f2545); box-shadow: 0 22px 44px rgba(48, 45, 104, .2); }
.overview-hero::after { position: absolute; right: -44px; bottom: -78px; width: 250px; height: 250px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; content: ""; }
.overview-hero h1 { position: relative; z-index: 1; margin-bottom: 8px; color: #fff; font-size: clamp(29px, 4vw, 40px); }
.overview-hero .page-sub { position: relative; z-index: 1; max-width: 560px; margin: 0; color: #cbd0f5; }
.overview-hero .eyebrow { position: relative; z-index: 1; color: #bdb8ff; }
.hero-meta { position: relative; z-index: 1; min-width: 165px; padding: 15px 17px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(9, 12, 33, .22); backdrop-filter: blur(10px); }
.hero-meta .k { color: #c5c9eb; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.hero-meta .v { margin-top: 4px; color: #fff; font-size: 20px; font-weight: 760; }
.member-hero { min-height: 165px; }
.member-hero .btn { position: relative; z-index: 1; flex: 0 0 auto; color: #2e2a65; background: #fff; }
.member-hero .btn:hover { color: #211e54; background: #f0efff; }

.app-content .grid3 { gap: 18px; margin-bottom: 36px; }
.app-content .stat { min-height: 144px; padding: 24px; border-radius: 18px; }
.app-content .stat::after { left: 24px; width: 46px; height: 4px; }
.app-content .stat .v { font-size: 34px; }
.app-content .section { margin-top: 42px; }
.app-content .section-head { margin-bottom: 16px; }
.app-content .section-head h2 { font-size: 19px; }
.app-content .tbl-wrap { border-radius: 16px; }
.app-content .card { border-radius: 18px; }

/* Individual workspaces: heading, data canvas, then a clearly separated action area. */
.page-heading { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 30px; }
.page-heading h1 { margin-bottom: 7px; font-size: clamp(29px, 3vw, 36px); }
.page-heading .page-sub { max-width: 720px; margin: 0; }
.heading-note { display: flex; gap: 8px; align-items: center; padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 700; white-space: nowrap; }
.heading-note::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); content: ""; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.data-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.data-panel .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; }
.data-panel .tbl th { padding-top: 13px; padding-bottom: 13px; }
.data-panel .tbl td { padding-top: 16px; padding-bottom: 16px; }
.data-panel-label { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 61px; padding: 0 19px; border-bottom: 1px solid var(--border); }
.data-panel-label h2 { font-size: 15px; }
.form-panel { padding: 22px; }
.form-panel > .card-intro { margin-bottom: 14px; }
.record-count { display: inline-flex; min-height: 24px; padding: 3px 8px; align-items: center; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.empty-panel { display: grid; min-height: 215px; padding: 26px; place-items: center; color: var(--muted); text-align: center; }
.empty-panel p { max-width: 310px; margin: 0; }
.action-card { position: sticky; top: 28px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, var(--surface), var(--surface-raised)); box-shadow: var(--shadow); }
.action-card::before { display: block; width: 32px; height: 4px; margin-bottom: 17px; border-radius: 999px; background: var(--accent); content: ""; }
.action-card .card-title { margin-bottom: 5px; font-size: 18px; }
.action-card .card-intro { margin-bottom: 16px; line-height: 1.5; }
.action-card .form-submit.compact { width: 100%; margin-top: 21px; }
.wide-workspace { max-width: 100%; }
.workspace-grid.wide-workspace { grid-template-columns: minmax(0, 1fr); }

.resource-heading { display: flex; gap: 22px; align-items: end; justify-content: space-between; margin-bottom: 29px; padding: 0 2px; }
.resource-heading .title-row { margin: 0 0 7px; }
.resource-heading h1 { font-size: clamp(28px, 3vw, 36px); }
.resource-heading .page-sub { margin: 0; }
.resource-heading .eyebrow { margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 370px); gap: 24px; align-items: start; }
.detail-card { padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.detail-card .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; }
.detail-card .tbl { min-width: 0; }
.detail-card .tbl th { width: 38%; text-transform: none; letter-spacing: 0; }
.detail-aside { display: grid; gap: 16px; }
.detail-aside .alert { margin: 0; }
.action-stack { padding: 23px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.action-stack h2 { margin-bottom: 8px; font-size: 16px; }
.action-stack .form-actions { display: grid; margin-top: 18px; }
.action-stack .inline-form, .action-stack .inline-form button { width: 100%; }
.action-stack .small { margin-bottom: 0; }
.info-strip { margin: 0 0 20px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: var(--surface-muted); font-size: 13px; }
.dns-list { padding: 22px; }
.dns-list > h2 { margin: 0 0 16px; font-size: 17px; }
.dns-list .dnsrec:last-child { margin-bottom: 0; }

/* Contextual, centrally maintained help (templates/_page_help.html). */
.page-help { width: min(1240px, calc(100% - 96px)); margin: 0 auto 70px; }
.page-help details { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft)); }
.page-help summary { display: flex; gap: 13px; align-items: center; min-height: 68px; padding: 12px 20px; cursor: pointer; list-style: none; }
.page-help summary::-webkit-details-marker { display: none; }
.page-help summary strong { display: block; color: var(--text); font-size: 14px; }
.page-help summary small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.help-mark { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 15px; font-weight: 800; }
.help-chevron { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .18s ease; }
.page-help details[open] .help-chevron { transform: rotate(180deg); }
.help-body { display: grid; grid-template-columns: minmax(200px, .85fr) minmax(280px, 1.15fr); gap: 16px 34px; padding: 4px 20px 20px 60px; border-top: 1px solid var(--border); }
.help-kicker { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.help-body h2 { margin: 0 0 6px; font-size: 16px; }
.help-body p { margin: 0; color: var(--muted); font-size: 13px; }
.help-body ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: var(--text); font-size: 13px; }
.help-body li::marker { color: var(--accent); }
.help-maintenance { grid-column: 1 / -1; padding-top: 12px; border-top: 1px dashed var(--border-strong); color: var(--faint) !important; font-size: 11px !important; }
.signup-mailbox-name { gap: 0; }
.signup-local-input { border-right: 0; border-radius: 8px 0 0 8px; }
.signup-domain-suffix { padding: 0 12px; color: var(--muted); white-space: nowrap; }
.signup-done-card { max-width: 480px; }
.signup-login-btn { margin-top: 18px; }
.scope-hint { margin-top: 8px; }

@media (max-width: 980px) {
  .page-help { width: min(100% - 48px, 1240px); }
}

@media (max-width: 620px) {
  .page-help { width: min(100% - 28px, 1240px); margin-bottom: 42px; }
  .page-help summary { padding: 12px 14px; }
  .help-body { grid-template-columns: 1fr; padding: 14px; }
}

@media (max-width: 980px) {
  .workspace-grid, .detail-grid { grid-template-columns: 1fr; }
  .action-card { position: static; }
  .page-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-brandbar { display: flex; min-height: 64px; padding: 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 88%, transparent); }
  .mobile-actions { display: flex; gap: 8px; align-items: center; }
  .mobile-nav { display: flex; gap: 4px; padding: 8px 22px; overflow-x: auto; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 88%, transparent); }
  .mobile-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
  .mobile-nav a.on { color: var(--accent); background: var(--accent-soft); }
  .app-content .wrap { width: min(100% - 48px, 1240px); padding-top: 40px; }
}

/* Page primitives */
main { min-height: calc(100vh - 69px); }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 76px; }
.page-header { display: flex; gap: 20px; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.page-header h1 { margin-bottom: 5px; }
.page-sub { margin: 2px 0 24px; color: var(--muted); }
.sub { margin-bottom: 20px; color: var(--muted); }
.center { display: grid; min-height: calc(100vh - 69px); padding: 28px 20px; place-items: center; }
.center .card { max-width: 440px; }
.stack { display: grid; gap: 18px; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.success-text { color: var(--ok); }
.back { display: inline-flex; margin-bottom: 17px; color: var(--muted); font-size: 13px; font-weight: 650; }
.back:hover { color: var(--text); }
.title-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.title-row h1 { margin: 0; }

/* Cards, forms and buttons */
.card, .panel { width: 100%; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-compact { max-width: 460px; margin-top: 24px; }
.card-medium { max-width: 520px; }
.card-wide { max-width: 640px; }
.card h1 { font-size: 24px; }
.card-title { margin-bottom: 4px; font-size: 16px; }
.card-intro { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
label { display: block; margin: 17px 0 7px; color: var(--text); font-size: 13px; font-weight: 670; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: none; color: var(--text); background: var(--surface-raised); transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox-label { display: flex; gap: 9px; align-items: center; margin-top: 16px; cursor: pointer; }
.checkbox-label input { width: auto; accent-color: var(--accent); }
button, .btn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; color: #fff; background: var(--accent); font-size: 14px; font-weight: 700; line-height: 1.2; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
button:hover, .btn:hover { transform: translateY(-1px); color: #fff; background: var(--accent-strong); box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 28%, transparent); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn.secondary { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn.secondary:hover { color: var(--text); background: var(--surface-muted); box-shadow: none; }
.btn.ghost { border-color: var(--border); color: var(--muted); background: transparent; }
.btn.ghost:hover { color: var(--text); background: var(--surface-muted); box-shadow: none; }
.btn.danger { background: var(--err); }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 82%, #000); }
.btn.sm { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.form-submit { width: 100%; margin-top: 20px; }
.form-submit.compact { width: auto; margin-top: 14px; }
.card form > button[type="submit"] { width: 100%; margin-top: 20px; }
.card .form-submit.compact { width: auto; margin-top: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.form-actions .btn, .form-actions button { margin: 0; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.form-row > .muted { font-size: 13px; }

/* Feedback and data */
.alert { margin: 0 0 17px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-muted); font-size: 14px; }
.alert.err { border-color: color-mix(in srgb, var(--err) 44%, var(--border)); color: var(--err); background: var(--err-soft); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 44%, var(--border)); color: var(--ok); background: var(--ok-soft); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); color: var(--warn); background: var(--warn-soft); }
.alert-list { margin: 8px 0 0; padding-left: 18px; }
.foot { margin-top: 20px; color: var(--faint); font-size: 12px; line-height: 1.6; text-align: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat::after { position: absolute; top: 0; left: 20px; width: 38px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); content: ""; }
.stat .k { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.stat .v { margin: 8px 0 2px; font-size: 30px; font-weight: 780; letter-spacing: -.04em; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tbl { width: 100%; min-width: 520px; border-collapse: collapse; }
.tbl th { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--muted); background: var(--surface-muted); font-size: 11px; font-weight: 750; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 38%, transparent); }
.tbl .right, td.right { text-align: right; }
.tbl code { color: var(--accent); }
.actions-cell { white-space: nowrap; }
.detail-table { max-width: 560px; }
.detail-table th { width: 40%; text-transform: none; letter-spacing: 0; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); background: var(--surface-raised); font-size: 11px; font-weight: 720; letter-spacing: .01em; white-space: nowrap; }
.badge.active { border-color: color-mix(in srgb, var(--ok) 42%, var(--border)); color: var(--ok); background: var(--ok-soft); }
.badge.pending_dns, .badge.pending_verify { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); color: var(--warn); background: var(--warn-soft); }
.badge.stale_dns, .badge.disabled { border-color: color-mix(in srgb, var(--err) 42%, var(--border)); color: var(--err); background: var(--err-soft); }

/* Secrets, DNS and QR */
.qr { width: 186px; margin: 10px auto; padding: 12px; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 22px; }
.codes code { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); text-align: center; letter-spacing: 1px; }
.copyrow { display: flex; gap: 8px; align-items: center; padding: 8px 9px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); }
.copyrow code { flex: 1; overflow-wrap: anywhere; color: var(--accent); }
.copybtn, button.copybtn { flex: 0 0 auto; min-height: 30px; padding: 5px 9px; border-color: var(--border); border-radius: 7px; color: var(--text); background: var(--surface); box-shadow: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.copybtn:hover { background: var(--surface-raised); box-shadow: none; }
.clipboard-helper { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dnsrec { margin: 11px 0; }
.dnsrec-head { margin-bottom: 6px; font-size: 13px; }
.tag { display: inline-flex; padding: 2px 7px; border-radius: 5px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 780; letter-spacing: .05em; }
.rule-heading { margin: 20px 0 8px; padding-top: 15px; border-top: 1px solid var(--border); }

/* Dialog built by app.js */
.modal-overlay { position: fixed; z-index: 60; inset: 0; display: flex; padding: 20px; align-items: center; justify-content: center; background: rgba(12, 16, 28, .55); backdrop-filter: blur(4px); }
.modal-overlay[hidden] { display: none; }
.modal-box { width: min(440px, 100%); padding: 24px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop); }
.modal-msg { margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

@media (max-width: 780px) {
  .topbar-inner { gap: 12px; width: min(100% - 24px, 1180px); }
  .nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px; }
  .nav-email { display: none; }
  .wrap { width: min(100% - 28px, 1180px); padding-top: 30px; }
  .page-header { align-items: start; flex-direction: column; margin-bottom: 22px; }
  .grid3 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar-inner { min-height: 61px; gap: 8px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 19px; height: 19px; margin-right: 4px; }
  .nav a { padding: 7px; font-size: 12px; }
  .btn.ghost { padding: 6px 8px; }
  .logout-label { display: none; }
  .wrap { width: min(100% - 24px, 1180px); padding-bottom: 52px; }
  .card, .panel { padding: 20px; }
  .tbl-wrap { margin-right: -2px; }
  .tbl { min-width: 480px; }
  .form-row { align-items: stretch; }
  .form-row > form, .form-row > .btn { width: 100%; }
  .form-row button { width: 100%; }
  .codes { grid-template-columns: 1fr; }
}

/* Landing (apex namailu.cz) */
.landing { max-width: 720px; text-align: center; padding: 8px 20px 40px; }
.landing-mark { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 18px; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c76ff); box-shadow: var(--shadow-pop); }
.landing-title { font-size: clamp(30px, 6vw, 46px); letter-spacing: -.04em; margin-bottom: 12px; }
.landing-tagline { max-width: 520px; margin: 0 auto 26px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.landing-actions { margin-bottom: 40px; }
.landing-actions .btn { padding: 12px 22px; font-size: 15px; }
.landing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
@media (max-width: 680px) { .landing-cards { grid-template-columns: 1fr; } }
.landing-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); }
.landing-card-h { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.landing-card code { color: var(--accent); }

/* DNS detail: sbalené volitelné záznamy */
.dns-optional { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.dns-optional > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; list-style: revert; }
.dns-optional > summary:hover { color: var(--text); }
.dns-optional[open] > summary { margin-bottom: 10px; }
.dnsrec-head .badge { margin-left: 8px; }

/* DNS tabulka záznamů */
.dns-tbl { table-layout: fixed; }
.dns-tbl .dns-col-host { width: 18%; }
.dns-tbl .dns-col-type { width: 62px; }
.dns-tbl .dns-col-priority { width: 52px; }
.dns-tbl .dns-col-status { width: 68px; }
.dns-tbl td { vertical-align: top; }
.dns-tbl .dns-data { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.dns-tbl .dns-data code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.dns-tbl .dns-data .copybtn { flex: 0 0 auto; }
.dns-tbl .badge { white-space: nowrap; }

/* DNS detail keeps long records wide and puts the operational controls in the heading. */
.domain-heading { align-items: center; }
.domain-check { display: flex; flex: 0 0 auto; gap: 14px; align-items: center; padding: 10px 11px 10px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.domain-check strong, .domain-check small { display: block; }
.domain-check strong { font-size: 12px; }
.domain-check small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.domain-check form { margin: 0; }
.domain-detail-grid { grid-template-columns: minmax(0, 1fr); }
.domain-danger-zone { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.domain-danger-zone strong { font-size: 13px; }
.domain-danger-zone p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.domain-danger-zone form { margin: 0; }
.dns-host { display: flex; gap: 6px; align-items: center; }
.copybtn.icon-copy { position: relative; width: 18px; min-width: 18px; height: 18px; min-height: 18px; padding: 0; font-size: 0; }
.copybtn.icon-copy::before, .copybtn.icon-copy::after { position: absolute; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 1px; content: ""; }
.copybtn.icon-copy::before { top: 4px; left: 4px; }
.copybtn.icon-copy::after { top: 7px; left: 7px; background: var(--surface); }
.copybtn.icon-copy.copied::before { display: none; }
.copybtn.icon-copy.copied::after { top: 1px; left: 4px; width: auto; height: auto; border: 0; border-radius: 0; background: transparent; color: var(--ok); content: "✓"; font-size: 12px; font-weight: 800; }

/* Calm product UI: information leads; decoration stays out of the way. */
body { background: var(--canvas); }
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { padding: 26px 14px 16px; background: #20211f; }
.sidebar-brand { font-size: 18px; }
.sidebar .brand-mark { border-radius: 6px; background: var(--accent); }
.sidebar-caption { margin-bottom: 24px; color: #979894; }
.sidebar-nav { gap: 2px; }
.sidebar-nav a { min-height: 39px; border-radius: 7px; color: #c0c1bc; font-size: 13px; }
.sidebar-nav a:hover { background: #2b2c29; }
.sidebar-nav a.on { border-color: transparent; color: #20211f; background: #f2f2ed; box-shadow: none; }
.sidebar-nav a.on .nav-glyph { color: var(--accent); }
.nav-glyph { color: #aaa; font-size: 15px; }
.sidebar-footer { border-color: #353632; }
.user-avatar { border-radius: 7px; color: #fff0eb; background: #42433f; }
.app-content { background: var(--canvas); }
.app-content .wrap { width: min(1160px, calc(100% - 88px)); padding: 52px 0 48px; }
.eyebrow { margin-bottom: 7px; font-size: 10px; letter-spacing: .1em; }
.overview-hero { min-height: 0; margin-bottom: 28px; padding: 0 0 25px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text); background: transparent; box-shadow: none; }
.overview-hero::after { display: none; }
.overview-hero h1 { color: var(--text); font-size: clamp(29px, 3.3vw, 38px); }
.overview-hero .page-sub { color: var(--muted); }
.overview-hero .eyebrow { color: var(--accent); }
.hero-meta { min-width: 142px; padding: 11px 13px; border-color: var(--border); border-radius: 8px; background: var(--surface); backdrop-filter: none; }
.hero-meta .k { color: var(--muted); }
.hero-meta .v { color: var(--text); font-size: 18px; }
.member-hero { min-height: 0; }
.member-hero .btn { color: #fff; background: var(--accent); }
.member-hero .btn:hover { color: #fff; background: var(--accent-strong); }
.app-content .grid3 { gap: 12px; margin-bottom: 30px; }
.app-content .stat { min-height: 120px; padding: 18px; border-radius: 9px; box-shadow: none; }
.app-content .stat::after { display: none; }
.app-content .stat .v { font-size: 30px; }
.app-content .section { margin-top: 34px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1, .resource-heading h1 { font-size: clamp(28px, 3vw, 34px); }
.heading-note { padding: 6px 9px; border-color: transparent; border-radius: 6px; background: var(--surface-muted); }
.heading-note::before { display: none; }
.workspace-grid { grid-template-columns: minmax(0, 1fr) 326px; gap: 18px; }
.data-panel, .detail-card { border-radius: 9px; box-shadow: none; }
.data-panel-label { min-height: 52px; padding: 0 16px; }
.data-panel .tbl td { padding-top: 13px; padding-bottom: 13px; }
.record-count { min-height: 22px; border-radius: 5px; }
.action-card, .action-stack { padding: 20px; border-radius: 9px; background: var(--surface); box-shadow: none; }
.action-card::before { display: none; }
.action-card .card-title { font-size: 16px; }
.detail-grid { gap: 18px; }
.detail-aside { gap: 12px; }
.resource-heading { margin-bottom: 23px; }
.info-strip { border-radius: 8px; }
.tbl-wrap, .app-content .tbl-wrap { border-radius: 9px; box-shadow: none; }
.tbl th { background: transparent; }
.tbl tbody tr:hover { background: var(--surface-muted); }
.card, .panel { border-radius: 9px; box-shadow: none; }
button, .btn { border-radius: 7px; }
button:hover, .btn:hover { transform: none; box-shadow: none; }

/* Help remains available without taking space away from the work surface. */
.page-help { width: min(1160px, calc(100% - 88px)); margin: 0 auto 34px; }
.page-help details { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.page-help summary { justify-content: flex-end; min-height: auto; padding: 0; }
.page-help summary strong { display: inline; color: var(--muted); font-size: 12px; font-weight: 650; }
.help-mark { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: transparent; font-size: 12px; }
.help-chevron { margin-left: 0; font-size: 14px; }
.help-body { grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.2fr); margin-top: 12px; padding: 17px 18px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.help-maintenance { display: none; }

@media (max-width: 980px) {
  .app-content .wrap, .page-help { width: min(100% - 48px, 1160px); }
}

@media (max-width: 620px) {
  .app-content .wrap, .page-help { width: min(100% - 28px, 1160px); }
  .overview-hero { align-items: start; flex-direction: column; }
  .hero-meta { width: 100%; }
  .page-help summary { justify-content: flex-start; }
}

/* Znacka namailu.cz (SVG) - nahrazuje textovy @ / emoji. Vektor kvuli ostrosti ve vsech
   velikostech (favicona 16px az landing 88px); barvy jsou primo v SVG, ne pres CSS promenne,
   protoze <img> si vlastni stylopis netahne. */
.brand-logo { width: 26px; height: 26px; margin-right: 8px; vertical-align: -6px; }
.landing-logo { display: block; width: 88px; height: 88px; margin: 0 auto 18px; }

/* Agent API manual: long-form documentation without borrowing the density of data screens. */
.heading-actions { display: flex; gap: 10px; align-items: center; }
.api-manual { max-width: 980px; }
.api-manual-heading { align-items: end; }
.manual-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.manual-index a { padding: 6px 9px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.manual-index a:hover { color: var(--text); background: var(--surface-muted); }
.manual-callout, .manual-warning { margin: 0 0 30px; padding: 15px 17px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.6; }
.manual-warning { border-left-color: #c06a3f; }
.manual-callout strong, .manual-warning strong { color: var(--text); }
.manual-section { padding: 31px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.manual-section:last-child { border-bottom: 0; }
.manual-section-title { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; }
.manual-section-title > span { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--accent); background: var(--surface-muted); font-size: 11px; font-weight: 800; }
.manual-section h2 { margin: 0 0 4px; font-size: 21px; }
.manual-section h3 { margin: 0 0 8px; font-size: 14px; }
.manual-section-title p, .manual-section p { color: var(--muted); line-height: 1.65; }
.manual-section-title p { margin: 0; }
.manual-section p { margin: 0 0 12px; font-size: 14px; }
.manual-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr); gap: 28px; align-items: start; margin: 0 0 25px; }
.manual-grid:last-child { margin-bottom: 0; }
.manual-grid pre { overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #20211f; color: #e8e9e3; font-size: 12px; line-height: 1.55; }
.manual-grid pre code { color: inherit; font-size: inherit; }
.manual-errors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.manual-errors div { display: grid; gap: 5px; padding: 14px; background: var(--surface); }
.manual-errors code { color: var(--accent); font-size: 12px; }
.manual-errors span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.manual-checklist { display: grid; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.manual-checklist li { padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.manual-checklist li::before { margin-left: -22px; margin-right: 9px; color: var(--ok); content: "✓"; font-weight: 800; }
@media (max-width: 760px) {
  .api-manual-heading { align-items: start; }
  .manual-grid { grid-template-columns: 1fr; gap: 14px; }
  .manual-errors { grid-template-columns: 1fr; }
}

/* API manual v2: a focused product document, not a repurposed data table. */
.api-manual { max-width: 1040px; }
.manual-hero { display: flex; gap: 30px; align-items: end; justify-content: space-between; margin: 0 0 30px; padding: 4px 0 31px; border-bottom: 1px solid var(--border); }
.manual-hero-copy { max-width: 660px; }
.manual-hero h1 { max-width: 620px; margin: 0 0 11px; font-size: clamp(34px, 4.3vw, 51px); line-height: 1.04; letter-spacing: -.045em; }
.manual-hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.manual-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.manual-endpoint { display: grid; flex: 0 0 250px; gap: 7px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-endpoint > span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.manual-endpoint code { overflow-wrap: anywhere; color: var(--accent); font-size: 14px; font-weight: 700; }
.manual-endpoint small { color: var(--muted); font-size: 12px; }
.manual-index { position: sticky; top: 0; z-index: 2; gap: 2px; margin-bottom: 25px; padding: 9px 0 12px; background: var(--canvas); }
.manual-index a { border: 1px solid transparent; border-radius: 6px; font-weight: 650; }
.manual-index a:hover { border-color: var(--border); background: var(--surface); }
.manual-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 36px; }
.manual-capabilities article { display: flex; gap: 11px; align-items: flex-start; min-height: 96px; padding: 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-capabilities h2 { margin: 0 0 4px; font-size: 13px; }
.manual-capabilities p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.manual-status { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800; }
.manual-status.ready { color: var(--ok); background: var(--ok-soft); }
.manual-status.limited { color: #a55d24; background: #fff1df; }
.manual-section { padding: 37px 0; }
.manual-section-title { max-width: 720px; margin-bottom: 25px; }
.manual-section h2 { font-size: 24px; letter-spacing: -.02em; }
.manual-section h3 { margin-bottom: 9px; color: var(--text); font-size: 15px; }
.manual-section p { font-size: 14px; }
.manual-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: manual-step; }
.manual-steps li { min-height: 88px; padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.5; counter-increment: manual-step; }
.manual-steps li::before { display: block; margin-bottom: 7px; color: var(--accent); content: "0" counter(manual-step); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.manual-steps strong { color: var(--text); }
.manual-code-card { overflow: hidden; margin: 0 0 18px; border: 1px solid #30312e; border-radius: 9px; background: #20211f; }
.manual-code-card.compact { margin: 0; }
.manual-code-head { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 0 11px 0 14px; border-bottom: 1px solid #353632; color: #a9aaa4; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.manual-copy { min-height: 26px; padding: 3px 8px; border: 1px solid #53544e; border-radius: 5px; color: #dedfd8; background: transparent; font-size: 11px; font-weight: 700; }
.manual-copy:hover { border-color: #8c8d85; background: #30312e; }
.manual-code-card pre, .manual-grid .manual-code-card pre { overflow: auto; margin: 0; padding: 16px; border: 0; border-radius: 0; background: transparent; color: #e8e9e3; font-size: 12px; line-height: 1.58; }
.manual-code-card pre code { color: inherit; font-size: inherit; }
.manual-note, .manual-warning { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 7px; background: var(--surface-muted); color: var(--muted); font-size: 13px; line-height: 1.6; }
.manual-note strong, .manual-warning strong { color: var(--text); }
.manual-two-col { display: grid; grid-template-columns: minmax(0, .86fr) minmax(430px, 1.14fr); gap: 34px; align-items: start; margin: 0 0 29px; }
.manual-two-col > div > :last-child { margin-bottom: 0; }
.manual-warning { margin-top: 2px; border-left-color: #b76a35; background: #fff8f1; }
.manual-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-top: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.manual-flow div { display: grid; gap: 8px; min-height: 92px; padding: 14px; background: var(--surface); }
.manual-flow b { color: var(--accent); font-size: 12px; }
.manual-flow span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.manual-fineprint { margin: 13px 0 0 !important; color: var(--muted); font-size: 12px !important; }
.manual-client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.manual-client { padding: 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-client > header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
.manual-client > header span { font-size: 16px; font-weight: 750; }
.manual-client > header small { color: var(--muted); font-size: 11px; }
.manual-client p { min-height: 62px; margin-bottom: 15px; font-size: 13px; }
.manual-client .manual-code-card { margin-bottom: 0; }
.manual-reality { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.manual-reality > div { padding: 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.manual-reality .reality-good { border-top: 3px solid var(--accent); }
.manual-reality h3 { margin-bottom: 9px; }
.manual-reality p { margin: 0 0 10px; font-size: 13px; }
.manual-reality p:last-child { margin-bottom: 0; }
html[data-theme="dark"] .manual-warning { border-color: #714a2d; border-left-color: #d18a50; background: #30251d; }
@media (max-width: 900px) {
  .manual-hero { align-items: start; flex-direction: column; }
  .manual-endpoint { width: 100%; max-width: 420px; }
  .manual-two-col { grid-template-columns: 1fr; gap: 16px; }
  .manual-flow { grid-template-columns: repeat(2, 1fr); }
  .manual-reality { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .manual-hero { gap: 20px; padding-bottom: 24px; }
  .manual-hero h1 { font-size: 34px; }
  .manual-index { position: static; overflow-x: auto; flex-wrap: nowrap; }
  .manual-index a { white-space: nowrap; }
  .manual-capabilities, .manual-steps, .manual-client-grid { grid-template-columns: 1fr; }
  .manual-capabilities article { min-height: 0; }
  .manual-flow { grid-template-columns: 1fr; }
}

/* Documentation page: editorial hierarchy first, components only where they help scanning. */
.docs-page { max-width: 1160px; }
.docs-intro { max-width: 760px; padding: 7px 0 42px; border-bottom: 1px solid var(--border); }
.docs-kicker, .docs-label { margin: 0 0 11px; color: var(--accent); font-size: 11px; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.docs-intro h1 { margin: 0 0 13px; font-size: clamp(36px, 4.2vw, 52px); letter-spacing: -.05em; line-height: 1.04; }
.docs-lede { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.62; }
.docs-connection { display: flex; gap: 28px; align-items: center; margin-top: 25px; padding: 13px 0 0; border-top: 1px solid var(--border); }
.docs-connection div { display: grid; gap: 3px; }
.docs-connection span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.docs-connection code { color: var(--text); font-size: 14px; font-weight: 720; }
.docs-connection p { margin: 0; color: var(--muted); font-size: 12px; }
.docs-shell { display: grid; grid-template-columns: 178px minmax(0, 740px); gap: 62px; align-items: start; padding-top: 31px; }
.docs-toc { position: sticky; top: 30px; display: grid; gap: 3px; padding-top: 5px; }
.docs-toc > span { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.docs-toc a { padding: 5px 0; color: var(--muted); font-size: 13px; line-height: 1.35; text-decoration: none; }
.docs-toc a:hover { color: var(--text); }
.docs-toc-action { display: flex; justify-content: space-between; margin-top: 17px; padding-top: 14px !important; border-top: 1px solid var(--border); color: var(--text) !important; font-weight: 700; }
.docs-toc-action b { color: var(--accent); }
.docs-article { min-width: 0; }
.docs-section { padding: 0 0 48px; margin: 0 0 46px; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.docs-section:last-child { margin-bottom: 0; border-bottom: 0; }
.docs-section h2 { max-width: 660px; margin: 0 0 14px; font-size: 27px; letter-spacing: -.025em; line-height: 1.2; }
.docs-section h3 { margin: 0; font-size: 16px; }
.docs-subheading { margin: 31px 0 8px !important; padding-top: 27px; border-top: 1px solid var(--border); font-size: 20px !important; letter-spacing: -.015em; }
.docs-section > p { max-width: 690px; margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.72; }
.docs-section a { color: var(--accent-strong); font-weight: 680; }
.docs-first-request { display: grid; grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr); gap: 26px; align-items: center; margin: 25px 0 21px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.docs-first-request > div > span { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.docs-first-request h3 { margin-bottom: 6px; }
.docs-first-request p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.docs-first-request .docs-code { margin: 0; }
.docs-note, .docs-warning { max-width: 700px; margin: 21px 0; padding: 13px 15px; border-left: 2px solid var(--accent); color: var(--muted); background: var(--surface-muted); font-size: 13px; line-height: 1.6; }
.docs-note strong, .docs-warning strong { color: var(--text); }
.docs-warning { border-left-color: #b76a35; background: #fff8f1; }
.docs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 24px 0; padding: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); list-style: none; }
.docs-steps li { display: flex; gap: 10px; min-height: 90px; padding: 16px 14px 15px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.docs-steps li + li { padding-left: 14px; border-left: 1px solid var(--border); }
.docs-steps b { color: var(--accent); font-size: 12px; }
.docs-steps strong, .docs-steps span { display: block; }
.docs-steps strong { margin-bottom: 4px; color: var(--text); font-size: 13px; }
.docs-code { overflow: hidden; margin: 22px 0; border: 1px solid #383a36; border-radius: 7px; background: #20211f; }
.docs-code > div { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 10px 0 14px; border-bottom: 1px solid #343632; color: #a6a8a1; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.docs-code button { min-height: 25px; padding: 2px 7px; border: 1px solid #53554f; border-radius: 4px; color: #e7e8e2; background: transparent; font-size: 11px; font-weight: 700; }
.docs-code button:hover { border-color: #858780; background: #2b2d29; }
.docs-code pre { overflow: auto; margin: 0; padding: 16px; color: #e9ebe4; font-size: 12px; line-height: 1.58; }
.docs-code code { color: inherit; font-size: inherit; }
.docs-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 23px 0 0; padding: 0; list-style: none; }
.docs-flow li { border-top: 1px solid var(--border); padding-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.docs-flow b, .docs-flow span { display: block; }
.docs-flow b { margin-bottom: 8px; color: var(--accent); font-size: 11px; letter-spacing: .08em; }
.docs-caption { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.docs-clients { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 24px; }
.docs-clients > div + div { padding-top: 30px; border-top: 1px solid var(--border); }
.docs-clients header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.docs-clients header span { color: var(--muted); font-size: 11px; }
.docs-clients p { min-height: 59px; margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.docs-clients .docs-code { margin: 0; }
.docs-client-heading { margin: 39px 0 7px !important; padding-top: 31px; border-top: 1px solid var(--border); font-size: 20px !important; letter-spacing: -.015em; }
.docs-client-intro { max-width: 630px; margin: 0 !important; color: var(--muted); font-size: 13px !important; line-height: 1.58 !important; }
.docs-status dl { display: grid; gap: 0; margin: 23px 0 0; border-top: 1px solid var(--border); }
.docs-status dl > div { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.docs-status dt { color: var(--text); font-size: 13px; font-weight: 720; }
.docs-status dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.58; }
.docs-status dd strong { color: var(--text); }
html[data-theme="dark"] .docs-warning { border-left-color: #d18a50; background: #30251d; }
@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 27px; }
  .docs-toc { position: static; display: flex; gap: 14px; flex-wrap: wrap; padding: 0 0 15px; border-bottom: 1px solid var(--border); }
  .docs-toc > span { flex-basis: 100%; margin: 0; }
  .docs-toc-action { margin: 0; padding: 5px 0 !important; border: 0; }
  .docs-first-request { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 650px) {
  .docs-intro { padding-bottom: 29px; }
  .docs-intro h1 { font-size: 36px; }
  .docs-lede { font-size: 15px; }
  .docs-connection { align-items: start; flex-direction: column; gap: 8px; }
  .docs-steps, .docs-flow { grid-template-columns: 1fr; }
  .docs-steps li { min-height: 0; padding: 13px 0; }
  .docs-steps li + li { padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
  .docs-clients { gap: 27px; }
  .docs-clients > div + div { padding-top: 27px; }
  .docs-status dl > div { grid-template-columns: 1fr; gap: 6px; }
}
