/* ==========================================================================
   LarisKursi — design system & layout
   Mobile-first. All colors live in CSS custom properties so the dark/light
   toggle only has to swap one block of variables.
   ========================================================================== */

:root {
  /* --- Brand palette (fixed, theme-independent) --- */
  --bg-dark: #0F172A;
  --bg-light: #FFFFFF;
  --accent-emerald: #10B981;
  --accent-blue: #3B82F6;
  --up-color: #22C55E;
  --down-color: #EF4444;

  /* --- Semantic tokens: LIGHT theme (default) --- */
  --bg: #F1F5F9;
  --bg-gradient-a: rgba(59, 130, 246, 0.18);
  --bg-gradient-b: rgba(16, 185, 129, 0.16);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --surface-hover: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0F172A;
  --text-muted: #475569;
  --text-faint: #64748B;
  --input-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.78);
  --grid-line: rgba(15, 23, 42, 0.08);

  /* --- Shape & motion --- */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --blur: 16px;
  --t-fast: 140ms ease;
  --t: 240ms cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

/* --- Semantic tokens: DARK theme --- */
[data-theme="dark"] {
  --bg: var(--bg-dark);
  --bg-gradient-a: rgba(59, 130, 246, 0.22);
  --bg-gradient-b: rgba(16, 185, 129, 0.18);
  --surface: rgba(30, 41, 59, 0.55);
  --surface-solid: #1E293B;
  --surface-hover: rgba(51, 65, 85, 0.65);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.32);
  --text: #F8FAFC;
  --text-muted: #CBD5E1;
  --text-faint: #94A3B8;
  --input-bg: rgba(15, 23, 42, 0.55);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 55px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(15, 23, 42, 0.72);
  --grid-line: rgba(148, 163, 184, 0.14);

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem; /* keeps anchor targets clear of the taller mobile header */
}
@media (min-width: 721px) {
  html { scroll-padding-top: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  /* Two soft radial washes give the glass cards something to blur against */
  background-image:
    radial-gradient(1000px 620px at 12% -10%, var(--bg-gradient-a), transparent 60%),
    radial-gradient(900px 560px at 92% 8%, var(--bg-gradient-b), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t), color var(--t);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.85rem, 4.6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; }
p  { margin: 0 0 0.75em; }

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Numeric figures: tabular so rates never jitter as they update */
.num, .rate-value, .result-input, .pair-summary strong, .stat strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Visible focus for every interactive element */
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald);
  color: #04261A;
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Glass card primitive
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  margin-inline-end: auto;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #04261A;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.05rem; font-weight: 700; }
.brand-text small { font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.12em; text-transform: uppercase; }

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.site-nav a:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }

.header-actions { display: flex; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: translateY(-1px); }

/* Phones: keep the header to two compact rows — brand + actions, then a
   horizontally scrollable nav — instead of letting the links wrap freely. */
@media (max-width: 720px) {
  .header-inner { min-height: 58px; gap: 10px; padding-block: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.15rem; border-radius: 10px; }
  .brand-text strong { font-size: 0.95rem; }
  .brand-text small { display: none; }
  .icon-btn { min-width: 36px; height: 36px; }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 2px;
    margin-top: -4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 6px 10px; font-size: 0.85rem; white-space: nowrap; }
}

/* ==========================================================================
   Hero + calculator
   ========================================================================== */

.hero { padding: clamp(32px, 6vw, 68px) 0 clamp(24px, 4vw, 40px); }

.hero-copy { max-width: 640px; margin-bottom: 28px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.hero-sub { color: var(--text-muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 52ch; }

.calc-card { padding: clamp(18px, 3vw, 28px); }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .calc-grid {
    grid-template-columns: 1.1fr 1fr auto 1.1fr 1fr;
    align-items: end;
  }
  .calc-actions { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22); outline: none; }

.field-amount .input { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; }

.result-input {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  cursor: default;
}
/* Brief pulse whenever a fresh result lands */
.result-input.is-updated { animation: pulse 520ms ease; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
}

.select-wrap { position: relative; display: flex; align-items: center; }
.select-flag {
  position: absolute;
  left: 12px;
  font-size: 1.15rem;
  pointer-events: none;
  line-height: 1;
}
.select { appearance: none; -webkit-appearance: none; padding-left: 42px; padding-right: 34px; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
/* Native option lists follow the OS, so force a readable solid background */
.select option { background: var(--surface-solid); color: var(--text); }

.swap-wrap { display: flex; justify-content: center; align-items: center; padding-bottom: 4px; }

.swap-btn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  font-size: 1.25rem;
  color: #04261A;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  transition: transform var(--t), box-shadow var(--t);
}
.swap-btn:hover { transform: rotate(180deg) scale(1.06); }
.swap-btn:active { transform: rotate(180deg) scale(0.96); }

.calc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.ghost-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }

.primary-btn {
  padding: 13px 22px;
  font: inherit;
  font-weight: 700;
  color: #04261A;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter var(--t-fast), transform var(--t-fast);
}
.primary-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }

