/* ==========================================================================
   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: #1d4ed8;
  --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; }
}
