/* Estedad (SIL OFL 1.1, see fonts/Estedad-OFL.txt), self-hosted variable font */
@font-face {
  font-family: 'Estedad'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/estedad-arabic-wght.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}
@font-face {
  font-family: 'Estedad'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/estedad-latin-wght.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0a0d14; --panel: #131927; --panel2: #1b2336; --line: #242d42; --line-2: #333f5c; --text: #eaeefa; --muted: #9ba6bf;
  --accent: #34d399; --accent-2: #22d3ee; --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --danger: #f2655c; --radius: 12px;
  --shadow-1: 0 1px 0 #ffffff0a inset, 0 6px 20px #0006;
  --shadow-2: 0 18px 44px #000a;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .14s; --t-med: .26s; --t-slow: .5s;
  --c-message: #3b82f6; --c-input: #f59e0b; --c-file_input: #f97316; --c-condition: #a855f7;
  --c-send_file: #14b8a6; --c-notify: #eab308; --c-record: #0ea5e9; --c-set: #64748b; --c-end: #ef4444;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.75 'Estedad', Tahoma, 'Segoe UI', system-ui, sans-serif; font-optical-sizing: auto; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
button, select, input, textarea { font: inherit; color: inherit; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
button { cursor: pointer; transition: filter .12s, background .12s; }
button:hover { filter: brightness(1.15); }
button:active { filter: brightness(.9); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #06210f; font-weight: 600; }
button.danger { color: var(--danger); }
button.icon { width: 38px; padding: 6px 0; text-align: center; font-size: 17px; line-height: 1.2; }
button:disabled { opacity: .4; cursor: default; filter: none; }
textarea { width: 100%; min-height: 84px; resize: vertical; }
[hidden] { display: none !important; }

.bar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--panel); position: relative; z-index: 50; }
.brand { white-space: nowrap; }
.namebtn { background: transparent; border-color: transparent; color: var(--muted); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.namebtn:hover { border-color: var(--line); }
.spacer { flex: 1; }
.menu { position: absolute; top: calc(100% + 4px); inset-inline-end: 12px; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 190px; box-shadow: 0 10px 30px #0008; }
.menu button { background: transparent; border-color: transparent; text-align: start; padding: 10px 12px; }
.menu button:hover { background: var(--panel2); }
.problems { background: #3a1f1d; color: #ffb4ae; padding: 6px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }

main { flex: 1; display: flex; min-height: 0; position: relative; }
#canvas { flex: 1; position: relative; overflow: hidden; direction: ltr; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px; }
#canvas:active { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#world.anim { transition: transform .28s ease; }
#edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
#edges path { fill: none; stroke: var(--muted); stroke-width: 1.6; opacity: .7; }
#edges path.sel { stroke: var(--accent); stroke-width: 2.6; opacity: 1; }
.hint { position: absolute; bottom: 10px; inset-inline-start: 12px; color: var(--muted); font-size: 12px; pointer-events: none; direction: rtl; opacity: .8; }

.ctl { position: absolute; z-index: 5; direction: rtl; cursor: default; }
.zoom { top: 12px; left: 12px; display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.zoom button { border: 0; border-radius: 0; background: transparent; width: 40px; padding: 4px 0; font-size: 18px; }
.zoom button + button { border-inline-start: 1px solid var(--line); }
.fab { left: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; padding: 0; font-size: 28px; line-height: 1; background: var(--accent); border: 0; color: #06210f; box-shadow: 0 6px 18px #0009; }

.node { position: absolute; width: 210px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; direction: rtl; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: 0 2px 8px #0005; transition: border-color .12s, box-shadow .12s; }
.node:hover { border-color: #4a515c; }
.node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px #2fbf7133, 0 4px 14px #0007; }
.node .nh { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px 9px 0 0; font-weight: 600; font-size: 12px; color: #fff; }
.node .nh .id { opacity: .75; font-weight: 400; direction: ltr; }
.node .nb { padding: 8px 10px; color: var(--muted); font-size: 12.5px; max-height: 96px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.node .btns { display: flex; flex-direction: column; gap: 3px; padding: 0 10px 8px; }
.node .btns span { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; text-align: center; color: var(--text); }
.node .start { background: var(--accent); color: #06210f; border-radius: 6px; padding: 0 6px; }
.t-message .nh { background: var(--c-message); } .t-input .nh { background: var(--c-input); }
.t-file_input .nh { background: var(--c-file_input); } .t-condition .nh { background: var(--c-condition); }
.t-send_file .nh { background: var(--c-send_file); } .t-set .nh { background: var(--c-set); } .t-record .nh { background: var(--c-record); } .t-notify .nh { background: var(--c-notify); color: #1a1500; } .t-end .nh { background: var(--c-end); }

#inspector { width: 350px; border-inline-start: 1px solid var(--line); background: var(--panel); overflow-y: auto; padding: 12px 14px 24px; overscroll-behavior: contain; }
#inspector h3 { margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; }
#inspector h3 .id { color: var(--muted); font-weight: 400; direction: ltr; font-size: 12px; }
#inspector label { display: block; margin: 12px 0 3px; color: var(--muted); font-size: 12.5px; }
#inspector input, #inspector select { width: 100%; }
#inspector .actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.row > * { min-width: 0; }
.row > span { color: var(--muted); white-space: nowrap; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-top: 8px; background: var(--bg); }
.card .row input, .card .row select { flex: 1; }
.small { padding: 3px 10px; font-size: 13px; }
.chip { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--accent); color: #06210f; font-size: 12px; }

.overlay { position: fixed; inset: 0; z-index: 70; background: #0009; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--panel); width: min(520px, 100%); border-radius: 18px 18px 0 0; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.sheet h3 { margin: 0 0 12px; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { display: flex; gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.tile i { font-style: normal; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; flex: none; }
.tile b { display: block; font-size: 14px; }
.tile small { color: var(--muted); font-size: 11.5px; line-height: 1.4; display: block; }

#preview { position: fixed; inset-block: 0; inset-inline-start: 0; top: 57px; width: 380px; background: var(--panel); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; box-shadow: 0 0 30px #0008; }
.pv-head { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pv-head strong { flex: 1; }
#pvLog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; border-end-start-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel2); align-self: flex-start; }
.msg.me { align-self: flex-end; background: #20472f; border-end-start-radius: 14px; border-end-end-radius: 4px; }
.msg.file { border: 1px dashed var(--c-send_file); }
.kb { display: flex; flex-direction: column; gap: 4px; align-self: stretch; }
.kb div { display: flex; gap: 4px; }
.kb button { flex: 1; color: var(--accent); }
.kb button[disabled] { opacity: .45; }
#pvForm { display: flex; gap: 6px; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
#pvInput { flex: 1; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #111; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; z-index: 90; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 24px #000a; max-width: 92vw; }
#toast button { background: transparent; border: 0; color: var(--accent); padding: 0; font-weight: 600; }

@media (max-width: 800px) {
  .bar { padding-inline: 8px; }
  .lbl { display: none; }
  #previewBtn { width: 38px; padding: 6px 0; }
  .namebtn { max-width: 26vw; }
  #inspector { position: fixed; inset-inline: 0; bottom: 0; width: auto; height: 52vh; border: 0; border-top: 1px solid var(--line); z-index: 30; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px #000a; padding-top: 18px; }
  #inspector::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  #preview { inset: 0; width: auto; z-index: 80; border: 0; top: 0; padding-top: env(safe-area-inset-top); }
  .hint { display: none; }
  .fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 801px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 18px; }
}
@media (pointer: coarse) {
  button, select, input { min-height: 44px; font-size: 16px; }
  textarea { font-size: 16px; }
  button.small { min-height: 38px; }
  button.icon { width: 44px; }
  .zoom button { width: 46px; }
}
@media (prefers-reduced-motion: reduce) { #world.anim { transition: none; } * { transition: none !important; } }

/* ---- account pages ---- */
body.page { overflow: auto; }
.muted { color: var(--muted); }
.small-note { font-size: 12.5px; margin: 6px 0 0; }
.form-error { color: #ffb4ae; margin: 8px 0 0; font-size: 13px; }
.wide { width: 100%; margin-top: 14px; }
a.btn { display: inline-block; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; color: inherit; text-decoration: none; }
.auth { max-width: 380px; margin: 0 auto; padding: 56px 20px; }
.auth h1 { margin: 0 0 4px; }
.auth label { display: block; margin: 14px 0 3px; color: var(--muted); font-size: 12.5px; }
.auth input { width: 100%; }
.tabs { display: flex; gap: 6px; margin: 22px 0 4px; }
.tabs button { flex: 1; background: transparent; }
.tabs button[aria-selected="true"] { background: var(--panel2); border-color: var(--accent); }
.dash { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.dash-head { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; font-size: 20px; }
.who { font-size: 13px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.botlist { display: flex; flex-direction: column; gap: 10px; }
.botcard { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.botname { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; }
.chip.on { background: var(--accent); }
.chip.off { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.savestate { color: var(--muted); font-size: 12px; white-space: nowrap; }
.field-note { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.runbox .row { margin-top: 8px; }
.runbox ol { margin: 6px 0 12px; padding-inline-start: 20px; color: var(--muted); font-size: 13px; }
@media (max-width: 800px) { .savestate { display: none; } }

/* ---- simple mode wizard ---- */
.wizard { max-width: 560px; margin: 0 auto; padding: 16px 16px 56px; }
.wizard h1 { font-size: 20px; margin: 8px 0 4px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; font-size: 12.5px; }
.steps li { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.steps li b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--panel2); font-size: 12px; }
.steps li.on { color: var(--text); border-color: var(--accent); }
.steps li.on b, .steps li.done b { background: var(--accent); color: #06210f; }
.steps li.done { color: var(--text); }
.field { margin-top: 14px; }
.field > label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }
.field input:not([type=checkbox]), .field textarea { width: 100%; }
.check { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; padding: 6px 0; }
.check input { width: 18px; height: 18px; min-height: 0; }
.warn { background: #3a2f12; color: #f3d98b; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.pv-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; margin-top: 10px; }
.pv-log { height: 52vh; min-height: 280px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pv-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.pv-form input { flex: 1; }
.cardbox { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.cardbox h3 { margin: 0 0 6px; font-size: 15px; }
.guide { margin: 4px 0 10px; padding-inline-start: 20px; color: var(--muted); font-size: 13px; }
.row { flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }

body.page main { display: block; }
.wizard textarea { min-height: 110px; }

/* ---- wizard v2: tabs, products, orders ---- */
.tabbar { display: flex; gap: 4px; overflow-x: auto; margin: 12px 0; border-bottom: 1px solid var(--line); }
.tabbar button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 8px 12px; color: var(--muted); white-space: nowrap; }
.tabbar button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.badge { display: inline-block; margin-inline-start: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--panel2); font-size: 11.5px; line-height: 18px; text-align: center; }
.spread { justify-content: space-between; }
.cardbox .row:first-child { margin-top: 0; }
.prod { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: var(--bg); }
.prod summary { cursor: pointer; padding: 10px 12px; list-style: none; }
.prod summary::-webkit-details-marker { display: none; }
.prod summary::before { content: '▸'; display: inline-block; margin-inline-end: 6px; color: var(--muted); }
.prod[open] summary::before { content: '▾'; }
.ptitle { font-weight: 600; }
.pmeta { font-size: 12.5px; }
.prodbody { padding: 0 12px 12px; }
.problems-box { background: #3a1f1d; color: #ffb4ae; border-radius: 10px; padding: 10px 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.linklike { background: transparent; border: 0; padding: 2px 0; color: inherit; text-align: start; text-decoration: underline; min-height: 0; }
.linkbtn { flex: 1; text-align: center; color: var(--accent); text-decoration: none; }
.order { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.order.isdone { opacity: .6; }

/* ---- orders management ---- */
.orderlist { display: flex; flex-direction: column; gap: 12px; }
.orderlist .order { gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--panel); }
.order.new { border-inline-start: 4px solid var(--accent); }
.order.confirmed { border-inline-start: 4px solid var(--c-message); }
.order.rejected { border-inline-start: 4px solid var(--danger); opacity: .85; }
.order.done { opacity: .65; }
.otitle { font-size: 15px; }
.cust { display: flex; flex-direction: column; gap: 2px; }
.cust a { color: var(--accent); }
.receipts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.receipt { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.receipt img { display: block; max-width: 160px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.okbtn { background: var(--accent); border-color: var(--accent); color: #06210f; font-weight: 600; }
.composer { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.composer input, .composer textarea { width: 100%; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.thread { display: flex; flex-direction: column; gap: 4px; border-inline-start: 2px solid var(--line); padding-inline-start: 10px; }
.sent { font-size: 13px; white-space: pre-wrap; }
.chip.ok { background: var(--c-message); color: #fff; }
.chip.bad { background: var(--danger); color: #fff; }
.dash .tabbar { margin-top: 0; }
.newbadge { background: var(--accent); color: #06210f; border-radius: 9px; padding: 0 7px; font-size: 12px; margin-inline-start: 4px; }

body.page main { min-width: 0; width: 100%; }
.tabbar { max-width: 100%; }

/* ---- template gallery ---- */
.gallery { max-width: 980px; margin: 0 auto; padding: 24px 16px 56px; }
.gallery h1 { margin: 0 0 6px; font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.tcard { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.tcard h2 { margin: 4px 0 0; font-size: 18px; }
.tcard p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tcard .tfor { color: var(--text); font-size: 13px; }
.ticon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--panel2); font-size: 28px; }
.tlist { margin: 4px 0 8px; padding-inline-start: 18px; color: var(--muted); font-size: 13px; flex: 1; }
.tcard .wide { margin-top: auto; text-align: center; }
.foot { margin-top: 22px; font-size: 13px; }
.foot a { color: var(--accent); }
.frow { display: flex; gap: 4px; flex-wrap: wrap; }
.frow a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .tcard { transition: none; } .tcard:hover { transform: none; } }

/* ---- attachment in the message composer ---- */
.attach { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.attach img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.fileicon { width: 48px; height: 48px; display: grid; place-items: center; font-size: 26px; background: var(--panel2); border-radius: 8px; }
.fname { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---- primary links and the main call to action ---- */
a.btn.primary { background: var(--accent); border-color: var(--accent); color: #06210f; font-weight: 600; }
a.btn, button { text-decoration: none; }
a.btn.cta, button.cta { background: var(--accent); border: 1px solid var(--accent); color: #06210f; font-weight: 800; font-size: 16px; padding: 10px 24px; border-radius: 12px; box-shadow: 0 6px 18px #2fbf7138; }
a.btn.cta:hover, button.cta:hover { filter: brightness(1.1); box-shadow: 0 8px 22px #2fbf7155; }
.dash-head .quiet { background: transparent; color: var(--muted); }
@media (max-width: 800px) { .dash-head .cta { flex: 1 1 100%; text-align: center; order: -1; } }

/* ============ shared top bar ============ */
.bar { gap: 14px; }
a.brand { font-weight: 800; font-size: 16px; color: var(--text); text-decoration: none; white-space: nowrap; }
.navlinks { display: flex; gap: 2px; }
.navlinks a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.navlinks a:hover { color: var(--text); background: var(--panel2); }
.navlinks a.on { color: var(--text); background: var(--panel2); font-weight: 600; }
.planchip { padding: 3px 12px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; white-space: nowrap; }
.planchip.free b { color: var(--accent); }
.userbtn { display: flex; align-items: center; gap: 8px; background: transparent; border-color: transparent; padding: 3px 8px; }
.userbtn:hover { background: var(--panel2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #06210f; display: grid; place-items: center; font-weight: 800; }
.uname { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .menu-item, .menu a.menu-item { display: block; width: 100%; text-align: start; padding: 10px 12px; background: transparent; border: 0; border-radius: 8px; color: var(--text); text-decoration: none; cursor: pointer; }
.menu .menu-item:hover { background: var(--panel2); }
.menu .menu-item.danger { color: var(--danger); }
.mobile-only { display: none !important; }
@media (max-width: 800px) {
  .navlinks, .uname { display: none; }
  .mobile-only { display: block !important; }
}

/* ============ dashboard ============ */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { margin: 0; font-size: 24px; }
.hello p { margin: 2px 0 0; }
.hello-actions { display: flex; gap: 8px; align-items: center; }
.morewrap { position: relative; }
.morewrap .menu { inset-inline-end: 0; inset-inline-start: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.stat.hot { border-color: var(--accent); box-shadow: 0 0 0 1px #2fbf7133; }
.stat a { color: var(--accent); text-decoration: none; font-size: 13px; }
.big { font-size: 24px; line-height: 1.2; }
.meterbox { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.meter { height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }
.meter.warn span { background: #f59e0b; }
.meter.full span { background: var(--danger); }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; margin-top: 12px; border: 1px solid var(--line); background: var(--panel); }
.banner.warn { background: #3a2f12; border-color: #5a4720; color: #f3d98b; }
.banner.bad { background: #3a1f1d; border-color: #5a2d29; color: #ffb4ae; }
.banner.info { background: #12303a; border-color: #1f4a58; color: #9fd8ea; }
.sectitle { font-size: 17px; margin: 26px 0 10px; }
.botlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.botcard { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; padding: 14px; border-radius: 16px; transition: border-color .15s; }
.botcard:hover { border-color: #444b57; }
.bothead { display: flex; align-items: center; gap: 12px; }
.ticon.sm { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; flex: none; }
.botinfo { flex: 1; min-width: 0; }
.botname { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botsub { font-size: 12.5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.on { background: var(--accent); box-shadow: 0 0 0 3px #2fbf7130; }
.dot.pend { background: #f59e0b; }
.botstats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.botstats > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.botstats b { font-size: 18px; }
.botstats .hotnum { border-color: var(--accent); }
.botstats .hotnum b { color: var(--accent); }
.nextstep { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #3a2f12; color: #f3d98b; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.botactions { display: flex; gap: 8px; flex-wrap: wrap; }
.botactions .btn { flex: 1; text-align: center; }
.botcard .menu { top: calc(100% + 4px); inset-inline-end: 0; }
.emptystate { text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: 18px; padding: 28px 16px; }
.emptystate h2 { margin: 0 0 4px; }
.quickpicks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; text-align: start; }
.quick { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.quick:hover { border-color: var(--accent); transform: translateY(-2px); }
.qicon { font-size: 26px; }
@media (max-width: 800px) {
  .hello-actions { width: 100%; }
  .hello-actions .cta { flex: 1; text-align: center; }
  .botlist { grid-template-columns: 1fr; }
}

/* ============ account ============ */
.narrow { max-width: 640px; margin: 0 auto; padding: 24px 16px 56px; }
.narrow.wide2 { max-width: 760px; }
.narrow h1, .plansmain h1 { margin: 0 0 12px; font-size: 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cardbox h2 { margin: 0 0 8px; font-size: 17px; }
.subhead { margin: 16px 0 6px; font-size: 14px; }
.invoices { display: flex; flex-direction: column; gap: 8px; }
.invoice { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.dangerzone { border-color: #5a2d29; }
.chip.warnchip { background: #f59e0b; color: #2a1800; }
.cardbox input[readonly] { opacity: .7; }
.cardbox .field input, .cardbox .field select { width: 100%; }

/* ============ plans and checkout ============ */
.plansmain { max-width: 1100px; margin: 0 auto; padding: 24px 16px 56px; }
.lead { margin-top: -6px; }
.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.plancard { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px 18px; }
.plancard.popular { border-color: var(--accent); box-shadow: 0 8px 28px #2fbf7120; }
.plancard.current { background: #1c2a22; }
.plancard h2 { margin: 0; font-size: 19px; }
.plancard p { margin: 0; font-size: 13px; }
.ribbon { position: absolute; top: -11px; inset-inline-start: 16px; background: var(--accent); color: #06210f; font-weight: 700; font-size: 12px; padding: 1px 10px; border-radius: 999px; }
.ribbon.cur { inset-inline-start: auto; inset-inline-end: 16px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.price { margin: 6px 0; }
.price b { font-size: 30px; }
.perks { list-style: none; padding: 0; margin: 0 0 10px; flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.perks li::before { content: '✓'; color: var(--accent); margin-inline-end: 8px; font-weight: 700; }
.perks li.no { color: var(--muted); }
.perks li.no::before { content: '✕'; color: var(--muted); }
.checkout { margin-top: 18px; max-width: 560px; margin-inline: auto; }
.amount { display: flex; justify-content: space-between; align-items: baseline; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.amount b { font-size: 20px; color: var(--accent); }
.cardnum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.cardnum .num { font-size: 20px; letter-spacing: 1.5px; font-weight: 700; flex: 1; }
.invoicecard .rcptimg { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); }

/* wider dashboard; the orders list keeps a readable width */
.dash { max-width: 1040px; }
.dash.ordersmain { max-width: 780px; }
.stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- online payment ---- */
.paybox { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); margin-top: 14px; }
.paystate { padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.paystate.paid { background: #12301f; color: #8fe0b0; }
.paystate.wait { background: #3a2f12; color: #f3d98b; }

.paystate.review { background: #12303a; color: #9fd8ea; }

/* ---- first visit: a welcome instead of empty numbers ---- */
.firstrun #stats, .firstrun #notice, .firstrun .sectitle, .firstrun .hello-actions { display: none; }
.firstrun .hello { margin-bottom: 8px; }
.emptystate { margin-top: 18px; background: transparent; border: 0; padding: 0; text-align: start; }
.emptystate h2 { margin: 22px 0 4px; font-size: 20px; }
.emptystate h3 { margin: 4px 0 0; font-size: 18px; }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps3 li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.steps3 li div { display: flex; flex-direction: column; }
.steps3 small { font-size: 12.5px; }
.stepnum { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #06210f; font-size: 16px; }
.firstrun .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 800px) { .steps3 { grid-template-columns: 1fr; } }

.foot .linklike { color: var(--accent); }

/* ====================================================================
   DESIGN v2 — depth, gradient accents, SVG icons and purposeful motion.
   Tokens live in :root at the top of this file. Motion is disabled by the
   prefers-reduced-motion block at the very end.
   ==================================================================== */

::selection { background: #34d39940; }
html { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
body {
  background:
    radial-gradient(900px 520px at 88% -8%, #34d3991c, transparent 60%),
    radial-gradient(760px 520px at 4% 108%, #8b5cf61c, transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- top bar: frosted glass that stays in view ---- */
.bar {
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
a.brand { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.2px; }
.navlinks a { position: relative; transition: color var(--t-fast), background-color var(--t-med); }
.navlinks a.on::after { content: ''; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); animation: grow-x var(--t-med) var(--ease-out) both; transform-origin: center; }
.planchip { transition: border-color var(--t-med), transform var(--t-fast) var(--ease-out); }
.planchip:hover { border-color: #34d39988; transform: translateY(-1px); }
.avatar { background: var(--grad); box-shadow: 0 0 0 2px #34d39933; }

/* ---- controls ---- */
button, a.btn, select, input, textarea {
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), background-color var(--t-med), border-color var(--t-med), color var(--t-med), filter var(--t-fast);
}
button:not(:disabled):active, a.btn:active { transform: scale(.97); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #34d39926; }
button:focus-visible, a.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary, a.btn.primary, a.btn.cta, button.cta {
  background: var(--grad); border-color: transparent; color: #03281c;
  box-shadow: 0 8px 22px #22d3ee26, 0 1px 0 #ffffff66 inset;
  position: relative; overflow: hidden; isolation: isolate;
}
button.primary::after, a.btn.primary::after, a.btn.cta::after, button.cta::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, #ffffff66 50%, transparent 65%);
  transform: translateX(-130%);
}
button.primary:not(:disabled):hover::after, a.btn.primary:hover::after, a.btn.cta:hover::after, button.cta:hover::after { animation: sheen .75s var(--ease-out); }
button.primary:not(:disabled):hover, a.btn.primary:hover, a.btn.cta:hover, button.cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px #22d3ee3a, 0 1px 0 #ffffff66 inset; filter: none; }
a.btn.cta, button.cta { font-size: 16px; padding: 11px 26px; border-radius: 14px; }
.chip.on { background: var(--grad); color: #03281c; }
.okbtn { background: var(--grad); border-color: transparent; color: #03281c; }
.fab { background: var(--grad); box-shadow: 0 10px 26px #22d3ee40; }
.fab:hover { transform: scale(1.06) rotate(90deg); }

/* ---- surfaces ---- */
.cardbox, .botcard, .stat, .tcard, .plancard, .order, .quick, .invoice, .steps3 li, .emptystate .tcard {
  background: linear-gradient(180deg, #ffffff08, transparent 55%), var(--panel);
  border-color: var(--line); box-shadow: var(--shadow-1);
}
.tcard, .botcard, .plancard, .quick, .stat { transition: transform var(--t-med) var(--ease-out), border-color var(--t-med), box-shadow var(--t-med) var(--ease-out); }
.tcard:hover, .botcard:hover, .plancard:hover, .quick:hover { transform: translateY(-4px); border-color: #34d39970; box-shadow: var(--shadow-2), 0 0 0 1px #34d39925; }
.stat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.menu { box-shadow: var(--shadow-2); border-color: var(--line-2); backdrop-filter: blur(10px); }
.sheet { box-shadow: var(--shadow-2); }
.problems-box, .banner { backdrop-filter: blur(6px); }

/* ---- icon tiles (templates) ---- */
.ico { display: inline-grid; place-items: center; line-height: 0; }
.ticon { color: #fff; background: var(--tile, var(--panel2)); box-shadow: 0 8px 20px #0006, 0 1px 0 #ffffff40 inset; transition: transform var(--t-med) var(--ease-spring); }
.tcard:hover .ticon, .quick:hover .ticon, .botcard:hover .ticon { transform: scale(1.08) rotate(-4deg); }
.ticon[data-t="shop"] { --tile: linear-gradient(135deg, #10b981, #06b6d4); }
.ticon[data-t="booking"] { --tile: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.ticon[data-t="survey"] { --tile: linear-gradient(135deg, #a855f7, #ec4899); }
.ticon[data-t="support"] { --tile: linear-gradient(135deg, #f59e0b, #ef4444); }
.ticon.sm { width: 42px; height: 42px; border-radius: 12px; flex: none; }

/* ---- headings with a little personality ---- */
.hello h1 .name, .gradtext { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stepnum { background: var(--grad); box-shadow: 0 4px 14px #22d3ee33; }
.steps li.on b, .steps li.done b { background: var(--grad); }
.tabbar button.on { border-bottom-color: transparent; position: relative; }
.tabbar button.on::after { content: ''; position: absolute; inset-inline: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); animation: grow-x var(--t-med) var(--ease-out) both; }

/* ---- usage bars grow in; the fill gets a soft gradient ---- */
.meter { background: #ffffff0d; }
.meter span { background: var(--grad); transform-origin: right; animation: grow-x .9s var(--ease-out) .15s both; }
.meter.warn span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.meter.full span { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ---- loading skeletons (the one allowed endless animation: it means "loading") ---- */
.skel { border-radius: 14px; min-height: 96px; border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite; }
.skel.tall { min-height: 210px; }

/* ---- entrance ---- */
.enter { animation: rise var(--t-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.page main > *, .page .auth > * { animation: rise var(--t-slow) var(--ease-out) both; }
.page main > :nth-child(2) { animation-delay: .06s; }
.page main > :nth-child(3) { animation-delay: .12s; }
.page main > :nth-child(4) { animation-delay: .18s; }
.page main > :nth-child(5) { animation-delay: .24s; }
.page main > :nth-child(n+6) { animation-delay: .3s; }
.tabpanel { animation: fade-in var(--t-fast) var(--ease-out) both; }
.msg, .kb { animation: pop var(--t-med) var(--ease-spring) both; transform-origin: bottom; }
.menu:not([hidden]) { animation: pop .18s var(--ease-out) both; transform-origin: top; }
.overlay:not([hidden]) { animation: fade-in var(--t-med) both; }
.overlay:not([hidden]) .sheet { animation: slide-up .38s var(--ease-spring) both; }
#toast:not([hidden]) { animation: toast-in .34s var(--ease-spring) both; }
.banner, .problems-box, .warn { animation: rise var(--t-med) var(--ease-out) both; }

@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sheen { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 20px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- sign-in: a hero that shows what the product does ---- */
.authpage { overflow-y: auto; }
.authshell { min-height: 100%; display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; max-width: 1180px; margin: 0 auto; padding: 32px 24px; align-items: center; }
.authhero { padding: 24px 32px; display: flex; flex-direction: column; gap: 18px; }
.authhero .logo { font-size: 20px; font-weight: 800; }
.authhero h1 { margin: 6px 0 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.25; letter-spacing: -.5px; }
.authhero .lead { margin: 0; color: var(--muted); font-size: 16px; max-width: 34em; }
.benefits { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.benefits li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.benefits .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: #34d3991f; color: var(--accent); }
.phone { margin-top: 10px; align-self: flex-start; width: min(330px, 100%); background: #0d1220; border: 1px solid var(--line-2); border-radius: 28px; padding: 14px 12px 16px; box-shadow: var(--shadow-2), 0 0 0 6px #ffffff06; }
.phone .top { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.phone .top .ico { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #03281c; }
.phone .chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 4px 2px; min-height: 230px; }
.phone .b { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.6; opacity: 0; animation: pop .45s var(--ease-spring) both; }
.phone .bot { background: var(--panel2); align-self: flex-start; border-end-start-radius: 4px; }
.phone .me { background: #1f4f3d; align-self: flex-end; border-end-end-radius: 4px; }
.phone .chips { display: flex; gap: 6px; flex-wrap: wrap; align-self: stretch; opacity: 0; animation: pop .45s var(--ease-spring) both; }
.phone .chips span { flex: 1; text-align: center; border: 1px solid #34d39966; color: var(--accent); border-radius: 10px; padding: 5px 8px; font-size: 12.5px; background: #34d3990f; }
.phone .ok { background: #12301f; color: #8fe0b0; }
.phone .d1 { animation-delay: .5s; } .phone .d2 { animation-delay: 1.2s; } .phone .d3 { animation-delay: 2s; } .phone .d4 { animation-delay: 2.8s; } .phone .d5 { animation-delay: 3.6s; }
.authcard { background: linear-gradient(180deg, #ffffff0a, transparent 50%), var(--panel); border: 1px solid var(--line-2); border-radius: 22px; padding: 28px 26px 26px; box-shadow: var(--shadow-2); max-width: 420px; width: 100%; justify-self: center; }
.authcard h2 { margin: 0 0 4px; font-size: 22px; }
.authcard .sub { margin: 0 0 14px; color: var(--muted); }
.authcard label { display: block; margin: 14px 0 4px; color: var(--muted); font-size: 12.5px; }
.authcard input { width: 100%; padding: 10px 12px; border-radius: 10px; }
.authcard .tabs { margin-top: 0; }
.authcard .tabs button { transition: background-color var(--t-med), border-color var(--t-med), color var(--t-med); }
.authcard .tabs button[aria-selected="true"] { background: #34d3991a; border-color: var(--accent); color: var(--text); }
.authcard .wide { padding: 11px; font-size: 15px; }
.authcard .finep { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
  .authshell { grid-template-columns: 1fr; padding: 16px; gap: 8px; }
  .authhero { padding: 8px 4px; }
  .authhero h1 { font-size: 26px; }
  .authhero .phone, .authhero .benefits { display: none; }
  .authcard { padding: 22px 18px; }
}

/* ---- dashboard welcome ---- */
.hello h1 { letter-spacing: -.4px; }
.firstrun .tcard .ticon { margin-bottom: 4px; }

/* ---- wizard header ---- */
.wizhead { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.wizhead h1 { margin: 0; }

/* ---- reduced motion: keep the layout, drop the movement ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .skel { animation: none; }
  .phone .b, .phone .chips { opacity: 1; }
}

body.page main.authshell { display: grid; }

/* ---- admin temp password, legal pages ---- */
.tempbox { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #12301f; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tempbox code { font-size: 17px; letter-spacing: 1px; color: #8fe0b0; user-select: all; }
.legal { max-width: 760px; margin: 0 auto; padding: 28px 18px 64px; line-height: 2; }
.legal h1 { margin: 0 0 6px; font-size: 26px; }
.legal h2 { margin: 28px 0 4px; font-size: 18px; }
.legal p, .legal li { color: #cfd6e6; }
.legal ul { padding-inline-start: 22px; }
.legal .updated { color: var(--muted); font-size: 13px; }
.legal a { color: var(--accent); }
.draftnote { background: #3a2f12; color: #f3d98b; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.8; }
.legalnav { max-width: 760px; margin: 0 auto; padding: 16px 18px 0; display: flex; gap: 14px; align-items: center; }
.legalnav a { color: var(--muted); text-decoration: none; }
.legalnav a:hover { color: var(--text); }

.authcard .finep a { color: var(--accent); }
