/* Base64 Studio - one style sheet for the public tools, the advertiser area and the back office. */
:root {
  --brand: #0f766e; --brand-rgb: 15,118,110; --brand-dark: #0b5953; --brand-soft: rgba(15,118,110,.12);
  --bg: #f6f7f9; --surface: #fff; --surface-2: #f1f3f6; --surface-3: #e8ebf0;
  --text: #111827; --text-2: #4b5563; --muted: #6b7280; --line: #e3e6eb; --line-2: #d3d8df;
  --ok: #15803d; --ok-bg: #e8f6ec; --warn: #b45309; --warn-bg: #fdf3e2; --bad: #b91c1c; --bad-bg: #fdecec; --info: #1d4ed8; --info-bg: #e8effd;
  --ad-bg: #fbfaf6; --ad-line: #e8e2cf; --ad-label: #8a7a4d;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Thai", Tahoma, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d1117; --surface: #151b23; --surface-2: #1b222c; --surface-3: #232b36;
  --text: #e6e9ee; --text-2: #b4bcc8; --muted: #8b95a3; --line: #262f3b; --line-2: #333d4b;
  --ok: #4ade80; --ok-bg: rgba(74,222,128,.12); --warn: #fbbf24; --warn-bg: rgba(251,191,36,.12); --bad: #f87171; --bad-bg: rgba(248,113,113,.12);
  --info: #93b4fd; --info-bg: rgba(147,180,253,.12);
  --ad-bg: #17191b; --ad-line: #33302a; --ad-label: #b3a37a;
  --brand-soft: rgba(45,212,191,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}
[data-theme="dark"] .link, [data-theme="dark"] .prose a, [data-theme="dark"] a.text-link { color: #5eead4; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); }
a { color: inherit; }
img, svg, video, canvas, iframe { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code, kbd, pre, textarea.code { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.i-sm { width: 15px; height: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-lg { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.link, a.text-link { color: var(--brand); text-decoration: none; }
.link:hover, a.text-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .inner { max-width: 1260px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 12px/1 var(--mono); letter-spacing: -.5px; }
.brand img { height: 32px; }
.mainnav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.mainnav > a, .mainnav > details > summary { padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--text-2); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.mainnav > details > summary::-webkit-details-marker { display: none; }
.mainnav > a:hover, .mainnav > details > summary:hover, .mainnav > a.active { background: var(--surface-2); color: var(--text); }
.mainnav details { position: relative; }
.megamenu { position: absolute; top: calc(100% + 6px); left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 6px 18px; width: min(720px, 92vw); }
.megamenu h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 8px 6px; }
.megamenu a { display: block; padding: 6px 8px; border-radius: 6px; text-decoration: none; font-size: .92rem; }
.megamenu a:hover, .megamenu a.active { background: var(--brand-soft); color: var(--brand); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .mainnav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 12px 14px; margin: 0; box-shadow: var(--shadow-lg); max-height: calc(100vh - 60px); overflow: auto; }
  .nav-open .mainnav { display: flex; }
  .megamenu { position: static; box-shadow: none; border: 0; padding: 4px 0; width: auto; grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: grid; }
  .hide-sm { display: none !important; }
}

/* ---------------------------------------------------------------- buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; min-height: 38px; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn-quiet { background: none; border-color: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: #991b1b; border-color: #991b1b; }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: .85rem; }
.btn-lg { padding: 11px 20px; font-size: 1rem; min-height: 46px; }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.input, .select, .textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); min-height: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { resize: vertical; min-height: 90px; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > label, .label { font-weight: 600; font-size: .9rem; }
.hint { font-size: .82rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: .92rem; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button, .seg label { border: 0; background: none; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--text-2); font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button[aria-pressed="true"], .seg input:checked + span, .seg label:has(input:checked) { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); }

/* ---------------------------------------------------------------- public page grid with the ad rail */
.page { max-width: 1260px; margin: 0 auto; padding: 22px 16px 10px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; }
.page.no-ads { grid-template-columns: minmax(0, 1fr); max-width: 1000px; }
.content { min-width: 0; }
.ad-rail { position: sticky; top: 76px; display: grid; gap: 14px; max-height: calc(100vh - 90px); overflow: auto; scrollbar-width: none; }
.ad-rail::-webkit-scrollbar { display: none; }
@media (max-width: 1100px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .ad-rail { position: static; order: 2; max-height: none; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); justify-items: center; }
  .ad-rail .ad-sky { display: none; }
}

/* ---------------------------------------------------------------- ads */
.ad { position: relative; background: var(--ad-bg); border: 1px solid var(--ad-line); border-radius: 10px; overflow: hidden; }
.ad-label { position: absolute; top: 4px; right: 6px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ad-label); background: var(--ad-bg); padding: 0 4px; border-radius: 4px; z-index: 2; }
.ad-img { width: 300px; max-width: 100%; }
.ad-box { display: grid; }
.ad-box a { display: block; line-height: 0; }
.ad-box img { width: 100%; height: auto; display: block; }
.ad-top { aspect-ratio: 300 / 250; width: 300px; max-width: 100%; }
.ad-sky { aspect-ratio: 300 / 600; width: 300px; }
.ad-text { padding: 12px 14px 6px; width: 300px; max-width: 100%; }
.ad-text .ad-head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ad-label); margin-bottom: 4px; }
.ad-text .t { display: block; padding: 8px 0; border-top: 1px dashed var(--ad-line); text-decoration: none; line-height: 1.4; }
.ad-text .t:first-of-type { border-top: 0; }
.ad-text .t b { color: var(--brand); display: block; font-size: .95rem; }
.ad-text .t span { color: var(--text-2); font-size: .85rem; display: block; }
.ad-text .t small { color: var(--ok); font-size: .78rem; }
.ad-text .t:hover b { text-decoration: underline; }
.ad-house { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; height: 100%; padding: 18px; text-decoration: none;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(var(--brand-rgb), .045) 12px 24px); line-height: 1.4 !important; color: var(--text-2); }
.ad-house b { color: var(--text); font-size: 1rem; }
.ad-house .size { font: 600 12px var(--mono); color: var(--ad-label); }
.ad-house .cta { margin-top: 4px; color: var(--brand); font-weight: 700; font-size: .88rem; }
.ad-house:hover .cta { text-decoration: underline; }
.ad-text .ad-house { padding: 10px 0; background: none; align-items: flex-start; text-align: left; border-top: 1px dashed var(--ad-line); }
.ad-bottom-wrap { max-width: 1260px; margin: 6px auto 0; padding: 0 16px; display: grid; gap: 12px; justify-items: center; }
.ad-banner { width: 728px; max-width: 100%; aspect-ratio: 728 / 90; }
.ad-banner .m { display: none; }
@media (max-width: 760px) {
  .ad-banner { width: 320px; aspect-ratio: 320 / 100; }
  .ad-banner .d.has-m { display: none; }
  .ad-banner .m { display: block; }
}
.ad-links { width: 100%; max-width: 1228px; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.ad-links [data-fill] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.ad-links .ad-head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ad-label); }
.ad-links a { text-decoration: none; font-size: .9rem; }
.ad-links a b { color: var(--brand); }
.ad-links a small { color: var(--muted); margin-left: 4px; }
.ad-links a:hover b { text-decoration: underline; }
.ad-links .ad-house { display: inline !important; padding: 0; background: none; color: var(--muted); }

