/* e-card — shell shared by the marketing site, auth pages and dashboard.
   Sober light theme: white surfaces, navy type, one blue and one green accent. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f4f8fc;
  --bg-soft: #f7fafd;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --border: #e1e8f0;
  --border-strong: #cfdae6;
  --text: #0f2a43;
  --text-soft: #35516d;
  --muted: #64798f;
  --brand: #1a5c9e;
  --brand-dark: #14497e;
  --brand-soft: #e8f1fa;
  --green: #17b890;
  --green-soft: #e3f7f1;
  --ok: #0f9d6f;
  --danger: #d94a4a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 67, 0.06);
  --shadow: 0 10px 30px rgba(15, 42, 67, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 42, 67, 0.14);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.upper { text-transform: uppercase; letter-spacing: 0.01em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: baseline; gap: 2px; font-size: 1.22rem; letter-spacing: -0.03em; }
.brand .b1 { font-weight: 800; color: var(--text); }
.brand .b2 { font-weight: 500; color: var(--brand); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a.navlink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 0.94rem; font-weight: 500;
}
.site-nav a.navlink:hover { color: var(--brand); background: var(--brand-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; font-family: inherit;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #12a37f; }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-danger { background: #fff; color: var(--danger); border-color: rgba(217, 74, 74, 0.35); }
.btn-block { width: 100%; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card { overflow-wrap: break-word; }
/* Spacing for cards stacked one under another (the dashboard forms). */
.card + .card { margin-top: 20px; }
/* ...but inside a grid the gap already does that, and the sibling margin would
   push every card except the first down and break the row alignment. */
