/* Shared — stylesheet for the website, the app and the admin.
   Paper, ink, marigold for the one thing that matters on each screen, pine for data and success. */

@font-face { font-family: "Familjen Grotesk"; src: url(fonts/familjen-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Familjen Grotesk"; src: url(fonts/familjen-grotesk-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-latin-wght-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }

:root {
  --paper: #FBFAF7; --card: #FFFFFF; --sunk: #F3F1EC; --sunk-2: #ECE9E2;
  --ink: #1D1C1A; --ink-2: #47443E; --muted: #77736B; --faint: #A39E94;
  --rule: #E8E4DD; --rule-2: #D8D3C9;
  --marigold: #FFBE2E; --marigold-ink: #2E2200; --marigold-soft: #FFF2CF;
  --pine: #1E6B57; --pine-2: #2E8B6F; --pine-soft: #E2EFE9; --pine-faint: #A9D1C2;
  --rose: #C2412D; --rose-soft: #FBE6E1; --amber: #9A6400; --amber-soft: #FFF1D6;
  --focus: #1E6B57;
  --shadow: 0 1px 0 rgba(29, 28, 26, .04), 0 12px 32px -14px rgba(29, 28, 26, .18);
  --shadow-lift: 0 1px 0 rgba(29, 28, 26, .05), 0 24px 60px -24px rgba(29, 28, 26, .32);
  --display: "Familjen Grotesk", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #151412; --card: #1D1C19; --sunk: #23211D; --sunk-2: #2A2823;
  --ink: #F2EFE9; --ink-2: #D2CDC3; --muted: #9C978D; --faint: #6F6B63;
  --rule: #2D2B26; --rule-2: #3A3731;
  --marigold-soft: #3A2F12; --pine: #63C3A0; --pine-2: #63C3A0; --pine-soft: #1B2D26; --pine-faint: #2F5547;
  --rose: #F07A64; --rose-soft: #3A1E19; --amber: #F2B54B; --amber-soft: #33270F; --focus: #63C3A0;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .7); --shadow-lift: 0 30px 70px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --paper: #151412; --card: #1D1C19; --sunk: #23211D; --sunk-2: #2A2823;
  --ink: #F2EFE9; --ink-2: #D2CDC3; --muted: #9C978D; --faint: #6F6B63;
  --rule: #2D2B26; --rule-2: #3A3731;
  --marigold-soft: #3A2F12; --pine: #63C3A0; --pine-2: #63C3A0; --pine-soft: #1B2D26; --pine-faint: #2F5547;
  --rose: #F07A64; --rose-soft: #3A1E19; --amber: #F2B54B; --amber-soft: #33270F; --focus: #63C3A0;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .7); --shadow-lift: 0 30px 70px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; letter-spacing: -.018em; line-height: 1.12; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; letter-spacing: -.01em; } h4 { font-size: 15px; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
small, .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.mono, code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--sunk); border-radius: 6px; padding: .12em .4em; }
pre { background: #1D1C1A; color: #EDE9E1; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; margin: 0 0 1.2em; }
pre code { background: none; padding: 0; font-size: inherit; }
kbd { font-size: 12px; border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--card); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
::selection { background: var(--marigold); color: var(--marigold-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3.5px; }
.ic.sm { width: 15px; height: 15px; vertical-align: -2.5px; } .ic.lg { width: 22px; height: 22px; }
.brand { flex: none; vertical-align: -3px; }
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; vertical-align: -2px; }
.flag-none { display: inline-flex; color: var(--faint); box-shadow: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--rule-2);
  background: var(--card); color: var(--ink); font: 600 14.5px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.button:hover { background: var(--sunk); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.button.yellow { background: var(--marigold); border-color: var(--marigold); color: var(--marigold-ink); }
.button.yellow:hover { background: color-mix(in srgb, var(--marigold) 88%, #000); }
.button.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.button.quiet:hover { background: var(--sunk); color: var(--ink); }
.button.danger { color: var(--rose); }
.button.danger:hover { background: var(--rose-soft); border-color: color-mix(in srgb, var(--rose) 40%, transparent); }
.button.danger.solid { background: var(--rose); border-color: var(--rose); color: #fff; }
.button.small { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; gap: 6px; }
.button.large { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.button.icon { width: 40px; padding: 0; } .button.small.icon { width: 32px; }
.button.wide { width: 100%; }
.button[disabled], .button.busy { opacity: .55; pointer-events: none; }
.button.busy::after { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.textlink { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .18em; cursor: pointer; }
.textlink:hover { text-decoration-color: currentColor; }
.textlink.danger { color: var(--rose); }
form.inline { display: inline; }

label, .label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.field { margin-bottom: 18px; } .field:last-child { margin-bottom: 0; }
.help { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.optional { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--card); color: var(--ink);
  font: 400 15px/1.4 var(--text); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2377736B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[disabled], select[disabled], textarea[disabled] { background: var(--sunk); color: var(--faint); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); cursor: pointer; flex: none; }
input[type=color] { width: 46px; height: 42px; padding: 3px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--card); cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; cursor: pointer; margin: 0 0 12px; }
.check input { margin-top: 3px; }
.check .help { margin-top: 2px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 400; margin: 0; }
.toggle input { appearance: none; width: 40px; height: 24px; border-radius: 24px; background: var(--rule-2); position: relative; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--pine); } .toggle input:checked::after { transform: translateX(16px); }
.toggle b { display: block; font-weight: 600; font-size: 15px; } .toggle span .help { margin-top: 2px; }
.combo { display: flex; align-items: stretch; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--card); overflow: hidden; }
.combo:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent); }
.combo input, .combo select { border: 0 !important; box-shadow: none !important; border-radius: 0; min-width: 0; }
.combo .lead { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); font-family: var(--mono); font-size: 14px; white-space: nowrap; background: var(--sunk); border-right: 1px solid var(--rule); padding-right: 10px; }
.combo select.lead-select { width: auto; max-width: 52%; background-color: var(--sunk); border-right: 1px solid var(--rule) !important; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--sunk); gap: 2px; }
.segmented a, .segmented button, .segmented label { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 0; background: none; font: 600 13.5px/1.2 var(--text); color: var(--muted); text-decoration: none; cursor: pointer; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .on, .segmented label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 0 0 18px; font-size: 15px; background: var(--sunk); border: 1px solid var(--rule); }
.notice .ic { margin-top: 2px; }
.notice.success { background: var(--pine-soft); border-color: transparent; } .notice.success .ic { color: var(--pine); }
.notice.error { background: var(--rose-soft); border-color: transparent; } .notice.error .ic { color: var(--rose); }
.notice.upgrade, .notice.warn { background: var(--marigold-soft); border-color: transparent; }
.notice .close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 2px; }
.notice a { font-weight: 600; }
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 9px; background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lift); animation: toast .22s ease-out; }
.toast.error { background: var(--rose); color: #fff; }
.toast .ic { color: var(--marigold); } .toast.error .ic { color: #fff; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

dialog.sheet { border: 0; padding: 0; border-radius: 18px; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lift); }
dialog.sheet::backdrop { background: rgba(21, 20, 18, .42); }
dialog.sheet[open] { animation: sheet .18s ease-out; }
@keyframes sheet { from { opacity: 0; transform: translateY(10px); } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 4px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet-body { padding: 14px 22px 20px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 18px; border-top: 1px solid var(--rule); }

/* ---------- Brand mark ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 21px/1 var(--display); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.logo .knot { width: 26px; height: 26px; position: relative; flex: none; }
.logo .knot i { position: absolute; width: 17px; height: 17px; border-radius: 6px; }
.logo .knot i:first-child { left: 0; top: 0; background: var(--marigold); }
.logo .knot i:last-child { right: 0; bottom: 0; background: var(--ink); mix-blend-mode: multiply; }
:root[data-theme="dark"] .logo .knot i:last-child { mix-blend-mode: normal; opacity: .9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .knot i:last-child { mix-blend-mode: normal; opacity: .9; } }

/* ---------- The ticket (a short link) ---------- */
.ticket { --notch: 9px; position: relative; display: flex; align-items: stretch; background: var(--marigold); color: var(--marigold-ink); border-radius: 12px;
  -webkit-mask: radial-gradient(circle var(--notch) at var(--cut, 78%) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at var(--cut, 78%) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at var(--cut, 78%) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at var(--cut, 78%) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.ticket .main { flex: 0 0 var(--cut, 78%); padding: 14px 18px; min-width: 0; border-right: 2px dashed rgba(46, 34, 0, .28); }
.ticket .stub { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-width: 0; }
.ticket .short { font: 500 18px/1.25 var(--mono); letter-spacing: -.01em; word-break: break-all; }
.ticket .dest { font-size: 13px; opacity: .72; margin-top: 3px; }
.ticket .stub b { font: 650 20px/1 var(--display); letter-spacing: -.02em; }
.ticket .stub small { font-size: 11.5px; opacity: .72; margin-top: 3px; }
.ticket.pale { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-2); }
.ticket.pale .main { border-right-color: var(--rule-2); }
.ticket .stub .button { background: rgba(255,255,255,.55); border-color: transparent; color: var(--marigold-ink); }
.ticket .stub .button:hover { background: rgba(255,255,255,.8); }

/* ================= Public site ================= */
.page { width: min(1160px, 100% - 40px); margin: 0 auto; }
.page.narrow { width: min(760px, 100% - 40px); }
.banner { background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; padding: 9px 16px; }
.banner a { color: var(--marigold); }
.topnav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topnav.stuck { border-bottom-color: var(--rule); }
.topnav .page { display: flex; align-items: center; gap: 30px; height: 68px; }
.topnav nav { display: flex; gap: 2px; align-items: center; }
.topnav nav > a, .topnav nav > .menu > button { font: 500 15px/1 var(--text); color: var(--ink-2); padding: 9px 12px; border-radius: 9px; text-decoration: none; border: 0; background: none; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.topnav nav > a:hover, .topnav nav > .menu > button:hover { color: var(--ink); background: var(--sunk); }
.topnav nav > a.on { color: var(--ink); }
.topnav .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu { position: relative; }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 0; width: 320px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 8px; display: none; z-index: 50; }
.menu.open .menu-panel { display: block; }
.menu-panel a { display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; padding: 10px; border-radius: 10px; text-decoration: none; }
.menu-panel a:hover { background: var(--sunk); }
.menu-panel a .ic { grid-row: span 2; margin-top: 2px; color: var(--pine); }
.menu-panel a b { font-weight: 600; font-size: 14.5px; }
.menu-panel a span { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.menu-panel.right { left: auto; right: 0; }
.burger { display: none; }
@media (max-width: 920px) {
  .topnav nav, .topnav .end .hide-small { display: none; }
  .burger { display: inline-flex; }
  .topnav.open nav { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 68px; left: 0; right: 0; background: var(--card); padding: 10px 20px 18px; border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); }
  .topnav.open .menu-panel { position: static; display: block; width: auto; box-shadow: none; border: 0; padding: 0 0 0 6px; }
}

/* Hero */
.hero { padding: 64px 0 56px; }
.hero .page { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 74px); line-height: .98; letter-spacing: -.04em; margin: 0 0 22px; font-weight: 680; }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 520px; margin-bottom: 30px; }
.hero .proof { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; margin-top: 18px; }
.hero .proof span { display: inline-flex; gap: 7px; align-items: center; } .hero .proof .ic { color: var(--pine); }
.shorten { display: flex; gap: 8px; padding: 6px; background: var(--card); border: 1px solid var(--rule-2); border-radius: 16px; box-shadow: var(--shadow); max-width: 560px; }
.shorten:focus-within { border-color: var(--ink); }
.shorten input { border: 0 !important; box-shadow: none !important; height: 50px; font-size: 16.5px; background: transparent; }
.shorten .button { height: 50px; border-radius: 12px; padding: 0 22px; font-size: 15.5px; }
.shorten-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.feed { position: relative; display: grid; gap: 12px; }
.feed .ticket { box-shadow: 0 14px 30px -18px rgba(46, 34, 0, .5); }
.feed .ticket:nth-child(2) { margin-left: 22px; opacity: .92; }
.feed .ticket:nth-child(3) { margin-left: 44px; opacity: .8; }
.feed .ticket:nth-child(n+4) { display: none; }
.feed .ticket.fresh { animation: print .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes print { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
.feed-caption { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.feed-caption::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pine-2); box-shadow: 0 0 0 4px var(--pine-soft); }
@media (max-width: 920px) { .hero .page { grid-template-columns: 1fr; gap: 40px; } .feed .ticket:nth-child(n) { margin-left: 0; } .hero { padding-top: 36px; } }
@media (max-width: 560px) { .shorten { flex-direction: column; } .shorten .button { width: 100%; } .ticket .short { font-size: 15.5px; } }

.platforms { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px 0; }
.platforms .page { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.platforms p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 250px; }
.platforms .logos { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; color: var(--ink-2); }
.platforms .logos .brand { opacity: .85; }

.chapter { padding: 100px 0 0; }
.chapter > .page > header { max-width: 640px; margin-bottom: 44px; }
.chapter h2.big { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.02; letter-spacing: -.035em; }
.chapter header p { font-size: 18px; color: var(--ink-2); }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; padding: 44px 0; border-top: 1px solid var(--rule); }
.split.flip { grid-template-columns: 1.15fr 1fr; }
.split.flip > :first-child { order: 2; }
.split h3 { font-size: 26px; letter-spacing: -.025em; margin-bottom: 12px; }
.split p { color: var(--ink-2); font-size: 16.5px; max-width: 470px; }
.split ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; color: var(--ink-2); }
.split li { display: flex; gap: 10px; } .split li .ic { color: var(--pine); margin-top: 3px; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; gap: 28px; } .split.flip > :first-child { order: 0; } }
.stage { background: var(--sunk); border-radius: 22px; padding: 30px; min-height: 340px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.stage > * { width: 100%; max-width: 470px; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 12px; }
.panel .head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 600; }
.panel .body { padding: 14px 16px; }
.dns-row { display: grid; grid-template-columns: 64px 1fr 1.4fr; gap: 10px; font: 13.5px/1.4 var(--mono); padding: 9px 0; border-top: 1px solid var(--rule); align-items: center; }
.dns-row:first-child { border-top: 0; }
.dns-row span { color: var(--muted); font-family: var(--text); font-size: 12.5px; }
.rule-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--rule); font-size: 14.5px; }
.rule-row:first-of-type { border-top: 0; }
.rule-row .who { width: 26px; display: flex; justify-content: center; }
.rule-row .to { margin-left: auto; font: 13px var(--mono); color: var(--muted); }
.bubble-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { background: #2F7CF6; color: #fff; padding: 9px 14px; border-radius: 18px 18px 4px 18px; font-size: 15px; max-width: 80%; }
.link-card { width: 82%; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.link-card .art { aspect-ratio: 1.91 / 1; display: grid; place-items: center; background: #20453A; color: #FFE7A6; font: 700 30px/1 var(--display); letter-spacing: -.03em; position: relative; overflow: hidden; }
.link-card .art::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--marigold); right: -50px; bottom: -70px; }
.link-card .art span { position: relative; z-index: 1; }
.link-card .meta { padding: 10px 14px; font-size: 13.5px; } .link-card .meta b { display: block; font-size: 14.5px; } .link-card .meta small { color: var(--muted); }
.qr-print { background: #fff; padding: 16px; border-radius: 16px; width: 210px !important; box-shadow: var(--shadow-lift); transform: rotate(-3deg); }
.qr-print svg { display: block; width: 100%; height: auto; }
.qr-print figcaption { font: 600 12px var(--mono); color: #1D1C1A; text-align: center; margin-top: 8px; }
.sample-chart svg { display: block; width: 100%; height: auto; }

.apps-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .apps-row { grid-template-columns: 1fr; } }
.mac-bar { background: linear-gradient(180deg, #DCD6CA, #CFC8BA); border-radius: 18px; overflow: hidden; min-height: 330px; position: relative; padding-bottom: 20px; }
:root[data-theme="dark"] .mac-bar { background: linear-gradient(180deg, #2B2925, #23211E); }
.mac-bar .bar { height: 30px; background: rgba(255,255,255,.55); backdrop-filter: blur(6px); display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 0 14px; font-size: 12.5px; color: #2b2925; }
:root[data-theme="dark"] .mac-bar .bar { background: rgba(0,0,0,.35); color: #ddd; }
.mac-bar .bar .on { background: rgba(0,0,0,.12); border-radius: 5px; padding: 2px 6px; display: inline-flex; }
.mac-pop { margin: 10px 14px 0 auto; width: 300px; background: color-mix(in srgb, var(--card) 94%, transparent); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 12px; font-size: 13.5px; }
.mac-pop .in { background: var(--sunk); border-radius: 9px; padding: 9px 10px; font: 12.5px var(--mono); color: var(--muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mac-pop .ticket { --cut: 70%; } .mac-pop .ticket .short { font-size: 14px; } .mac-pop .ticket .main { padding: 10px 12px; } .mac-pop .ticket .stub { padding: 8px; }
.mac-pop .item { display: flex; justify-content: space-between; padding: 8px 2px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; }
.mac-pop .item span:last-child { color: var(--muted); font-family: var(--text); }
.phone { background: var(--sunk); border-radius: 18px; padding: 24px; display: flex; justify-content: center; }
.phone-sheet { width: 270px; background: var(--card); border-radius: 26px; padding: 18px; box-shadow: var(--shadow-lift); }
.share-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 16px; text-align: center; font-size: 11px; color: var(--muted); }
.share-apps i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 5px; background: var(--sunk); }
.share-apps i.ours { background: #1D1C1A; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.app-mark { position: relative; width: 26px; height: 26px; display: block; }
.app-mark b { position: absolute; width: 15px; height: 15px; border-radius: 5px; }
.app-mark b:first-child { left: 2px; top: 2px; background: var(--marigold); }
.app-mark b:last-child { right: 2px; bottom: 2px; background: rgba(251, 247, 240, .9); }
.phone-sheet .ticket, .mac-pop .ticket { --cut: 68%; } .phone-sheet .ticket .short { font-size: 13.5px; word-break: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .phone-sheet .ticket .main { padding: 11px 12px; } .phone-sheet .ticket .stub { padding: 6px; }

.connect { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; }
.connect > div { background: var(--card); padding: 22px; }
.connect .logos { display: flex; gap: 10px; margin-bottom: 14px; }
.connect .logos .brand { width: 26px; height: 26px; }
.connect h4 { margin-bottom: 6px; } .connect p { color: var(--muted); font-size: 14.5px; margin: 0; }
@media (max-width: 900px) { .connect { grid-template-columns: 1fr 1fr; } } @media (max-width: 560px) { .connect { grid-template-columns: 1fr; } }

.inventory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; }
.inventory div { padding: 18px 0; border-top: 1px solid var(--rule); }
.inventory b { display: block; font-size: 15.5px; margin-bottom: 3px; } .inventory span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .inventory { grid-template-columns: 1fr 1fr; } } @media (max-width: 560px) { .inventory { grid-template-columns: 1fr; } }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tools a { display: block; padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule); text-decoration: none; }
.tools a:hover { border-color: var(--ink); }
.tools a .ic { color: var(--pine); margin-bottom: 12px; width: 24px; height: 24px; }
.tools a b { display: block; font-size: 16px; } .tools a span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .tools { grid-template-columns: 1fr; } }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 17px/1.35 var(--text); display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; flex: none; margin-top: 3px; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { color: var(--ink-2); margin: -4px 0 18px; max-width: 640px; }

.closing { margin-top: 100px; background: var(--ink); color: var(--paper); border-radius: 28px; padding: 64px 56px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.closing h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.02; letter-spacing: -.035em; color: var(--paper); margin: 0; }
.closing p { color: color-mix(in srgb, var(--paper) 72%, transparent); margin: 12px 0 0; font-size: 17px; }
.closing .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.closing .button { border-color: color-mix(in srgb, var(--paper) 30%, transparent); background: transparent; color: var(--paper); }
.closing .button.yellow { background: var(--marigold); border-color: var(--marigold); color: var(--marigold-ink); }
@media (max-width: 800px) { .closing { grid-template-columns: 1fr; padding: 40px 26px; } .closing .acts { justify-content: flex-start; } }

.footer { margin-top: 90px; border-top: 1px solid var(--rule); padding: 50px 0 34px; font-size: 14.5px; }
.footer .cols { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 30px; }
.footer h4 { font-family: var(--text); font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.footer a { display: block; text-decoration: none; color: var(--ink-2); padding: 3px 0; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer a.logo { display: inline-flex; padding: 0; color: var(--ink); text-decoration: none; }
.footer .base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 820px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

.intro { padding: 64px 0 34px; }
.intro h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1; letter-spacing: -.04em; max-width: 820px; }
.intro p { font-size: 19px; color: var(--ink-2); max-width: 620px; }

/* Pricing */
.cycle { margin: 0 0 28px; }
.cycle .save { background: var(--marigold); color: var(--marigold-ink); border-radius: 6px; padding: 2px 6px; font-size: 11.5px; font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--ink); }
.plan .top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.plan h3 { font-size: 21px; margin: 0; }
.plan .tag { background: var(--marigold); color: var(--marigold-ink); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; }
.plan .summary { color: var(--muted); font-size: 15px; min-height: 46px; }
.plan .price { font: 680 46px/1 var(--display); letter-spacing: -.04em; margin: 18px 0 6px; }
.plan .price small { font: 500 15px var(--text); letter-spacing: 0; color: var(--muted); }
.plan .billed { color: var(--muted); font-size: 14px; min-height: 21px; }
.plan .cta { margin: 22px 0; }
.plan ul { list-style: none; padding: 18px 0 0; margin: 0; border-top: 1px solid var(--rule); display: grid; gap: 9px; font-size: 15px; }
.plan li { display: flex; gap: 10px; color: var(--ink-2); }
.plan li .ic { color: var(--pine); margin-top: 3px; }
.plan li.no { color: var(--faint); } .plan li.no .ic { color: var(--faint); }
.matrix { width: 100%; border-collapse: collapse; margin-top: 56px; font-size: 15px; }
.matrix th, .matrix td { padding: 13px 12px; border-bottom: 1px solid var(--rule); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix thead th { font: 650 16px var(--display); }
.matrix .yes { color: var(--pine); } .matrix .no { color: var(--faint); }

.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { color: var(--ink); margin-top: 1.8em; font-size: 24px; } .prose h3 { color: var(--ink); margin-top: 1.4em; }
.prose ul { padding-left: 22px; } .prose li { margin: 5px 0; }
.docs { display: grid; grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
.docs nav { position: sticky; top: 92px; display: grid; gap: 2px; font-size: 14.5px; }
.docs nav a { text-decoration: none; color: var(--muted); padding: 4px 0; } .docs nav a:hover { color: var(--ink); }
.docs .prose { font-size: 16px; }
.endpoint { display: flex; gap: 10px; align-items: center; font: 500 14.5px var(--mono); margin: 22px 0 10px; color: var(--ink); }
.verb { font: 600 11.5px/1 var(--mono); padding: 5px 7px; border-radius: 6px; background: var(--sunk-2); color: var(--ink-2); }
.verb.post { background: var(--pine-soft); color: var(--pine); } .verb.patch { background: var(--marigold-soft); color: var(--amber); } .verb.delete { background: var(--rose-soft); color: var(--rose); }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs nav { position: static; display: flex; flex-wrap: wrap; gap: 6px 14px; } }

.tool { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 880px) { .tool { grid-template-columns: 1fr; } }
.box { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 24px; }
.box.sunk { background: var(--sunk); border-color: transparent; }
.output { font: 14px/1.55 var(--mono); background: var(--sunk); border-radius: 12px; padding: 14px; word-break: break-all; min-height: 52px; }
.qr-preview { background: #fff; border-radius: 14px; padding: 14px; max-width: 280px; margin: 0 auto; min-height: 200px; display: grid; place-items: center; }
.qr-preview svg { width: 100%; height: auto; display: block; }

/* ================= Plain / auth pages ================= */
.plain { min-height: 100vh; display: flex; flex-direction: column; }
.plain header { padding: 22px 28px; }
.plain main { flex: 1; display: grid; place-items: center; padding: 24px 20px 60px; }
.notice-page { max-width: 480px; text-align: center; }
.notice-page .mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--sunk); color: var(--ink-2); }
.notice-page .mark .ic { width: 26px; height: 26px; }
.notice-page h1 { font-size: 32px; letter-spacing: -.03em; }
.notice-page p { color: var(--ink-2); font-size: 17px; }
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth .side-form { display: flex; flex-direction: column; padding: 28px 40px; }
.auth .form-wrap { width: min(390px, 100%); margin: auto; padding: 40px 0; }
.auth h1 { font-size: 34px; letter-spacing: -.035em; margin-top: 8px; }
.auth .lead { color: var(--ink-2); margin-bottom: 26px; }
.auth .side-art { background: var(--sunk); display: flex; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.auth .side-art .feed { width: min(420px, 100%); }
.auth .side-art blockquote { margin: 0 0 26px; font: 650 28px/1.12 var(--display); letter-spacing: -.03em; max-width: 420px; }
.auth .foot { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .side-art { display: none; } .auth .side-form { padding: 22px; } }
.code-field { text-align: center; letter-spacing: .4em; font: 600 24px var(--mono) !important; height: 58px !important; }

/* ================= App ================= */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, transparent 235px, var(--rule) 235px 236px, transparent 236px); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--paper); }
.sidebar .logo { padding: 2px 8px 22px; }
.sidebar a.nav { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.sidebar a.nav:hover { background: var(--sunk); color: var(--ink); }
.sidebar a.nav.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); font-weight: 600; }
.sidebar a.nav .ic { color: var(--muted); } .sidebar a.nav.on .ic { color: var(--ink); }
.sidebar a.nav .count { margin-left: auto; background: var(--rose); color: #fff; border-radius: 99px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; }
.sidebar .group { font-size: 12.5px; color: var(--faint); padding: 20px 10px 6px; font-weight: 600; }
.sidebar .bottom { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.meter { padding: 12px; border-radius: 12px; background: var(--sunk); font-size: 13.5px; }
.meter .bar { height: 5px; background: var(--rule-2); border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.meter .bar i { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.meter .bar i.full { background: var(--rose); }
.me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); text-align: left; font: inherit; }
.me:hover { background: var(--sunk); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--marigold); color: var(--marigold-ink); font: 700 14px var(--display); flex: none; }
.me b { display: block; font-size: 14px; font-weight: 600; } .me small { color: var(--muted); font-size: 12.5px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.toolbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 32px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); }
.toolbar .find { position: relative; width: min(360px, 42vw); }
.toolbar .find .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.toolbar .find input { padding-left: 38px; height: 40px; background: var(--card); }
.toolbar .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sidebar-toggle { display: none; }
.viewing-as { background: var(--marigold); color: var(--marigold-ink); padding: 9px 32px; font-size: 14px; font-weight: 600; display: flex; gap: 14px; align-items: center; }
.viewing-as button { background: rgba(0,0,0,.12); border: 0; border-radius: 7px; padding: 5px 10px; font: inherit; color: inherit; cursor: pointer; }
.content { padding: 30px 32px 80px; width: 100%; max-width: 1180px; }
.heading { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.heading h1 { font-size: 30px; letter-spacing: -.03em; margin: 0; }
.heading p { color: var(--muted); margin: 4px 0 0; }
.heading .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-102%); transition: transform .2s; background: var(--paper); box-shadow: var(--shadow-lift); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 50; }
  .sidebar-toggle { display: inline-flex; }
  .toolbar { padding: 0 16px; } .content { padding: 22px 16px 70px; } .viewing-as { padding: 9px 16px; }
  .toolbar .find { width: auto; flex: 1; }
}

.surface { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; }
.surface.pad { padding: 22px; }
.surface-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.surface-head h2, .surface-head h3 { margin: 0; font-size: 16.5px; }
.surface-head .end { margin-left: auto; }
.surface-body { padding: 18px 20px; }
.surface + .surface, .stack > * + * { margin-top: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.even { grid-template-columns: 1fr 1fr; }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) { .cols, .cols.three { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cols.even { grid-template-columns: 1fr; } }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 16px; background: var(--card); margin-bottom: 16px; }
.figures > div { padding: 16px 20px; border-left: 1px solid var(--rule); }
.figures > div:first-child { border-left: 0; }
.figures span { color: var(--muted); font-size: 14px; display: block; }
.figures b .change { display: inline-block; font-size: 12.5px; }
.figures b { font: 650 30px/1.15 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.change { display: inline-block; width: auto; font: 600 12.5px var(--text); padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 5px; letter-spacing: 0; }
.change.up { background: var(--pine-soft); color: var(--pine); } .change.down { background: var(--rose-soft); color: var(--rose); }
@media (max-width: 820px) { .figures { grid-template-columns: 1fr 1fr; } .figures > div:nth-child(3) { border-left: 0; } .figures > div:nth-child(n+3) { border-top: 1px solid var(--rule); } }

.chart { position: relative; height: 230px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: var(--paper); padding: 7px 10px; border-radius: 9px; font-size: 13px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .08s; }
.chart.short { height: 150px; }
.legend { display: flex; gap: 16px; font-size: 13.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.ranks { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.ranks li { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14.5px; }
.ranks li::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--pine-soft); border-radius: 8px; z-index: 0; }
.ranks li > * { position: relative; z-index: 1; }
.ranks .what { display: flex; gap: 9px; align-items: center; min-width: 0; flex: 1; }
.ranks .what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks .n { color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.ranks .pct { color: var(--muted); font-size: 13px; width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

.ranks .ic { color: var(--muted); }
.empty-note { color: var(--muted); font-size: 14.5px; padding: 18px 2px; }

.period { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.period .end { margin-left: auto; color: var(--muted); font-size: 14px; }

/* Link list */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .find { position: relative; flex: 1; min-width: 220px; }
.filters .find .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.filters .find input { padding-left: 38px; }
.filters select { width: auto; }
.linklist { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; }
.linkrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 100px auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--rule); }
.linkrow:first-child { border-top: 0; }
.linkrow:hover { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.linkrow .short { font: 500 15.5px/1.3 var(--mono); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.linkrow .short:hover { text-decoration: underline; }
.fav { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; color: var(--muted); }
.fav svg { width: 14px; height: 14px; }
.fav img { position: absolute; inset: 0; width: 16px; height: 16px; border-radius: 4px; background: var(--card); }
.linkrow .dest { color: var(--muted); font-size: 14px; margin-top: 3px; }
.linkrow .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--faint); margin-top: 6px; }
.linkrow .meta a.tag { color: var(--ink-2); text-decoration: none; background: var(--sunk); padding: 1px 8px; border-radius: 6px; }
.linkrow .meta a.tag:hover { background: var(--sunk-2); }
.linkrow .flags { display: inline-flex; gap: 6px; color: var(--muted); }
.linkrow .count { text-align: right; }
.linkrow .count b { display: block; font: 650 19px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.linkrow .count small { color: var(--muted); font-size: 12.5px; }
.linkrow .spark { display: block; width: 100px; height: 28px; margin-bottom: 4px; }
.linkrow .acts { display: flex; gap: 4px; }
.status { display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--text); padding: 2px 8px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); }
.status.live { background: var(--pine-soft); color: var(--pine); }
.status.off { background: var(--rose-soft); color: var(--rose); }
.status.wait { background: var(--amber-soft); color: var(--amber); }
.status.plan { background: var(--marigold-soft); color: var(--amber); }
@media (max-width: 760px) { .linkrow { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; padding: 12px; } .linkrow .spark, .linkrow .acts .hide-small { display: none; } .linkrow .count { grid-column: 3; } .linkrow .acts { grid-column: 2 / -1; } }
.bulkbar { position: sticky; bottom: 18px; z-index: 10; width: fit-content; margin: 16px auto 0; display: flex; gap: 8px; align-items: center; background: var(--ink); color: var(--paper); padding: 8px 8px 8px 16px; border-radius: 14px; box-shadow: var(--shadow-lift); font-size: 14.5px; flex-wrap: wrap; }
.bulkbar .button { background: rgba(255,255,255,.12); color: inherit; border-color: transparent; }
.bulkbar input { height: 32px; width: 110px; background: rgba(255,255,255,.12); color: inherit; border: 0; }
.pages { display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 18px; color: var(--muted); font-size: 14.5px; }

/* Link form */
.composer .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.composer .row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .composer .row-2, .composer .row-3 { grid-template-columns: 1fr; } }
.extras { margin-top: 6px; border-top: 1px solid var(--rule); }
.extra { border-bottom: 1px solid var(--rule); }
.extra > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 2px; font-weight: 600; font-size: 15px; }
.extra > summary::-webkit-details-marker { display: none; }
.extra > summary .ic { color: var(--muted); }
.extra > summary .hint { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: auto; text-align: right; }
.extra > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform .15s; flex: none; }
.extra[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.extra .inner { padding: 4px 2px 22px; }
.locked { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--marigold-soft); margin-bottom: 16px; font-size: 14.5px; }
.locked .ic { color: var(--amber); }
.locked a { margin-left: auto; font-weight: 600; white-space: nowrap; }
.rule-line { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 8px; margin-bottom: 8px; }
.preview-card { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--card); }
.preview-card .art { aspect-ratio: 1.91 / 1; background: var(--sunk) center / cover no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 13.5px; }
.preview-card .meta { padding: 10px 14px; font-size: 14px; } .preview-card .meta small { color: var(--muted); } .preview-card .meta b { display: block; margin: 2px 0; }
.made { margin-top: 18px; }

