/* ==========================================================================
   BaseKit stylesheet — one file, no build step.
   1. Tokens   2. Base   3. Components   4. Panel layout   5. Auth + installer
   6. Public website   7. Utilities
   The brand colour (--brand) is printed inline from Admin > Settings > Logo and icons.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --brand: #0a7c5c;
  --font: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e8ebf0;
  --border: #e1e5ea;
  --border-strong: #c9cfd8;
  --text: #141821;
  --muted: #586172;
  --faint: #8790a0;

  --primary: var(--brand);
  --primary-hover: color-mix(in srgb, var(--brand) 86%, #000);
  --primary-soft: color-mix(in srgb, var(--brand) 9%, var(--surface));
  --primary-line: color-mix(in srgb, var(--brand) 28%, var(--surface));
  --on-primary: #ffffff;

  --success: #12754a;  --success-soft: #e4f4ec;
  --danger: #c42b2b;   --danger-soft: #fbe9e9;
  --warning: #9a5b05;  --warning-soft: #fdf1dc;
  --info: #1766a8;     --info-soft: #e3f0fa;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .08);
  --sidebar-w: 268px;
  --topbar-h: 60px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #161a21;
  --surface-2: #1d222b;
  --surface-3: #262c37;
  --border: #272d38;
  --border-strong: #3a4250;
  --text: #e9ecf1;
  --muted: #a3acba;
  --faint: #737d8c;

  --primary: color-mix(in srgb, var(--brand) 62%, #fff);
  --primary-hover: color-mix(in srgb, var(--brand) 48%, #fff);
  --primary-soft: color-mix(in srgb, var(--brand) 22%, var(--surface));
  --primary-line: color-mix(in srgb, var(--brand) 45%, var(--surface));
  --on-primary: #0b0e13;

  --success: #4cc38a;  --success-soft: #14301f;
  --danger: #f27676;   --danger-soft: #3a1717;
  --warning: #e6ac4d;  --warning-soft: #33250c;
  --info: #6ab4ec;     --info-soft: #12293b;
  --shadow: none;
  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 1em; } p:last-child { margin-bottom: 0; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 4px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; margin: 0; line-height: 1.6; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { flex: none; vertical-align: -3px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 3. Components ------------------------------------------------------------ */

/* Buttons. Add .is-loading (done automatically on submit) to show the spinner and block clicks. */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); background: var(--primary); color: var(--on-primary); font: 500 14px/1 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s, transform .08s; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn-danger { color: #1a0808; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-danger-outline { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger-outline:hover { background: var(--danger-soft); }
.btn-success { background: var(--success); color: #fff; }
[data-theme="dark"] .btn-success { color: #06160d; }
.btn-success:hover { background: color-mix(in srgb, var(--success) 85%, #000); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; } .btn-icon.btn-sm { width: 32px; }
.btn[disabled], .btn.is-loading { cursor: not-allowed; opacity: .65; }
.btn.is-loading { color: transparent !important; opacity: 1; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--on-primary); border-right-color: transparent; animation: spin .6s linear infinite; }
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--text); border-right-color: transparent; }
.btn-danger-outline.is-loading::after { border-color: var(--danger); border-right-color: transparent; }
.btn-danger.is-loading::after, .btn-success.is-loading::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--primary); border-right-color: transparent; animation: spin .6s linear infinite; }

/* Thin bar at the top of the window while a page is loading. */
.page-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 300; pointer-events: none; opacity: 0; transition: opacity .2s; }
.page-progress::before { content: ""; display: block; height: 100%; width: 40%; background: var(--primary); border-radius: 0 3px 3px 0; }
.page-progress.is-active { opacity: 1; }
.page-progress.is-active::before { animation: progress 1.1s ease-in-out infinite; }
@keyframes progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; justify-content: flex-end; background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card + .card { margin-top: 20px; }
.grid > .card + .card, .split > * > .card:first-child, .split > .card + .card { margin-top: 0; }