.grid > .card { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.band { background: var(--bg-alt); border-block: 1px solid var(--border); }

/* ---------- Landing ---------- */
.hero { position: relative; padding: 72px 0 76px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -180px auto auto 50%;
  width: 1200px; height: 620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, #eaf2fb, transparent 72%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid; gap: 56px;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--green-soft); border: 1px solid rgba(23, 184, 144, 0.28);
  color: #0d7a5f; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 { text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.12; }
.hero p.lead { font-size: 1.06rem; color: var(--muted); max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.claim {
  display: flex; align-items: center; gap: 6px;
  margin-top: 26px; padding: 5px;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 10px; max-width: 440px;
  box-shadow: var(--shadow-sm);
}
.claim .prefix { padding-left: 12px; color: var(--muted); font-size: 0.94rem; white-space: nowrap; }
.claim input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none; box-shadow: none;
  color: var(--text); font: inherit; font-size: 0.94rem; padding: 8px 4px;
}
.claim input:focus { border: 0; box-shadow: none; }
.claim.is-invalid { border-color: var(--danger); }
.claim-status { min-height: 1.4em; margin: 8px 0 0; font-size: 0.86rem; font-weight: 600; }
.claim-status.is-pending { color: var(--muted); font-weight: 500; }
.claim-status.is-ok { color: var(--ok); }
.claim-status.is-ok::before { content: "✓ "; }
.claim-status.is-error { color: var(--danger); }

/* Phone mock, with the green shape from the brand behind it. */
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual::after {
  content: "";
  position: absolute; right: 4%; top: 16%;
  width: 210px; height: 210px; border-radius: 34px;
  background: var(--green); opacity: 0.9;
  transform: rotate(8deg);
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: 268px; padding: 10px;
  border-radius: 38px;
  background: #16283c;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  border-radius: 30px; overflow: hidden;
  background: #fff;
  padding: 26px 16px 20px;
  text-align: center;
}
.phone-avatar {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 1.25rem;
}
.phone-name { font-weight: 700; font-size: 0.98rem; }
.phone-tag { color: var(--muted); font-size: 0.76rem; margin-bottom: 12px; }
.phone-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 14px; }
.phone-chips span {
  font-size: 0.66rem; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-soft);
}
.phone-link {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; margin-bottom: 7px;
  font-size: 0.78rem; font-weight: 600; text-align: left;
  box-shadow: var(--shadow-sm);
}
.phone-qr {
  margin: 12px auto 0; width: 52px; height: 52px; border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #16283c 0 4px, #fff 4px 8px),
    repeating-linear-gradient(0deg, #16283c 0 4px, #fff 4px 8px);
  background-blend-mode: multiply;
  opacity: 0.85;
}

.section { padding: 76px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head p { color: var(--muted); margin: 0; }
.kicker {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}

/* Fixed 3-up grid: auto-fit would give 4 columns then 2 on a wide screen.
   grid-auto-rows keeps every row the same height, so all six cards match. */
.feature-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.feature { padding: 26px; display: flex; flex-direction: column; }
.feature .ico {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 16px;
}
.feature.green .ico { background: var(--green-soft); color: #0d7a5f; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* ---------- Dashboard showcase ----------
   The panels reuse the real dashboard components (.card, .stat, .chart, .rows,
   .theme-picker...) with sample data, so the landing page cannot drift away from
   what the product actually looks like. Only inert stand-ins are defined here. */
.screens { --chrome: #16283c; }
.screens-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.screens-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.screens-tabs label {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff;
  color: var(--text-soft); font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.screens-tabs label:hover { border-color: var(--brand); color: var(--brand); }
.screens-tabs input:checked + label {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.screens-tabs input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

.screens-window {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); background: #fff;
  box-shadow: var(--shadow-lg);
}
.screens-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--chrome);
}
.screens-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.screens-chrome .url {
  margin-left: 10px; padding: 3px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75);
  font-size: 0.76rem;
}
.screens-stage { background: var(--bg-alt); padding: 22px; }
.screen { display: none; }
.screens:has(#screen-profile:checked) [data-screen="profile"],
.screens:has(#screen-links:checked) [data-screen="links"],
.screens:has(#screen-appearance:checked) [data-screen="appearance"],
.screens:has(#screen-stats:checked) [data-screen="stats"] { display: block; }
/* No :has() support: show the first panel rather than an empty frame. */
@supports not selector(:has(*)) {
  .screens-tabs { display: none; }
  .screen:first-child { display: block; }
}
.screen-title { font-size: 1.15rem; margin: 0 0 16px; }

/* Inert stand-ins for form controls: they must look like the real thing without
   inviting a click on a page where they would do nothing. */
.mock-field { margin-bottom: 14px; }
.mock-field > span {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-soft); margin-bottom: 5px;
}
.mock-input {
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 13px; font-size: 0.92rem; color: var(--text);
}
.mock-input.placeholder { color: #9fb0c1; }
.mock-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 0.88rem; font-weight: 600;
}
.mock-btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border-strong); }
.mock-check {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-soft);
}
.mock-check i {
  width: 16px; height: 16px; border-radius: 4px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-size: 0.62rem; font-style: normal;
}
.mock-swatch {
  display: block; height: 54px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); position: relative; overflow: hidden;
}
.mock-swatch.on { outline: 2px solid var(--brand); outline-offset: 2px; }
.mock-swatch span {
  position: absolute; inset: auto 0 0 0; padding: 3px 6px; text-align: center;
  background: rgba(15, 42, 67, 0.6); color: #fff; font-size: 0.68rem;
}

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: center; padding: 4px; }
.slide-inner {
  display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 44px 44px 48px;
  box-shadow: var(--shadow-sm);
  min-height: 340px;
}
.slide-step {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
.slide-step i {
  display: grid; place-items: center; font-style: normal;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 0.78rem; letter-spacing: 0;
}
.slide h3 { font-size: 1.5rem; margin-bottom: 10px; }
.slide p { color: var(--muted); margin: 0; max-width: 46ch; }
.slide ul { margin: 14px 0 0; padding: 0; list-style: none; }
.slide ul li { position: relative; padding-left: 24px; color: var(--text-soft); font-size: 0.94rem; }
.slide ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}