/* Link detail */
.detail-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 18px; }
.detail-top .ticket { --cut: 74%; } .detail-top .ticket .short { font-size: 22px; }
@media (max-width: 560px) { .detail-top .ticket { --cut: 70%; } .detail-top .ticket .short { font-size: clamp(14px, 4.4vw, 18px); word-break: normal; overflow-wrap: anywhere; } }
.detail-top .side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; width: 170px; }
.qr-tile { background: #fff; border-radius: 14px; padding: 10px; border: 1px solid var(--rule); }
.qr-tile img { display: block; width: 100%; height: auto; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; color: var(--ink-2); font-size: 14.5px; }
.facts span { display: inline-flex; gap: 6px; align-items: center; } .facts .ic { color: var(--muted); }
.dest-line { display: flex; gap: 8px; align-items: baseline; margin-top: 12px; color: var(--ink-2); word-break: break-all; font-size: 15px; }
@media (max-width: 760px) { .detail-top { grid-template-columns: 1fr; } .detail-top .side { width: 100%; flex-direction: row; } .detail-top .side .qr-tile { width: 120px; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.qr-maker { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
@media (max-width: 560px) { .qr-maker { grid-template-columns: 1fr; } }

/* Domains */
.domain { padding: 20px; border-top: 1px solid var(--rule); }
.domain:first-child { border-top: 0; }
.domain .host { font: 500 17px var(--mono); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.steps > li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13px; }
.record { display: grid; grid-template-columns: 70px 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; font: 14px var(--mono); background: var(--sunk); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.record span { font: 12.5px var(--text); color: var(--muted); }
.record b { font-weight: 500; word-break: break-all; }
@media (max-width: 620px) { .record { grid-template-columns: 1fr; } }

/* Key reveal / misc */
.reveal { background: var(--marigold-soft); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.copyline { display: flex; gap: 8px; } .copyline input { font-family: var(--mono); font-size: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13.5px; padding: 10px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.scroll { overflow-x: auto; }
.empty { text-align: center; padding: 54px 24px; }
.empty .mark { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--marigold-soft); color: var(--amber); }
.empty .mark .ic { width: 24px; height: 24px; }
.empty h2 { font-size: 21px; } .empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }
.setting-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.setting-nav a { padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-size: 15px; display: flex; gap: 10px; align-items: center; }
.setting-nav a:hover { background: var(--sunk); } .setting-nav a.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); font-weight: 600; }
.with-nav { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .with-nav { grid-template-columns: 1fr; } .setting-nav { position: static; flex-direction: row; overflow-x: auto; } }
.todo { display: grid; gap: 1px; background: var(--rule); border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); }
.todo a { background: var(--card); padding: 14px 18px; text-decoration: none; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; }
.todo a:hover { background: var(--sunk); }
.todo b { font-size: 15px; } .todo span { color: var(--muted); font-size: 14px; grid-column: 1; } .todo .ic { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); }
.planmatrix input[type=text], .planmatrix input[type=number] { height: 36px; font-size: 14px; min-width: 84px; }
.planmatrix td, .planmatrix th { text-align: center; } .planmatrix td:first-child, .planmatrix th:first-child { text-align: left; }
.logview { background: #1D1C1A; color: #D9D4CA; font: 12.5px/1.6 var(--mono); border-radius: 12px; padding: 14px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* Installer */
.install { min-height: 100vh; padding: 48px 20px 80px; }
.install .wrap { width: min(640px, 100%); margin: 0 auto; }
.install h1 { font-size: 40px; letter-spacing: -.04em; margin: 26px 0 8px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 14.5px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.checklist .ic { color: var(--pine); } .checklist li.bad .ic { color: var(--rose); } .checklist li.soft .ic { color: var(--amber); }
@media (max-width: 600px) { .checklist { grid-template-columns: 1fr; } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--rule-2); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; background: var(--card); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice b { display: block; font-size: 15px; } .choice small { color: var(--muted); font-size: 13.5px; }
.only-mysql { display: none; } .use-mysql .only-mysql { display: block; }
@media (max-width: 600px) { .choices { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 640px) { .hide-small { display: none !important; } }

@media (max-width: 560px) { .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .segmented a, .segmented button, .segmented label { padding: 6px 9px; font-size: 13px; } }