.calc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pair-summary { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.pair-summary strong { color: var(--text); font-weight: 700; }

.calc-footer-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.updated-at { font-size: 0.82rem; color: var(--text-faint); }

.error-banner {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--down-color);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: clamp(28px, 5vw, 54px) 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-sub { margin: 0; color: var(--text-muted); font-size: 0.95rem; max-width: 60ch; }
.field-search { min-width: min(280px, 100%); }

/* ==========================================================================
   Rates table
   ========================================================================== */

.table-card { padding: 6px; overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rates-table th,
.rates-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.rates-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rates-table .num { text-align: right; }
.rates-table tbody tr:last-child td { border-bottom: none; }

.rates-table tbody tr.rate-row {
  cursor: pointer;
  transition: background var(--t-fast);
}
.rates-table tbody tr.rate-row:hover,
.rates-table tbody tr.rate-row:focus-within { background: var(--surface-hover); }
.rates-table tbody tr.rate-row.is-selected { background: rgba(59, 130, 246, 0.12); }

.cur-cell { display: flex; align-items: center; gap: 12px; }
.cur-flag { font-size: 1.3rem; line-height: 1; flex: none; }

/* Platforms without flag glyphs (notably Windows) get a country-code chip instead */
.cur-flag.is-code,
.select-flag.is-code {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 21px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.18));
  border: 1px solid var(--border);
}
.select-flag.is-code { width: 26px; height: 18px; font-size: 0.64rem; }
.cur-name { white-space: normal; font-weight: 500; }
.cur-qty { display: block; font-size: 0.76rem; color: var(--text-faint); }

.code-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--input-bg);
  border: 1px solid var(--border);
}

.rate-value { font-size: 1.05rem; font-weight: 700; }

.change { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 0.9rem; }
.change.up   { color: var(--up-color); }
.change.down { color: var(--down-color); }
.change.flat { color: var(--text-faint); }

.alert-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #04261A;
  background: var(--accent-emerald);
}

.empty-state { padding: 26px 16px; text-align: center; color: var(--text-faint); font-size: 0.92rem; }

/* Mobile: each table row becomes a stacked card —
   line 1 is the currency, line 2 is code · change · rate. */
@media (max-width: 640px) {
  .rates-table thead { display: none; }
  .rates-table, .rates-table tbody { display: block; width: 100%; }

  .rates-table tbody tr.rate-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "name name name"
      "code change rate";
    align-items: center;
    gap: 8px 10px;
    margin: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
  }

  .rates-table td { display: block; border-bottom: none; padding: 0; white-space: normal; }
  .rates-table td:first-child { grid-area: name; }
  .rates-table td.cell-code { grid-area: code; justify-self: start; }
  .rates-table td.cell-change { grid-area: change; justify-self: start; }
  .rates-table td:nth-child(3) { grid-area: rate; justify-self: end; text-align: right; }
  .rates-table .rate-value { font-size: 1.15rem; }
}

/* ==========================================================================
   Chart
   ========================================================================== */

.chart-card { padding: clamp(16px, 3vw, 24px); }

.range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 100%;
}

.range-tab {
  padding: 8px 16px;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.range-tab:hover { color: var(--text); }
.range-tab.is-active {
  color: #04261A;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  flex: 1 1 130px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--input-bg);
  border: 1px solid var(--border);
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat strong { font-size: 1.1rem; }
.stat strong.up   { color: var(--up-color); }
.stat strong.down { color: var(--down-color); }

/* Fixed aspect box: reserves layout space before Chart.js ever loads */
.chart-wrap {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vw, 400px);
}
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

.chart-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--surface);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity var(--t);
}
.chart-overlay[hidden] { display: none; }
.chart-overlay p { margin: 0; font-size: 0.92rem; }

.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent-emerald);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.chart-overlay.is-error .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.chart-note { margin: 14px 0 0; font-size: 0.8rem; color: var(--text-faint); }

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert-card { padding: clamp(18px, 3vw, 26px); }

.alert-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: end;
}
@media (min-width: 720px) {
  .alert-form { grid-template-columns: 1.2fr 1.2fr 1fr auto; }
}

.alert-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--input-bg);
  border: 1px solid var(--border);
  transition: border-color var(--t), background var(--t);
}
.alert-item.is-triggered {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
}
.alert-text { flex: 1 1 220px; font-size: 0.93rem; }
.alert-text strong { font-weight: 700; }
.alert-status { font-size: 0.8rem; font-weight: 700; color: var(--text-faint); }
.alert-item.is-triggered .alert-status { color: var(--accent-emerald); }

.remove-btn {
  padding: 6px 11px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--down-color);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.remove-btn:hover { background: rgba(239, 68, 68, 0.2); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 30px;
  padding: 34px 0;
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.footer-inner {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1.2fr; }
}
.footer-brand { font-weight: 700; margin-bottom: 6px; }
.footer-note { margin: 0 0 4px; font-size: 0.85rem; color: var(--text-faint); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }

/* canka.dev blinking cursor credit */
.footer-credit {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.canka-built-link {
  color: var(--accent-emerald);
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.canka-built-link:hover { opacity: 0.8; }
.blink-cursor { animation: blink-caret 1s step-end infinite; }
@keyframes blink-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .blink-cursor { animation: none; }
}

/* ==========================================================================
   Skeletons & toast
   ========================================================================== */

.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--grid-line) 25%, var(--surface-hover) 50%, var(--grid-line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-text { height: 0.95rem; width: 14rem; max-width: 100%; }
.skeleton-row-bar { height: 1.4rem; width: 100%; }
.skeleton-row td { padding: 12px 16px; border-bottom: 1px solid var(--border); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(14px);
  z-index: 90;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--t), transform var(--t);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