/* Forms */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; }
.label .opt { font-weight: 400; color: var(--faint); margin-left: 4px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font: 400 14.5px/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.textarea.code { font-family: var(--mono); font-size: 13px; min-height: 120px; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23808898' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input[type="color"] { width: 56px; padding: 4px; cursor: pointer; }
.input[type="file"] { padding: 7px 10px; height: auto; }
.help { margin-top: 6px; font-size: 13px; color: var(--muted); }
.error { margin-top: 6px; font-size: 13px; color: var(--danger); display: flex; gap: 6px; align-items: flex-start; }
.input-group { position: relative; }
.input-group .input { padding-right: 42px; }
.input-group .input-action { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; }
.input-group .input-action:hover { background: var(--surface-2); color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-narrow { max-width: 640px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; }

/* Toggle switch */
.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { flex: none; width: 40px; height: 23px; margin-top: 1px; border-radius: 12px; background: var(--border-strong); position: relative; transition: background-color .18s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch .switch-text { font-size: 14px; font-weight: 500; }
.switch .switch-text small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Image upload field */
.upload { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.upload-preview { width: 84px; height: 84px; flex: none; border: 1px dashed var(--border-strong); border-radius: var(--radius); display: grid; place-items: center; background: var(--surface-2); color: var(--faint); overflow: hidden; }
.upload-preview.wide { width: 150px; }
.upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.upload-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Rich text editor */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.editor-bar button { min-width: 30px; height: 30px; padding: 0 7px; border: 0; background: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; font: 600 13px var(--font); display: grid; place-items: center; }
.editor-bar button:hover { background: var(--surface-3); color: var(--text); }
.editor-area { min-height: 180px; max-height: 520px; overflow-y: auto; padding: 12px 14px; outline: 0; font-size: 14.5px; line-height: 1.6; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--faint); }
.editor-source { display: none; width: 100%; min-height: 180px; border: 0; padding: 12px 14px; font: 13px/1.6 var(--mono); background: var(--surface); color: var(--text); resize: vertical; outline: 0; }
.editor.is-source .editor-area { display: none; } .editor.is-source .editor-source { display: block; }
.prose h2 { font-size: 1.35em; margin: 1.4em 0 .5em; } .prose h3 { font-size: 1.12em; margin: 1.3em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; } .prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--primary-line); color: var(--muted); }
.prose img { border-radius: var(--radius); margin: 1em 0; height: auto; }
.prose > :first-child { margin-top: 0; }

/* Repeater (lists of items in the homepage editor) */
.repeater-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 4px; margin-bottom: 12px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.repeater-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.repeater-tools { display: flex; gap: 2px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Alerts */
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 14px; margin-bottom: 18px; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.alert-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); color: var(--info); }
.alert strong { font-weight: 600; }

/* Toasts */
.toasts { position: fixed; z-index: 400; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--radius); background: var(--text); color: var(--bg); box-shadow: var(--shadow-pop); font-size: 14px; animation: toast-in .22s ease-out; }
.toast .icon { margin-top: 2px; }
.toast-success .icon { color: #5bd39a; } .toast-error .icon { color: #ff8f8f; }
[data-theme="dark"] .toast-success .icon { color: #12754a; } [data-theme="dark"] .toast-error .icon { color: #c42b2b; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast button { margin-left: auto; border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Success screen that replaces a form when its job is done */
.success-panel { text-align: center; padding: 36px 24px; animation: toast-in .3s ease-out; }
.success-panel h2 { font-size: 20px; margin-bottom: 8px; }
.success-panel p { color: var(--muted); max-width: 44ch; margin: 0 auto 20px; }
.success-mark { width: 64px; height: 64px; margin: 0 auto 18px; }
.success-mark circle { fill: none; stroke: var(--success); stroke-width: 3; stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw .5s ease-out forwards; }
.success-mark path { fill: none; stroke: var(--success); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .3s .4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 350; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(10, 14, 20, .55); }
.modal.is-open { display: flex; animation: fade .15s ease-out; }
.modal-box { width: min(460px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); animation: pop .18s ease-out; }
.modal-box.wide { width: min(640px, 100%); }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 10px 20px 20px; color: var(--muted); }
.modal-body .field { color: var(--text); }
.modal-foot { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); display: none; }
.dropdown.is-open .dropdown-menu { display: block; animation: pop .12s ease-out; }
.dropdown-menu a, .dropdown-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font: 400 14px var(--font); border-radius: var(--radius-sm); cursor: pointer; text-align: left; text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { margin: 6px 0; }
.dropdown-menu form { margin: 0; }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head strong { display: block; font-weight: 600; font-size: 14px; } .dropdown-head span { font-size: 13px; color: var(--muted); word-break: break-all; }