/* ---------------------------------------------------------------- tool page */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.lead { color: var(--text-2); font-size: 1.02rem; max-width: 74ch; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--text-2); margin: 4px 0 18px; }
.trust span { display: flex; align-items: center; gap: 6px; }
.trust .i { color: var(--ok); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.tool { overflow: hidden; }
.tool-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tool-bar .opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-left: auto; font-size: .88rem; }
.tool-bar .opts .select { width: auto; min-height: 34px; padding: 5px 30px 5px 10px; }
.panes { display: grid; grid-template-columns: 1fr 1fr; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--line); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); min-height: 46px; }
.pane-head b { color: var(--text); font-size: .9rem; }
.pane textarea { flex: 1; width: 100%; min-height: 300px; border: 0; padding: 14px; resize: vertical; background: var(--surface); font: 13.5px/1.55 var(--mono); outline: none; word-break: break-all; }
.pane textarea:focus { box-shadow: inset 0 0 0 2px var(--brand-soft); }
.pane textarea[readonly] { background: var(--surface); }
.pane-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
.pane-foot .stat { font-size: .8rem; color: var(--muted); margin-right: auto; }
@media (max-width: 760px) {
  .panes { grid-template-columns: 1fr; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .pane textarea { min-height: 200px; }
}
.swap { display: grid; place-items: center; }
.status-line { padding: 9px 14px; font-size: .86rem; display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); }
.status-line.ok { color: var(--ok); background: var(--ok-bg); }
.status-line.err { color: var(--bad); background: var(--bad-bg); }
.status-line.warn { color: var(--warn); background: var(--warn-bg); }
.status-line.info { color: var(--info); background: var(--info-bg); }
.status-line a, .status-line button.linklike { color: inherit; font-weight: 700; }
button.linklike { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.drop { margin: 14px; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 30px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .big { font-weight: 700; font-size: 1.05rem; display: block; margin: 8px 0 2px; }
.drop .i { width: 34px; height: 34px; color: var(--brand); }
.file-list { margin: 0 14px 14px; display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.file-item img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.file-item .meta { flex: 1; min-width: 0; font-size: .85rem; }
.file-item .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.preview { margin: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .86rem; }
.preview-head b { font-size: .95rem; }
.preview-body { padding: 12px; display: grid; place-items: center; min-height: 140px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 18px 18px; }
.preview-body img { max-height: 460px; object-fit: contain; }
.preview-body iframe { width: 100%; height: 560px; border: 0; background: #fff; }
.preview-body audio, .preview-body video { width: 100%; max-height: 460px; }
.preview-body pre { margin: 0; width: 100%; max-height: 420px; overflow: auto; background: var(--surface); padding: 12px; border-radius: 8px; font-size: 12.5px; text-align: left; white-space: pre-wrap; word-break: break-all; }
.hexdump { font: 12px/1.6 var(--mono); white-space: pre; overflow: auto; max-height: 360px; width: 100%; background: var(--surface); padding: 10px; border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); } .chip.muted { background: var(--surface-2); color: var(--muted); } .chip.brand { background: var(--brand-soft); color: var(--brand); }
.out-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.out-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 4px 9px; font-size: .8rem; cursor: pointer; color: var(--text-2); }
.out-tabs button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.problems { list-style: none; margin: 0; padding: 0 14px 14px; display: grid; gap: 6px; }
.problems li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.verdict { margin: 14px; padding: 14px 16px; border-radius: 10px; display: flex; gap: 12px; align-items: center; font-weight: 600; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); } .verdict.err { background: var(--bad-bg); color: var(--bad); }
.verdict .i { width: 26px; height: 26px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.jwt-part { margin: 14px; }
.jwt-part h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.jwt-part pre { margin: 0; background: var(--surface-2); padding: 12px; border-radius: 8px; overflow: auto; font-size: 13px; border-left: 4px solid var(--line-2); }
.jwt-h pre { border-color: #ef4444; } .jwt-p pre { border-color: #a855f7; } .jwt-s pre { border-color: #0ea5e9; }
.jwt-color .h { color: #dc2626; } .jwt-color .p { color: #9333ea; } .jwt-color .s { color: #0284c7; }
.claims { width: 100%; border-collapse: collapse; font-size: .88rem; }
.claims td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }

/* explanations below the tool */
.below { margin-top: 26px; display: grid; gap: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 14px 52px; position: relative; font-size: .93rem; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.faq summary { padding: 13px 16px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "-"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--text-2); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tool-link { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; font-weight: 600; font-size: .93rem; }
.tool-link:hover { border-color: var(--brand); color: var(--brand); }
.tool-link .i { color: var(--brand); }

/* ---------------------------------------------------------------- prose (guides, policies) */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose a { color: var(--brand); }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: 13px; line-height: 1.6; }
.prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 0 0 1em; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 26px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .inner { max-width: 1260px; margin: 0 auto; padding: 26px 16px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 22px; font-size: .9rem; }
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.site-footer a { display: block; text-decoration: none; color: var(--text-2); padding: 3px 0; }
.site-footer a:hover { color: var(--brand); }
.site-footer .copy { max-width: 1260px; margin: 0 auto; padding: 12px 16px 22px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .site-footer .inner { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- alerts and toasts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.err { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.info { background: var(--info-bg); color: var(--info); }
.alert .i { margin-top: 1px; }
.secret { font: 600 1.05rem var(--mono); background: var(--surface); color: var(--text); padding: 6px 10px; border-radius: 6px; display: inline-block; margin-top: 6px; user-select: all; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; z-index: 200; pointer-events: none; display: flex; gap: 8px; align-items: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------------------------------------------------------- app shell (advertiser area and back office) */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
.side h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 10px 6px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .93rem; }
.side a:hover { background: var(--surface-2); color: var(--text); }
.side a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side .count { margin-left: auto; background: var(--warn); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; font-weight: 700; }
.main { padding: 22px 26px 40px; min-width: 0; max-width: 1300px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side h4 { display: none; }
  .main { padding: 16px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--brand); }
.kpi .k { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 1.55rem; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.kpi.attn { border-color: var(--warn); background: var(--warn-bg); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
@media (max-width: 500px) { .grid-2 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
a.rowlink { font-weight: 600; text-decoration: none; }
a.rowlink:hover { color: var(--brand); }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.chart { width: 100%; height: 220px; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .grid line { stroke: var(--line); }
.chart-legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); padding: 0 18px 12px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters .input, .filters .select { width: auto; min-width: 160px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.creative-preview { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.creative-preview img { border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.text-ad-preview { border: 1px solid var(--ad-line); background: var(--ad-bg); border-radius: 10px; padding: 12px 14px; max-width: 320px; }
.text-ad-preview b { color: var(--brand); display: block; }
.text-ad-preview span { color: var(--text-2); font-size: .88rem; display: block; }
.text-ad-preview small { color: var(--ok); }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
@media (max-width: 900px) { .review-item { grid-template-columns: 1fr; } }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; font-size: .9rem; position: relative; }
.timeline li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); flex: none; display: grid; place-items: center; }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.timeline li.now .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline li .dot .i { width: 13px; height: 13px; stroke-width: 3; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pay-method { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.pay-method h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.qr { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; align-self: center; }
.pp-head { background: #113566; color: #fff; text-align: center; padding: 6px; border-radius: 8px; font-weight: 700; letter-spacing: .04em; }
.amount-big { font-size: 1.6rem; font-weight: 800; text-align: center; }
.test-banner { background: repeating-linear-gradient(135deg, #fef3c7 0 14px, #fde68a 14px 28px); color: #78350f; font-weight: 700; padding: 10px 14px; border-radius: 10px; text-align: center; }
.inv-lines { width: 100%; border-collapse: collapse; }
.inv-lines td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.inv-lines td.num { text-align: right; font-variant-numeric: tabular-nums; }
.inv-lines tr.total td { font-weight: 800; font-size: 1.1rem; border-bottom: 0; }

/* ---------------------------------------------------------------- advertise page */
.hero-ad { background: linear-gradient(135deg, var(--brand) 0%, #134e4a 100%); color: #fff; border-radius: 16px; padding: 30px; margin-bottom: 22px; position: relative; overflow: hidden; }
.hero-ad h1 { color: #fff; }
.hero-ad p { color: rgba(255,255,255,.88); max-width: 62ch; }
.hero-ad .facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; }
.hero-ad .facts b { display: block; font-size: 1.6rem; }
.hero-ad .facts span { font-size: .85rem; opacity: .85; }
.hero-ad .btn { background: #fff; color: #134e4a; border-color: #fff; }
.slot-map { display: grid; grid-template-columns: 90px 1fr; grid-auto-rows: auto; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; width: 220px; font-size: 9px; }
.slot-map > div { border-radius: 5px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); padding: 4px; text-align: center; }
.slot-map .on { background: var(--brand); color: #fff; font-weight: 700; }
.slot-map .m-top { height: 54px; } .slot-map .m-text { height: 36px; } .slot-map .m-sky { height: 100px; } .slot-map .m-tool { grid-row: 1 / 4; grid-column: 2; }
.slot-map .m-bottom { grid-column: 1 / 3; grid-row: 4; height: 26px; }
.rate-table td, .rate-table th { text-align: center; }
.rate-table td:first-child, .rate-table th:first-child { text-align: left; }
.rate-table .price { font-weight: 700; font-size: 1.02rem; }
.rate-table tr.sel { background: var(--brand-soft); }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.plan h3 { display: flex; align-items: center; gap: 8px; }
.plan ul { padding-left: 1.1em; margin: 0; color: var(--text-2); font-size: .9rem; }

/* ---------------------------------------------------------------- booking form */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .wizard { grid-template-columns: 1fr; } }
.wizard .summary { position: sticky; top: 76px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface); display: block; }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); }
.choice:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.choice b { display: block; }
.choice small { color: var(--muted); display: block; }
.choice .price { color: var(--brand); font-weight: 700; margin-top: 4px; display: block; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.05rem; }
.step-title .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 700; flex: none; }
.quote-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .92rem; }
.quote-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.1rem; }

/* ---------------------------------------------------------------- sign-in */
.auth { max-width: 440px; margin: 40px auto; padding: 0 16px; }
.auth .card { padding: 26px; }
.demo-box { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: .88rem; color: var(--text-2); }
.demo-box button { margin: 4px 6px 0 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-header, .side, .ad-rail, .ad-bottom-wrap, .site-footer, .no-print { display: none !important; } .shell { display: block; } }