/* Small illustrations drawn in CSS, one per slide. */
.slide-art {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  min-height: 240px;
  display: grid; align-content: start; gap: 9px;
}
.art-line { height: 11px; border-radius: 5px; background: var(--surface-2); }
.art-line.w60 { width: 60%; }
.art-line.w40 { width: 40%; }
.art-line.w80 { width: 80%; }
.art-line.brand { background: var(--brand); opacity: 0.85; }
.art-line.green { background: var(--green); opacity: 0.85; }
.art-tile {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; font-size: 0.8rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.art-tile .dot { width: 20px; height: 20px; border-radius: 6px; background: var(--brand-soft); display: grid; place-items: center; font-size: 0.72rem; }
.art-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 6px;
}
.art-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.art-chips span {
  font-size: 0.72rem; padding: 3px 10px; border-radius: 999px;
  background: var(--green-soft); color: #0d7a5f; font-weight: 600;
}
.art-qr {
  width: 96px; height: 96px; margin: 6px auto; border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, #16283c 0 6px, #fff 6px 12px),
    repeating-linear-gradient(0deg, #16283c 0 6px, #fff 6px 12px);
  background-blend-mode: multiply;
  opacity: 0.85;
}
.art-bars { display: flex; align-items: flex-end; gap: 7px; height: 96px; }
.art-bars i { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; opacity: 0.85; }
.art-bars i:nth-child(even) { background: var(--green); }

.carousel-controls {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 26px;
}
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border-strong); color: var(--text);
  cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.carousel-btn:hover { border-color: var(--brand); color: var(--brand); }
.carousel-btn[disabled] { opacity: 0.4; cursor: default; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  border: 0; background: var(--border-strong); cursor: pointer;
  transition: background 0.16s ease, width 0.16s ease;
}
.carousel-dots button[aria-current="true"] { background: var(--brand); width: 26px; border-radius: 999px; }