/* Tables */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table .truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-user strong { display: block; font-weight: 500; } .cell-user span { font-size: 13px; color: var(--muted); }
.cell-user a { color: inherit; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { height: 36px; width: auto; min-width: 150px; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; } .search .icon { position: absolute; left: 11px; top: 10px; color: var(--faint); } .search .input { padding-left: 34px; width: 100%; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.pagination nav { display: flex; gap: 4px; }
.pagination a, .pagination span.page { min-width: 32px; height: 32px; padding: 0 9px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); background: var(--surface); text-decoration: none; }
.pagination a:hover { background: var(--surface-2); }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .is-disabled { opacity: .45; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { color: var(--faint); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* Avatars */
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 13px; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-xl { width: 96px; height: 96px; font-size: 30px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; color: var(--muted); font: 500 14px var(--font); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .is-active { color: var(--primary); border-bottom-color: var(--primary); }

/* Stat tiles + definition lists */
.stat { padding: 18px 20px; }
.stat-label { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; font-size: 14px; }
.dl dt { color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--border); }
.dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.list .when { color: var(--faint); font-size: 13px; white-space: nowrap; }

/* Charts (drawn by app.js into [data-chart]) */
.chart { width: 100%; height: 220px; position: relative; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart text { fill: var(--faint); font: 11px var(--font); }
.chart .bar { fill: var(--primary); transition: opacity .15s; } .chart .bar:hover { opacity: .75; }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--primary); opacity: .1; }
.chart .point { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -130%); opacity: 0; transition: opacity .1s; z-index: 5; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.bar-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.bar-list .row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 12px; }
.bar-list .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 4. Panel layout (admin + user panel) --------------------------------------- */
.panel { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 200; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); transition: transform .22s ease; }
.sidebar-brand { height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.sidebar-brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: 15px; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo { max-height: 32px; max-width: 170px; width: auto; }
[data-theme="dark"] .logo-light, :root:not([data-theme="dark"]) .logo-dark { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.nav-group { margin-top: 16px; }
.nav-group-title { padding: 0 10px 6px; font-size: 12.5px; font-weight: 500; color: var(--faint); }
.nav-link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font: 500 14px var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.is-active { background: var(--primary-soft); color: var(--primary); }
.nav-link .badge { margin-left: auto; }
.nav-link .chev { margin-left: auto; transition: transform .18s; }
.nav-item.is-open > .nav-link .chev { transform: rotate(90deg); }
.nav-sub { display: none; margin: 2px 0 4px 19px; padding-left: 12px; border-left: 1px solid var(--border); }
.nav-item.is-open > .nav-sub { display: block; }
.nav-sub a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: 13.5px; text-decoration: none; }
.nav-sub a:hover { color: var(--text); background: var(--surface-2); }
.nav-sub a.is-active { color: var(--primary); font-weight: 500; }
.sidebar-foot { flex: none; padding: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--faint); }

.panel-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 150; height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .spacer { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; background: none; border-radius: 22px; cursor: pointer; color: var(--text); font: 500 14px var(--font); }
.topbar-user:hover { background: var(--surface-2); }
.menu-toggle { display: none; }
.content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 24px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.impersonation { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 9px 16px; background: var(--warning-soft); color: var(--warning); font-size: 14px; border-bottom: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.impersonation form { margin: 0; }
.scrim { display: none; position: fixed; inset: 0; z-index: 190; background: rgba(10, 14, 20, .5); }

.grid { display: grid; gap: 20px; }
.grid > *, .split > *, .stack > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.stack > .card + .card { margin-top: 0; }

/* Extension cards */
.ext-card { display: flex; flex-direction: column; }
.ext-card .card-body { flex: 1; display: flex; gap: 14px; }
.ext-icon { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.ext-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.ext-card p { font-size: 14px; color: var(--muted); }
.ext-card .card-foot { justify-content: space-between; }
.ext-card .card-foot form { margin: 0; }

/* Section rows in the homepage manager */
.section-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.section-row:last-child { border-bottom: 0; }
.section-row .grow { flex: 1; min-width: 0; }
.section-row strong { font-weight: 500; display: block; }
.section-row small { color: var(--muted); font-size: 13px; }
.section-row form { margin: 0; display: inline-flex; }
.section-row.is-off strong { color: var(--muted); }
.section-tools { display: flex; align-items: center; gap: 4px; }

/* 5. Auth + installer --------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-aside { background: var(--brand); color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(160deg, #000 10%, transparent 75%); }
.auth-aside > * { position: relative; }
.auth-aside a { color: #fff; }
.auth-aside .sidebar-brand { border: 0; padding: 0; height: auto; color: #fff; font-size: 18px; }
.auth-aside .brand-mark { background: #fff; color: var(--brand); }
.auth-aside h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.025em; max-width: 16ch; }
.auth-aside p { margin-top: 14px; opacity: .85; max-width: 42ch; font-size: 16px; }
.auth-aside small { opacity: .7; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: min(400px, 100%); }
.auth-box h1 { font-size: 26px; margin-bottom: 6px; }
.auth-box .lead { color: var(--muted); margin-bottom: 26px; }
.auth-box .foot { margin-top: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-brand-mobile { display: none; margin-bottom: 28px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.captcha { display: flex; gap: 10px; align-items: stretch; }
.captcha-img { height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; flex: none; overflow: hidden; display: flex; }
.captcha-img img { height: 100%; width: auto; }
.captcha .input { flex: 1; min-width: 0; }

.install { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 44px 18px 60px; }
.install-box { width: min(680px, 100%); }
.install-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 18px; margin-bottom: 26px; }
.steps { display: flex; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.steps li { flex: 1; position: relative; text-align: center; font-size: 13px; color: var(--faint); padding-top: 38px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 1px; background: var(--border-strong); }
.steps li:first-child::after { display: none; }
.steps li.is-done::before { content: "✓"; background: var(--success); border-color: var(--success); color: #fff; }
.steps li.is-current { color: var(--text); font-weight: 500; }
.steps li.is-current::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.steps li.is-done::after, .steps li.is-current::after { background: var(--success); }
.req { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.req:last-child { border-bottom: 0; }
.req small { color: var(--faint); margin-left: 8px; }
.pick { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pick input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.pick strong { display: block; font-weight: 500; font-size: 14px; } .pick small { color: var(--muted); font-size: 13px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-page .code { font: 500 15px var(--mono); color: var(--primary); margin-bottom: 10px; }
.error-page h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -.03em; margin-bottom: 12px; }
.error-page p { color: var(--muted); max-width: 46ch; margin: 0 auto 24px; }

/* 6. Public website ----------------------------------------------------------- */
.site { background: var(--surface); }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 150; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-stuck { border-bottom-color: var(--border); }
.site-header .container { height: 68px; display: flex; align-items: center; gap: 28px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--text); letter-spacing: -.01em; text-decoration: none; }
.site-brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { padding: 8px 12px; border-radius: var(--radius); color: var(--muted); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-actions { display: flex; gap: 8px; align-items: center; }
.site-actions form { margin: 0; }
.site-menu-toggle { display: none; }

.section { padding: 92px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.025em; line-height: 1.12; }
.section-head p { margin-top: 12px; font-size: 17px; color: var(--muted); }

.hero { padding: 76px 0 88px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 13.5px; font-weight: 500; margin-bottom: 20px; }
.hero-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; }
.hero .lead { margin: 20px 0 30px; font-size: 18px; color: var(--muted); max-width: 54ch; }
.hero-image { border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-pop); width: 100%; height: auto; }

