/* ==========================================================================
   myurl.bd design system
   Neutral zinc surfaces, one indigo accent, Inter type, 8–14px radii.
   Light + dark (follows the OS setting).
   ========================================================================== */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --text: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ring: rgba(79, 70, 229, 0.22);
  --on-accent: #ffffff;

  --success: #15803d;
  --success-soft: #ecfdf3;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-soft: #fef2f2;

  --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.06), 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(24, 24, 27, 0.10), 0 2px 4px -2px rgba(24, 24, 27, 0.05);
  --shadow-lg: 0 20px 48px -12px rgba(24, 24, 27, 0.22);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;

  --header-h: 64px;
  --sidebar-w: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #121214;
    --surface-2: #19191c;
    --surface-3: #232327;
    --border: #27272a;
    --border-strong: #3a3a40;

    --text: #fafafa;
    --text-2: #a1a1aa;
    --text-3: #8b8b94;

    --accent: #6366f1;
    --accent-hover: #7577f5;
    --accent-text: #a5b4fc;
    --accent-soft: rgba(99, 102, 241, 0.14);
    --accent-ring: rgba(129, 140, 248, 0.35);

    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-soft: rgba(248, 113, 113, 0.12);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-ring); }

h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.015em; line-height: 1.25; font-weight: 600; }

.icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  flex-shrink: 0;
  user-select: none;
}
.icon-sm { font-size: 18px; }
.icon-lg { font-size: 24px; }
.icon-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }

.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 500; line-height: 1;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  text-decoration: none !important;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .icon { font-size: 18px; }

.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-xs); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; color: var(--text-2); border-radius: var(--radius-sm); }
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon.btn-sm { width: 30px; height: 30px; }