.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.cta {
  background: #16283c;
  border-radius: var(--radius);
  padding: 56px 32px;
  text-align: center;
  color: #fff;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.72); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 36px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.site-footer nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--brand); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-soft); margin-bottom: 6px;
}
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit; font-size: 0.95rem;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #9fb0c1; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type="color"] { padding: 4px; height: 44px; cursor: pointer; max-width: 90px; }
input[type="file"] { font-size: 0.9rem; max-width: 100%; }
textarea { resize: vertical; }
.help { font-size: 0.82rem; color: var(--muted); margin-top: 5px; }
ul.errorlist { color: var(--danger); font-size: 0.85rem; margin: 5px 0 0; padding: 0; list-style: none; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.check label { margin: 0; font-size: 0.95rem; color: var(--text); font-weight: 500; }

/* ---------- Messages ---------- */
.messages { display: grid; gap: 10px; margin-bottom: 22px; }
.msg {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-alt);
  font-size: 0.92rem;
}
.msg.success { border-color: rgba(15, 157, 111, 0.35); color: #0b7c57; background: var(--green-soft); }
.msg.error { border-color: rgba(217, 74, 74, 0.35); color: #b13a3a; background: #fdeeee; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 48px 20px; background: var(--bg-alt); }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 1.6rem; text-transform: none; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.auth-alt a { color: var(--brand); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 72px); }
.dash-nav { border-right: 1px solid var(--border); background: var(--bg-alt); padding: 26px 16px; }
.dash-toggle { display: none; }
.dash-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 0.93rem; font-weight: 500; margin-bottom: 3px;
}
.dash-side a:hover { background: #fff; color: var(--text); }
.dash-side a.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.dash-side .ico { font-size: 1rem; line-height: 1; }
.dash-main { padding: 34px 32px 80px; max-width: 940px; }
.dash-head { margin-bottom: 26px; }
.dash-head h1 { font-size: 1.5rem; margin: 0; }

.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 20px; }
.stat .value { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; }
.stat .label { font-size: 0.82rem; color: var(--muted); }
.stat .trend { margin-top: 6px; font-size: 0.78rem; font-weight: 600; }
.stat .trend.is-up { color: var(--ok); }
.stat .trend.is-down { color: var(--danger); }
.stat .trend .muted { font-weight: 500; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; margin-top: 8px; }
.chart .bar {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 2px; height: 100%; min-width: 4px;
}
.chart .bar i { display: block; border-radius: 3px 3px 0 0; }
.chart .bar .v { background: var(--brand); }
.chart .bar .c { background: var(--green); }
.legend { display: flex; gap: 16px; font-size: 0.82rem; color: var(--muted); margin-top: 12px; flex-wrap: wrap; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

.rows { display: grid; gap: 10px; }
.row-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.row-item .grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.link-row {
  display: grid; gap: 14px; grid-template-columns: 34px 1fr 160px;
  align-items: start;
  padding: 16px; margin-bottom: 10px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.link-row .handle { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.link-row .handle button {
  background: #fff; border: 1px solid var(--border-strong); color: var(--muted);
  border-radius: 6px; width: 28px; height: 22px; cursor: pointer; line-height: 1; font-size: 0.7rem;
}
.link-row .handle button:hover { color: var(--brand); border-color: var(--brand); }
.link-row .fields { display: grid; gap: 10px; }
.link-row .fields .field { margin: 0; }
.link-row .side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.order-input { width: 100%; }
.link-row.is-deleted { opacity: 0.4; }
.hidden-field { display: none; }
.platform-badge { font-size: 0.75rem; color: var(--muted); }

.theme-picker { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.theme-picker label { cursor: pointer; position: relative; display: block; }
.theme-picker input { position: absolute; opacity: 0; pointer-events: none; }
.swatch {
  display: block; border-radius: var(--radius-sm);
  height: 84px; border: 1px solid var(--border-strong);
  position: relative; overflow: hidden;
}
.theme-picker input:checked + .swatch { outline: 2px solid var(--brand); outline-offset: 2px; }
.swatch span {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(15, 42, 67, 0.62); color: #fff;
  font-size: 0.75rem; padding: 4px 8px; text-align: center;
}
/* One swatch per Theme value in profiles/models.py; the gradients mirror the
   --bg-a / --bg-b pair of the matching .theme-* block in card.css. */
.theme-swatch-daylight { background: linear-gradient(160deg, #ffffff, #eef4fa); }
.theme-swatch-paper    { background: linear-gradient(160deg, #fdfcfa, #f1ede5); }
.theme-swatch-sand     { background: linear-gradient(160deg, #fdf4e7, #f4e2c8); }
.theme-swatch-mint     { background: linear-gradient(160deg, #f0fbf6, #d9f0e6); }
.theme-swatch-candy    { background: linear-gradient(160deg, #ffe6f2, #e6ecff); }
.theme-swatch-slate    { background: linear-gradient(160deg, #f6f8fb, #e2e8f0); }
.theme-swatch-midnight { background: linear-gradient(160deg, #17122e, #08060f); }
.theme-swatch-ocean    { background: linear-gradient(160deg, #0b2545, #04101f); }
.theme-swatch-forest   { background: linear-gradient(160deg, #0d2b25, #05130f); }
.theme-swatch-sunset   { background: linear-gradient(160deg, #3b1046, #170a1f); }
.theme-swatch-berry    { background: linear-gradient(160deg, #3d0f2b, #180614); }
.theme-swatch-mono     { background: linear-gradient(160deg, #111111, #000000); }

/* Live preview of the public page, rendered in an iframe so card.css cannot
   collide with the dashboard stylesheet. */
.preview-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.preview-panel { position: sticky; top: 92px; }
.preview-frame {
  width: 100%; height: 620px; border: 0; display: block;
  border-radius: 26px; background: #fff;
}
.preview-shell {
  padding: 10px; border-radius: 34px;
  background: #16283c; box-shadow: var(--shadow-lg);
}
.preview-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin: 12px 0 0; }

.radio-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-inline label {
  position: relative;
  padding: 8px 15px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: #fff;
  cursor: pointer; font-size: 0.9rem;
}
.radio-inline input { position: absolute; opacity: 0; }
.radio-inline label:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600;
}

.qr-box { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.qr-box img { background: #fff; border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-sm); width: 190px; }

.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9rem; }

.avatar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 10px; }
.avatar-row .grow { flex: 1 1 220px; min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.file-current { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 10px; }
.file-current .help { margin: 0; }
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 1.25rem; flex: none;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-size: 0.78rem; padding: 4px 11px; border-radius: 999px;
  background: var(--green-soft); border: 1px solid rgba(23, 184, 144, 0.25); color: #0d7a5f;
}

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- Directory ---------- */
.profile-card { display: block; transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.profile-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.profile-card .avatar-row { margin-bottom: 12px; }
.profile-card strong { display: block; }

.directory-search { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.directory-search input[type="search"] {
  flex: 1 1 260px; min-width: 0;
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 0.95rem; padding: 11px 13px; outline: none;
}
.directory-search input[type="search"]:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.directory-search select { flex: 0 1 200px; }

.tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.tag-filter .tag { transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease; }
a.tag:hover { border-color: var(--green); background: #fff; }
a.tag.is-active { background: var(--green); border-color: var(--green); color: #fff; }
a.tag.is-active .muted { color: rgba(255, 255, 255, 0.8); }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 32px; font-size: 0.9rem;
}

.legal-body h2 { font-size: 1.2rem; margin-top: 34px; }
.legal-body { color: var(--text-soft); }
.legal-body strong { color: var(--text); }

@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .section { padding: 56px 0; }
  .slide-inner { grid-template-columns: 1fr; padding: 30px 24px; gap: 26px; min-height: 0; }
  /* Stacked layout: the illustration reads as the card header, above the text. */
  .slide-art { order: -1; min-height: 0; }
  /* Stacked layout: the menu must keep its own height, otherwise the grid
     stretches that row to fill min-height and the tiles grow with it. */
  .dash { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* Unfolded: labelled tiles, every section visible at once. */
  .dash-nav { border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .dash-side {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px;
  }
  .dash-side a {
    flex-direction: column; justify-content: center; gap: 6px;
    margin: 0; padding: 12px 6px;
    text-align: center; font-size: 0.78rem; line-height: 1.25;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  }
  .dash-side a.active { border-color: var(--brand); }
  .dash-side .ico { font-size: 1.25rem; }

  /* Folded: one row of icons. The labels are dropped from the page, so each
     link carries an aria-label to keep its accessible name. */
  .dash-nav.is-compact .dash-side { display: flex; gap: 6px; }
  .dash-nav.is-compact .dash-side a { flex: 1; padding: 9px 4px; }
  .dash-nav.is-compact .dash-side .label { display: none; }
  .dash-nav.is-compact .dash-side .ico { font-size: 1.2rem; }

  .dash-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin-top: 6px; padding: 4px;
    border: 0; background: none; color: var(--muted);
    cursor: pointer; border-radius: var(--radius-sm);
  }
  .dash-toggle:hover { color: var(--brand); background: #fff; }
  .dash-toggle svg { transition: transform 0.18s ease; }
  /* Chevrons point down to unfold, up to fold back. */
  .dash-nav:not(.is-compact) .dash-toggle svg { transform: rotate(180deg); }
  .dash-main { padding: 24px 16px 60px; }
  /* Full-width submit buttons: easier to reach with a thumb. */
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .dash-head { gap: 10px; }
  .dash-head .spacer { display: none; }
  .card { padding: 20px 18px; }
  .qr-box img { width: 100%; max-width: 220px; }
  .screens-stage { padding: 14px; }
  .screens-tabs label { padding: 7px 14px; font-size: 0.84rem; }
  .preview-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; order: -1; max-width: 340px; margin: 0 auto; }
  .preview-frame { height: 520px; }
  .link-row { grid-template-columns: 1fr; }
  .link-row .handle { flex-direction: row; }
  .link-row .side { flex-direction: row; align-items: center; flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  /* Kept as a compact header so the slide, its text and the arrows still fit
     one screen: every element inside the illustration is scaled down. */
  .slide-art { padding: 14px; gap: 6px; }
  .art-line { height: 8px; }
  .art-tile { padding: 6px 9px; font-size: 0.74rem; }
  .art-tile .dot { width: 17px; height: 17px; border-radius: 5px; font-size: 0.66rem; }
  .art-avatar { width: 40px; height: 40px; font-size: 0.85rem; margin-bottom: 2px; }
  .art-chips span { font-size: 0.68rem; padding: 2px 8px; }
  .art-qr { width: 64px; height: 64px; margin: 2px auto; }
  .art-bars { height: 56px; gap: 5px; }
  .slide-inner { padding: 22px 20px; gap: 20px; }
  .slide h3 { font-size: 1.25rem; }
  .section-head { margin-bottom: 28px; }
  /* Stacked footer: margin-left:auto would shove the wrapped nav to the right. */
  .site-footer { text-align: center; }
  .site-footer .wrap { flex-direction: column; gap: 14px; }
  .site-footer nav { margin-left: 0; justify-content: center; gap: 12px 20px; }
  .carousel-controls { margin-top: 20px; }
  /* Two buttons of different widths wrapping onto two lines read as ragged:
     on a phone they stack full width instead. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { scroll-behavior: auto; }
}