/* Hero illustration: a miniature of the admin panel, drawn in HTML */
.mock { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; font-size: 12.5px; transform: perspective(1600px) rotateY(-7deg) rotateX(2deg); transform-origin: left center; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mock-bar span { margin-left: 10px; flex: 1; height: 20px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font: 11px var(--mono); color: var(--faint); display: flex; align-items: center; padding: 0 10px; }
.mock-body { display: grid; grid-template-columns: 148px 1fr; min-height: 318px; }
.mock-side { border-right: 1px solid var(--border); padding: 12px 10px; display: grid; gap: 3px; align-content: start; }
.mock-side b { font-weight: 500; color: var(--faint); font-size: 11px; padding: 8px 8px 3px; }
.mock-side span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--muted); }
.mock-side span.on { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.mock-side span.sub { margin-left: 14px; padding-left: 10px; border-left: 1px solid var(--border); border-radius: 0; font-size: 12px; }
.mock-main { padding: 16px; display: grid; gap: 12px; align-content: start; background: var(--bg); }
.mock-main h5 { margin: 0; font-size: 14px; font-weight: 600; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.mock-row small { display: block; color: var(--faint); font-size: 11px; }
.mock-toggle { width: 30px; height: 17px; border-radius: 9px; background: var(--border-strong); position: relative; flex: none; }
.mock-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.mock-toggle.on { background: var(--primary); animation: flip 5s 1.2s ease-in-out infinite; } .mock-toggle.on::after { left: 15px; }
@keyframes flip { 0%, 44%, 100% { background: var(--primary); } 50%, 94% { background: var(--border-strong); } }
.mock-save { justify-self: start; padding: 7px 14px; border-radius: 6px; background: var(--primary); color: var(--on-primary); font-weight: 500; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.feature { background: var(--surface); padding: 28px 26px; }
.feature .icon { color: var(--primary); margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.stats-row div strong { display: block; font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.stats-row div span { display: block; margin-top: 10px; color: var(--muted); }

.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.about.no-image { grid-template-columns: minmax(0, 760px); }
.about h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.025em; margin-bottom: 16px; }
.about .prose { color: var(--muted); font-size: 16.5px; }
.about img { border-radius: var(--radius-lg); width: 100%; height: auto; }
.ticks { list-style: none; margin: 22px 0 28px; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .icon { color: var(--success); margin-top: 3px; }

.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; counter-reset: s; }
.step-list li { counter-increment: s; padding-top: 20px; border-top: 2px solid var(--border-strong); position: relative; }
.step-list li::before { content: counter(s, decimal-leading-zero); font: 500 14px var(--mono); color: var(--primary); display: block; margin-bottom: 12px; }
.step-list h3 { font-size: 18px; margin-bottom: 8px; } .step-list p { color: var(--muted); }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.quote { margin: 0; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 20px; }
.quote blockquote { margin: 0; font-size: 16.5px; line-height: 1.55; flex: 1; }
.quote figcaption strong { display: block; font-weight: 600; } .quote figcaption span { color: var(--muted); font-size: 14px; }

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 17px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--faint); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 70ch; }

.cta { padding: 0 0 92px; }
.cta-box { background: var(--brand); color: #fff; border-radius: 20px; padding: 56px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-box h2 { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.025em; }
.cta-box p { margin-top: 10px; opacity: .88; max-width: 52ch; font-size: 17px; }
.cta-box .btn { background: #fff; color: var(--brand); } .cta-box .btn:hover { background: rgba(255,255,255,.9); }

.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.contact.no-form { grid-template-columns: minmax(0, 640px); }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .icon { color: var(--primary); margin-top: 3px; }
.contact-list small { display: block; color: var(--muted); font-size: 13.5px; }

.site-footer { border-top: 1px solid var(--border); padding: 44px 0 30px; background: var(--bg); color: var(--muted); font-size: 14.5px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.footer-top p { max-width: 38ch; margin-top: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; }
.footer-links a { color: var(--muted); } .footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--border); }
.social { display: flex; gap: 6px; }
.social a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius); color: var(--muted); } .social a:hover { background: var(--surface-3); color: var(--text); }

.page-hero { padding: 56px 0 36px; border-bottom: 1px solid var(--border); background: var(--bg); }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.03em; }
.page-hero p { margin-top: 10px; color: var(--muted); font-size: 17px; max-width: 60ch; }
.article { padding: 48px 0 80px; font-size: 17px; line-height: 1.7; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s; }
.post-card:hover { border-color: var(--primary-line); text-decoration: none; }
.post-cover { aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { font-size: 18px; line-height: 1.3; }
.post-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--faint); }