.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.label { font-size: 13px; font-weight: 500; color: var(--text); }
.label .opt { color: var(--text-3); font-weight: 400; margin-left: 4px; }
.hint { font-size: 12.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-xs);
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 110px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-group .addon { display: flex; align-items: center; padding: 0 10px 0 12px; color: var(--text-3); font-size: 14px; background: var(--surface-2); border-right: 1px solid var(--border); border-radius: var(--radius-sm) 0 0 var(--radius-sm); white-space: nowrap; }
.input-group .input { border: 0; box-shadow: none; }
.input-group .input:focus { box-shadow: none; }
.input-group .btn-icon { align-self: center; margin-right: 3px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row .field + .field { margin-top: 0; }

/* Switch */
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-row .switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-row .switch-title { font-size: 14px; font-weight: 500; }
.switch-row .switch-desc { font-size: 13px; color: var(--text-3); }
.switch { position: relative; flex-shrink: 0; width: 36px; height: 20px; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-ring); }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15px; font-weight: 600; }
.card-desc { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.card-body { padding: 20px; }
.card-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge .icon { font-size: 14px; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Alerts & callouts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.alert .icon { font-size: 19px; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.alert-info { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.callout .icon { color: var(--text-3); margin-top: 1px; }
.callout strong { color: var(--text); font-weight: 600; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #18181b; color: #fafafa;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease-out;
}
@media (prefers-color-scheme: dark) { .toast { background: #fafafa; color: #18181b; } }
.toast .icon { font-size: 18px; color: #4ade80; }
.toast.error .icon { color: #f87171; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Avatar ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 13px; font-weight: 600; text-transform: uppercase; flex-shrink: 0;
}
.avatar:hover { text-decoration: none; }
.avatar-sq { border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* ==========================================================================
   Public shell
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.header-nav { display: flex; gap: 4px; }
.nav-link { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-2); }
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-link.active { color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.site-main { flex: 1; }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 80px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--text); }

/* ---------- Hero & composer ---------- */
.hero { text-align: center; padding: 72px 0 0; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: -64px 0 auto; height: 420px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 240px at 50% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, var(--border) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  opacity: .9;
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-xs); margin-bottom: 20px; }
.eyebrow .badge { height: 20px; }
.hero-title { font-size: clamp(34px, 5.4vw, 54px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
.hero-title .accent { color: var(--accent); }
.hero-sub { margin: 16px auto 0; max-width: 540px; font-size: 17px; color: var(--text-2); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.segmented-item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: background .15s, color .15s; }
.segmented-item .icon { font-size: 18px; }
.segmented-item:hover { color: var(--text); text-decoration: none; }
.segmented-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.hero .segmented { margin-top: 36px; }

.composer { max-width: 680px; margin: 16px auto 0; text-align: left; }
.composer-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 8px; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-row > .icon { color: var(--text-3); margin-left: 10px; }
.composer-input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; font-size: 16px; padding: 0 4px; }
.composer-input::placeholder { color: var(--text-3); }
.composer-input:focus { outline: none; }
.composer-card:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-ring); }

.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: background .15s, border-color .15s, color .15s;
}
.chip .icon { font-size: 16px; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-expanded="true"] { border-color: var(--text-3); color: var(--text); background: var(--surface-2); }
.chip.is-set { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip .chip-value { font-weight: 600; }

.option-panel { margin-top: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); animation: panel-in .16s ease-out; }
.option-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.option-panel-title { font-size: 14px; font-weight: 600; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.composer-alert { margin-top: 12px; }

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 180px; padding: 24px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--accent); box-shadow: var(--shadow-xs); margin-bottom: 6px; }
.dropzone-title { font-weight: 600; font-size: 15px; }
.dropzone-title span { color: var(--accent-text); }
.dropzone-hint { font-size: 13px; color: var(--text-3); }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.file-item .icon { color: var(--text-3); }
.file-item-name { flex: 1; font-size: 14px; font-weight: 500; }
.file-item-size { font-size: 13px; color: var(--text-3); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 4px 4px 0; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }

/* Result */
.result { padding: 24px; }
.result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.result-check { width: 36px; height: 36px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; }
.result-title { font-size: 16px; font-weight: 600; }
.result-sub { font-size: 13px; color: var(--text-3); }
.result-badges { margin-left: auto; display: flex; gap: 6px; }
.result-main { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.result-link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }
.result-link { flex: 1; font-size: 17px; font-weight: 600; color: var(--text); }
.result-dest { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.result-dest .icon { font-size: 16px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.result-qr { width: 112px; height: 112px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.result-qr img { width: 100%; height: 100%; }
.result-key { margin-top: 20px; }
.key-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.key-value { flex: 1; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-family: var(--mono); font-size: 13px; color: var(--text); }
.result-footer { display: flex; justify-content: center; margin-top: 12px; }

/* Feature strip */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 96px; }
.feature { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.feature-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.feature h3 { font-size: 15px; margin-bottom: 4px; }
.feature p { font-size: 14px; color: var(--text-2); }

/* ---------- Page header (inner pages) ---------- */
.page { padding: 40px 0 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.page-sub { margin-top: 4px; color: var(--text-2); font-size: 14.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .icon { font-size: 16px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; font-size: 13px; color: var(--text-3); }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.meta-row .icon { font-size: 16px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.stat-label .icon { font-size: 17px; color: var(--text-3); }
.stat-value { margin-top: 8px; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-note { margin-top: 4px; font-size: 12.5px; color: var(--text-3); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.section { margin-top: 24px; }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.bar-list { display: flex; flex-direction: column; gap: 4px; }
.bar-item { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 34px; padding: 0 10px; font-size: 13.5px; border-radius: var(--radius-sm); }
.bar-item:hover { background: var(--surface-2); }
.bar-fill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 4px; background: var(--accent-soft); z-index: 0; transition: width .4s ease; }
.bar-label, .bar-value { position: relative; z-index: 1; }
.bar-label { display: flex; align-items: center; gap: 8px; color: var(--text); }
.bar-label .icon { font-size: 16px; color: var(--text-3); }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.bar-value small { font-weight: 400; color: var(--text-3); margin-left: 6px; }

.split { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; margin-top: 14px; }
.split span { height: 100%; }
.split .s1 { background: var(--accent); }
.split .s2 { background: var(--text-3); opacity: .55; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table-card { overflow: hidden; }
.table-card .table th:first-child, .table-card .table td:first-child { padding-left: 20px; }
.table-card .table th:last-child, .table-card .table td:last-child { padding-right: 16px; }

.link-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.link-cell-text { min-width: 0; display: flex; flex-direction: column; }
.link-slug { font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.link-slug:hover { color: var(--accent-text); }
.link-dest { font-size: 13px; color: var(--text-3); max-width: 420px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 24px; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.empty-title { font-size: 15px; font-weight: 600; }
.empty-text { font-size: 14px; color: var(--text-2); margin: 4px auto 18px; max-width: 360px; }

/* ---------- Menu (row actions) ---------- */
.menu-wrap { position: relative; display: inline-block; }
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 60;
  min-width: 190px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: left;
  animation: panel-in .12s ease-out;
}
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text); text-align: left; }
.menu-item .icon { font-size: 18px; color: var(--text-3); }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 9, 11, 0.5); backdrop-filter: blur(2px); animation: fade-in .15s; }
.modal-dialog { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); animation: modal-in .18s ease-out; }
.modal-dialog.wide { max-width: 560px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-desc { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Tabs (segmented underline) ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { position: relative; padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 18px; pointer-events: none; }
.search .input { padding-left: 36px; height: 36px; }
.toolbar .spacer { flex: 1; }

/* ==========================================================================
   App shell (signed-in)
   ========================================================================== */
body.app { flex-direction: row; background: var(--bg); }
.sidebar {
  position: sticky; top: 0;
  width: var(--sidebar-w); height: 100vh; flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar-create { margin: 0 4px 16px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 16px 10px 6px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-2); }
.side-link .icon { color: var(--text-3); }
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link.active { background: var(--surface-2); color: var(--text); }
.side-link.active .icon { color: var(--accent-text); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
button.side-link { width: 100%; text-align: left; }
.side-link .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.plan-card { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.plan-card-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.plan-card p { font-size: 12.5px; color: var(--text-2); margin: 4px 0 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); }
.user-chip:hover { background: var(--surface-2); }
.user-chip-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.user-chip-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.user-chip-email { font-size: 12px; color: var(--text-3); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: none; }
.app-content { padding: 32px 40px 64px; max-width: 1200px; width: 100%; }
.mobile-nav { display: none; }

/* ==========================================================================
   Minimal shell (recipients)
   ========================================================================== */
body.minimal { background: var(--bg); }
.min-header { padding: 20px 24px; }
.min-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 48px; }
.min-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 32px; text-align: center; }
.min-card.wide { max-width: 480px; }
.min-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.min-icon .icon { font-size: 26px; }
.min-icon.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.min-icon.warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.min-icon.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.min-icon.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.min-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.min-text { margin-top: 6px; font-size: 14.5px; color: var(--text-2); }
.min-form { margin-top: 24px; text-align: left; }
.min-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.min-footer { padding: 20px; text-align: center; font-size: 13px; color: var(--text-3); }
.min-footer a { color: var(--text-2); font-weight: 500; }
.min-divider { height: 1px; background: var(--border); margin: 24px -32px; }

.file-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.secret-box { margin-top: 20px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); text-align: left; }
.secret-box-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 24px; }
.countdown-unit { padding: 14px 4px 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.countdown-num { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.countdown-label { margin-top: 6px; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.countdown-when { margin-top: 12px; font-size: 13px; color: var(--text-3); }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 56px 16px 0; }
.auth-card { width: 100%; max-width: 400px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head img { width: 40px; height: 40px; margin: 0 auto 16px; }
.auth-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }
.auth-card .segmented { display: flex; margin-bottom: 20px; }
.auth-card .segmented-item { flex: 1; justify-content: center; }
.divider-text { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-google { width: 100%; height: 42px; }
.btn-google svg { width: 18px; height: 18px; }
.auth-legal { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* ---------- Danger zone ---------- */
.danger-zone { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.danger-zone summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone summary .chev { margin-left: auto; transition: transform .15s; }
.danger-zone[open] summary .chev { transform: rotate(180deg); }
.danger-zone-body { padding: 0 20px 20px; }
.danger-zone-body form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.danger-zone-body .input { flex: 1; min-width: 220px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr; margin-top: 64px; }
  .app-content { padding: 24px 24px 96px; }
}

@media (max-width: 860px) {
  body.app { flex-direction: column; }
  .sidebar { display: none; }
  .app-topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 40;
    height: 56px; padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .app-topbar .avatar { margin-left: auto; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    height: 64px; padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
  .mobile-nav a:hover { text-decoration: none; }
  .mobile-nav .active { color: var(--accent-text); }
  .mobile-nav .active .icon { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
  .mobile-nav .nav-create .icon { background: var(--accent); color: #fff; border-radius: 10px; width: 40px; height: 28px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .header-nav { display: none; }
  .header-inner { gap: 12px; }
  .hide-mobile { display: none !important; }
  .hero { padding-top: 48px; }
  .hero-sub { font-size: 15.5px; }
  .composer-row { flex-wrap: wrap; }
  .composer-row > .icon { display: none; }
  .composer-input { flex-basis: 100%; padding: 0 10px; height: 48px; }
  .composer-row .btn { width: 100%; }
  .form-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .result { padding: 18px; }
  .result-main { grid-template-columns: 1fr; }
  .result-qr { display: none; }
  .result-badges { display: none; }
  .page { padding-top: 28px; }
  .page-title { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 24px; }
  .app-content { padding: 20px 16px 96px; }
  .min-card { padding: 24px; }
  .min-divider { margin: 20px -24px; }

  /* Tables collapse into stacked rows */
  .table-responsive thead { display: none; }
  .table-responsive, .table-responsive tbody, .table-responsive tr, .table-responsive td { display: block; width: 100%; }
  .table-responsive tr { padding: 12px 16px; border-bottom: 1px solid var(--border); position: relative; }
  .table-responsive tbody tr:last-child { border-bottom: 0; }
  .table-responsive td { padding: 2px 0; border: 0; }
  .table-card .table-responsive td:first-child { padding-left: 0; }
  .table-responsive td[data-label]::before { content: attr(data-label) ': '; color: var(--text-3); font-size: 12.5px; }
  .table-responsive td.num { text-align: left; }
  .table-responsive td.actions { position: absolute; top: 10px; right: 8px; width: auto; }
  .table-responsive .link-cell { padding-right: 84px; }
  .table-responsive .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