/* 7. Utilities + responsive --------------------------------------------------- */
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-right { text-align: right; } .text-center { text-align: center; }
.nowrap { white-space: nowrap; } .break { word-break: break-all; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; gap: 12px; align-items: center; } .flex-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-pop); }
  .panel.nav-open .sidebar { transform: none; }
  .panel.nav-open .scrim { display: block; }
  .panel-main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .content { padding: 20px 14px 40px; }
  .topbar-user .name { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-brand-mobile { display: flex; }
  .hero { padding: 48px 0 60px; }
  .hero .container, .about, .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .mock { transform: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 64px 0; } .cta { padding-bottom: 64px; }
  .site-menu-toggle { display: inline-flex; margin-left: auto; }
  .site-nav, .site-actions { display: none; }
  .site-header.is-open .container { height: auto; flex-wrap: wrap; padding: 14px 0 18px; gap: 12px; }
  .site-header.is-open .site-nav { display: flex; flex-direction: column; flex-basis: 100%; order: 3; }
  .site-header.is-open .site-actions { display: flex; flex-basis: 100%; order: 4; }
  .site-header.is-open .site-actions .btn { flex: 1; }
}
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .grid-2, .grid-3, .grid-4, .form-grid, .feature-grid, .pick-grid { grid-template-columns: minmax(0, 1fr); }
  .card-body { padding: 16px; } .card-head { padding: 14px 16px; } .card-foot { padding: 12px 16px; }
  .cta-box { padding: 36px 24px; }
  .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; }
  .dl { grid-template-columns: 1fr; } .dl dt { border: 0; padding-bottom: 0; } .dl dd { padding-top: 2px; }
  .steps li { font-size: 0; } .steps li.is-current { font-size: 12px; }
  .table td, .table th { padding: 10px 12px; }
  .hide-sm { display: none !important; }
  .section-row { flex-wrap: wrap; }
  .toasts { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 8. Link directory ---------------------------------------------------------------
   Cards, chips, filters, link pages and the directory sections of the homepage.
   Every link type has its own colour, passed in as --type on the element. */
:root { --type: var(--brand); }
.ltype { display: inline-flex; align-items: center; gap: 4px; color: var(--type); font-weight: 500; white-space: nowrap; }
.ltype-pill { padding: 3px 10px 3px 8px; border-radius: 12px; background: color-mix(in srgb, var(--type) 11%, var(--surface)); font-size: 13px; }
.ltype-dot { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--type) 12%, var(--surface)); color: var(--type); }
[data-theme="dark"] .ltype, [data-theme="dark"] .ltype-dot, [data-theme="dark"] .lavatar, [data-theme="dark"] .type-icon, [data-theme="dark"] .chip[style] .icon, [data-theme="dark"] .rank-no { color: color-mix(in srgb, var(--type) 52%, #fff); }
[data-theme="dark"] .ltype-pill, [data-theme="dark"] .ltype-dot, [data-theme="dark"] .lavatar, [data-theme="dark"] .type-icon { background: color-mix(in srgb, var(--type) 26%, var(--surface)); }
.lverified { color: var(--info); display: inline-flex; flex: none; }
.lcountry { font: 500 11px/1 var(--mono); letter-spacing: .04em; padding: 3px 5px; border-radius: 4px; background: var(--surface-3); color: var(--muted); }
.l18 { font-size: 11px; font-weight: 600; padding: 2px 5px; border-radius: 4px; background: var(--danger-soft); color: var(--danger); }

/* Picture or initials of a link */
.lavatar { position: relative; flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--type) 13%, var(--surface)); color: var(--type); font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.lavatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lavatar-sm { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.lavatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.lavatar-xl { width: 88px; height: 88px; border-radius: 24px; font-size: 28px; }

/* Link cards */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
.lgrid[hidden] { display: none; }
.lcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.lcard:hover { border-color: var(--primary-line); box-shadow: 0 6px 20px -10px rgba(16, 24, 40, .25); transform: translateY(-1px); }
.lcard.is-featured { border-color: var(--primary-line); background: linear-gradient(180deg, var(--primary-soft), var(--surface) 46%); }
.lcard-flag { position: absolute; top: -9px; right: 14px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 11.5px; font-weight: 600; }
.lcard-main { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; min-width: 0; }
.lcard-main:hover { text-decoration: none; }
.lcard-main:hover .lcard-title > span:first-child { color: var(--primary); }
.lcard-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.lcard-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15.5px; line-height: 1.3; min-width: 0; }
.lcard-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.lcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.lcard-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.lcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.lcard-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; min-width: 0; }
.lcard-stats span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lcard-join { background: color-mix(in srgb, var(--type) 11%, var(--surface)); color: var(--type); border-color: transparent; font-weight: 600; flex: none; }
.lcard-join:hover { background: var(--type); color: #fff; }
[data-theme="dark"] .lcard-join { background: color-mix(in srgb, var(--type) 28%, var(--surface)); color: color-mix(in srgb, var(--type) 45%, #fff); }
[data-theme="dark"] .lcard-join:hover { background: color-mix(in srgb, var(--type) 70%, #fff); color: #0b0e13; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: -2px; padding-inline: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 17px; background: var(--surface); color: var(--text); font: 500 13.5px var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; flex: none; }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip .icon { color: var(--type); }
.chip small { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.is-active .icon, .chip.is-active small { color: inherit; }
.chips-lg .chip { height: 40px; padding: 0 15px; font-size: 14.5px; }

/* Search boxes */
.dir-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 620px; margin-top: 22px; padding: 5px 5px 5px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.dir-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.dir-search > .icon { color: var(--faint); flex: none; }
.dir-search input { flex: 1; min-width: 0; height: 38px; border: 0; background: none; color: var(--text); font: 400 15.5px var(--font); outline: 0; }
.dir-search input::placeholder { color: var(--faint); }
.dir-search-lg { padding: 7px 7px 7px 18px; border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(16, 24, 40, .35); }
.dir-search-lg input { height: 46px; font-size: 16.5px; }
.site-search { position: relative; display: flex; align-items: center; }
.site-search .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.site-search input { width: 170px; height: 36px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font: 400 14px var(--font); transition: width .2s, border-color .15s, background-color .15s; }
.site-search input:focus { outline: 0; width: 220px; border-color: var(--primary); background: var(--surface); }

/* Header: link-type menu */
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-drop { position: relative; }
.nav-drop > button { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font: 500 14.5px var(--font); cursor: pointer; }
.nav-drop > button:hover, .nav-drop:focus-within > button, .nav-drop.is-open > button { color: var(--text); background: var(--surface-2); }
.nav-drop-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 160; min-width: 250px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); display: none; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu, .nav-drop.is-open .nav-drop-menu { display: grid; gap: 2px; }
.nav-drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.site-nav .nav-drop-menu a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: var(--text); }
.nav-drop-menu a small { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }

/* Directory pages */
.crumbs a { color: inherit; }
.dir-hero { padding: 36px 0 30px; }
.dir-hero .crumbs { margin-bottom: 10px; font-size: 13.5px; color: var(--faint); }
.dir-hero h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dir-hero-icon { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.dir-body { padding-top: 28px; padding-bottom: 72px; }
.dir-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.dir-filters .chips { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; overflow: visible; }
.dir-selects { margin-left: auto; }
.dir-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.dir-selects .select { width: auto; height: 36px; max-width: 200px; font-size: 14px; }
.dir-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 14px; font-size: 14px; color: var(--muted); }
.dir-count a { display: inline-flex; align-items: center; gap: 4px; }
.dir-more { display: flex; justify-content: center; margin-top: 28px; }
.dir-pages { margin-top: 20px; }
.js-more .dir-pages { display: none; }
.dir-text { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); max-width: 76ch; color: var(--muted); }
.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 24px; }
.row-head h2 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.02em; }
.row-head p { margin: 6px 0 0; color: var(--muted); }
.row-head > a { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.section-tight { padding: 56px 0; }
.section-tight .section-head { margin-bottom: 28px; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s; min-width: 0; }
.cat-tile:hover { border-color: var(--primary-line); background: var(--primary-soft); text-decoration: none; }
.cat-tile > .icon { color: var(--faint); margin-left: auto; flex: none; }
.cat-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); overflow: hidden; }
.cat-tile:hover .cat-icon { background: var(--surface); }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-icon-sm { width: 32px; height: 32px; border-radius: 9px; }
.cat-text { display: grid; min-width: 0; }
.cat-text strong { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-text small { color: var(--muted); font-size: 13px; }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.cat-block { display: grid; gap: 10px; align-content: start; }
.cat-block p { margin: 0; font-size: 14px; color: var(--muted); }
.cat-block .chip { height: 30px; font-size: 13px; }

/* Homepage: directory banner */
.dhero { padding: 64px 0 60px; background: radial-gradient(900px 420px at 12% -10%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 70%), var(--surface); overflow: hidden; }
.dhero .container { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.dhero-solo .container { grid-template-columns: minmax(0, 760px); }
.dhero h1 { font-size: clamp(34px, 4.8vw, 54px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.dhero .lead { margin: 18px 0 0; font-size: 18px; color: var(--muted); max-width: 56ch; }
.dhero-types { margin-top: 18px; }
.dhero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.dhero-all { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.dhero-stack { position: relative; padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-pop); display: grid; gap: 4px; }
.dhero-stack-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.dhero-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--text); text-decoration: none; transition: background-color .15s; min-width: 0; }
.dhero-row:hover { background: var(--surface-2); text-decoration: none; }
.dhero-row-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.dhero-row-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhero-row-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhero-row-go { flex: none; padding: 5px 12px; border-radius: 8px; background: color-mix(in srgb, var(--type) 11%, var(--surface)); color: var(--type); font-size: 13px; font-weight: 600; }
[data-theme="dark"] .dhero-row-go { background: color-mix(in srgb, var(--type) 28%, var(--surface)); color: color-mix(in srgb, var(--type) 45%, #fff); }

/* Homepage: type tiles and ranked list */
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.type-tile { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.type-tile:hover { border-color: var(--type); transform: translateY(-2px); text-decoration: none; }
.type-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--type) 12%, var(--surface)); color: var(--type); margin-bottom: 6px; }
.type-tile strong { font-size: 16px; font-weight: 600; }
.type-tile > span:not(.type-icon) { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.type-tile small { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--type); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .type-tile small { color: color-mix(in srgb, var(--type) 52%, #fff); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.rank-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.rank-no { flex: none; width: 26px; font: 500 14px var(--mono); color: var(--faint); }
.rank-list li:nth-child(-n+3) .rank-no { color: var(--primary); }
.rank-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.rank-main:hover { text-decoration: none; } .rank-main:hover strong { color: var(--primary); }
.rank-text { display: grid; gap: 2px; min-width: 0; }
.rank-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-stat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }

/* Link page */
.link-page { padding-top: 26px; padding-bottom: 72px; }
.link-page > .crumbs { margin-bottom: 18px; font-size: 13.5px; color: var(--faint); }
.link-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.link-head { display: flex; gap: 20px; align-items: flex-start; }
.link-head-text { min-width: 0; flex: 1; }
.link-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.link-head h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.025em; line-height: 1.15; overflow-wrap: anywhere; }
.link-facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.link-facts li { display: inline-flex; align-items: center; gap: 6px; }
.link-facts strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.link-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.link-cta form { margin: 0; }
.link-join { background: var(--type); color: #fff; padding-inline: 26px; }
.link-join:hover { background: color-mix(in srgb, var(--type) 86%, #000); color: #fff; }
.btn.is-on { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--surface)); }
.btn.is-on .icon { fill: currentColor; }
.link-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.link-section h2 { font-size: 18px; margin-bottom: 12px; }
.link-desc { margin: 0; font-size: 16px; line-height: 1.65; max-width: 72ch; overflow-wrap: anywhere; }
.link-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.link-side .card + .card { margin-top: 0; }
.link-qr .card-body { display: grid; justify-items: center; gap: 4px; text-align: center; }
.link-qr .qr { border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--border); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-safety strong { display: flex; align-items: center; gap: 8px; }
.link-safety p { margin: 8px 0 12px; font-size: 13.5px; color: var(--muted); }
.link-safety .btn { margin-left: -8px; color: var(--muted); }
.link-related { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.stack-sm { display: grid; gap: 8px; }

/* Leaving page */
.go-page { padding: 48px 0 80px; }
.go-card .card-body { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 36px 28px; }
.go-card h1 { font-size: clamp(22px, 3.2vw, 30px); overflow-wrap: anywhere; }
.go-host { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; }
.go-notice { text-align: left; max-width: 520px; margin: 6px 0; }
.go-continue { background: var(--type); color: #fff; min-width: 240px; }
.go-continue:hover { background: color-mix(in srgb, var(--type) 86%, #000); color: #fff; }
.go-continue.is-waiting { background: var(--surface-3); color: var(--muted); pointer-events: none; }
.go-back { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--muted); }

/* Submit form */
.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.submit-layout .card + .card { margin-top: 0; }
.link-url-row { display: flex; gap: 8px; }
.link-url-row .input { flex: 1; min-width: 0; }
.link-url-row .btn { flex: none; height: 40px; }
.link-preview { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--success); border-radius: var(--radius-lg); background: var(--success-soft); }
.link-preview[hidden], .alert[hidden] { display: none; }
.link-preview strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.link-preview small { color: var(--muted); font-size: 13px; }
.type-list li { align-items: flex-start; padding: 10px 16px; }
.type-list small { font-family: var(--mono); font-size: 11.5px; margin-top: 2px; }
.rules { margin: 0; gap: 10px; font-size: 14px; }
.form-wide { max-width: 860px; }

/* Footer */
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin-bottom: 32px; }
.footer-grid p { max-width: 44ch; margin: 12px 0 0; }
.footer-note { font-size: 13px; color: var(--faint); }
.footer-grid nav { display: grid; gap: 9px; align-content: start; }
.footer-grid h3 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-grid nav a { color: var(--muted); } .footer-grid nav a:hover { color: var(--text); }

/* Panels */
.bulk-bar { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.flag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.flag-row:empty { display: none; }
.inline-edit { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-edit .input { height: 34px; max-width: 260px; }
.cell-user.is-child { padding-left: 26px; position: relative; }
.cell-user.is-child::before { content: ""; position: absolute; left: 9px; top: -6px; width: 10px; height: 22px; border-left: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); border-radius: 0 0 0 6px; }
a.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.stat-link:hover { border-color: var(--primary-line); text-decoration: none; }
.content .lgrid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.btn .badge { height: 18px; padding: 0 6px; background: rgba(255, 255, 255, .22); color: inherit; }

@media (max-width: 1180px) {
  .site-search { display: none; }
}
@media (max-width: 1000px) {
  .link-layout, .submit-layout { grid-template-columns: minmax(0, 1fr); }
  .link-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dhero { padding: 40px 0 44px; }
  .dhero .container { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .rank-list { grid-template-columns: minmax(0, 1fr); }
  .section-tight { padding: 44px 0; }
  .site-header.is-open .site-search { display: flex; flex-basis: 100%; }
  .site-header.is-open .site-search input, .site-header.is-open .site-search input:focus { width: 100%; }
  .site-header.is-open .nav-drop > button { width: 100%; justify-content: space-between; }
  .site-header.is-open .nav-drop-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 8px; min-width: 0; }
  .site-header.is-open .nav-drop:hover .nav-drop-menu { display: none; }
  .site-header.is-open .nav-drop.is-open .nav-drop-menu { display: grid; }
}
@media (max-width: 640px) {
  .lgrid, .content .lgrid, .cat-list { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 10px; gap: 10px; }
  .cat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-tile { padding: 14px; }
  .dir-search .btn { padding: 0 12px; }
  .dir-filters .chips { flex-wrap: nowrap; overflow-x: auto; }
  .dir-selects { width: 100%; }
  .dir-selects .select { flex: 1 1 140px; max-width: none; }
  .link-head { gap: 14px; }
  .link-head .lavatar-xl { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
  .link-cta .link-join { flex: 1 1 100%; }
  .link-url-row { flex-direction: column; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dhero-row-go { display: none; }
  .inline-edit .input { max-width: 150px; }
}

/* Reviews extension */
.stars { display: inline-flex; gap: 1px; color: var(--border-strong); vertical-align: middle; }
.stars .is-on { color: #e09b17; } .stars .is-on .icon { fill: currentColor; }
.stars span { display: inline-flex; }
.review-avg { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; }
.review-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.review-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-list p { margin: 6px 0 0; color: var(--muted); max-width: 72ch; overflow-wrap: anywhere; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.review-form { margin-top: 20px; max-width: 620px; }
.review-form h3 { margin-bottom: 14px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { cursor: pointer; color: var(--border-strong); display: inline-flex; padding: 2px; border-radius: 6px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #e09b17; }
.star-input label:hover .icon, .star-input label:hover ~ label .icon, .star-input input:checked ~ label .icon { fill: currentColor; }
.star-input input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Ad Manager extension */
.ad-slot { display: grid; justify-items: center; gap: 4px; margin: 20px auto; max-width: 100%; overflow: hidden; text-align: center; }
.ad-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ad-header, .ad-footer { width: min(1160px, 100% - 40px); }
.ad-list-inline { grid-column: 1 / -1; margin: 4px 0; }
.ad-link-side { margin: 0; }
.ad-slot img, .ad-slot iframe { max-width: 100%; }

/* Public API extension */
.api-docs pre { overflow-x: auto; }
.api-docs .table-wrap { margin: 14px 0 22px; border: 1px solid var(--border); border-radius: var(--radius); }
.api-docs .table td:first-child { white-space: nowrap; }

/* Embed Widget extension */
.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 24px; align-items: start; }
.embed-layout .card + .card { margin-top: 0; }
.embed-preview { width: 100%; height: 460px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: block; }
@media (max-width: 1000px) { .embed-layout { grid-template-columns: minmax(0, 1fr); } }

/* Announcement Bar extension */
.notice-bar { font-size: 14px; background: var(--brand); color: #fff; }
.notice-bar .container { display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap; padding: 9px 36px 9px 0; position: relative; text-align: center; }
.notice-bar a { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice-bar button { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; opacity: .8; }
.notice-bar button:hover { opacity: 1; background: rgba(255, 255, 255, .16); }
.notice-dark { background: #141821; }
.notice-soft { background: var(--primary-soft); color: var(--text); }
.notice-soft button:hover { background: var(--surface-3); }

.cell-url { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-url a { color: inherit; }
@media (max-width: 900px) {
  .site-header.is-open .site-actions { flex-wrap: wrap; }
  .site-header.is-open .site-search { flex: 1 1 100%; }
  .cell-url { max-width: 170px; }
}
