/* ===================================
   Faro product page (faro.html)
   Builds on site.css tokens; Faro brand colours on top.
   =================================== */

:root,
[data-theme="dark"] {
  --f-primary:  #5fb8d6;
  --f-primary-ink: #06222c;
  --f-soft:     rgba(95, 184, 214, 0.12);
  --f-gold:     #ffd866;
  --f-gold-ink: #2f2100;
  --f-ok:       #5ed39a;
  --f-bad:      #ff8a80;
  --f-warn:     #ffd866;
  --f-shadow:   0 18px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --f-primary:  #1a6b8a;
  --f-primary-ink: #ffffff;
  --f-soft:     rgba(26, 107, 138, 0.09);
  --f-ok:       #1b7f4b;
  --f-bad:      #b3261e;
  --f-warn:     #8a5a00;
  --f-shadow:   0 18px 44px rgba(16, 52, 66, 0.16);
}

[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

/* ---------- Buttons ---------- */
.f-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 11px 24px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.f-btn:hover { transform: translateY(-2px); opacity: 1; }
.f-btn:active { transform: translateY(0); }
.f-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.f-btn-gold { background: var(--f-gold); color: var(--f-gold-ink); }
.f-btn-gold:hover { color: var(--f-gold-ink); box-shadow: 0 10px 30px rgba(255, 216, 102, 0.4); }

.f-btn-primary { background: var(--f-primary); color: var(--f-primary-ink); }
.f-btn-primary:hover { color: var(--f-primary-ink); box-shadow: 0 8px 22px rgba(26, 107, 138, 0.35); }

.f-btn-ghost { background: transparent; border-color: var(--f-primary); color: var(--f-primary); }
.f-btn-ghost:hover { background: var(--f-soft); color: var(--f-primary); }
.fh-hero .f-btn-ghost,
.f-btn-ghost.light { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.fh-hero .f-btn-ghost:hover,
.f-btn-ghost.light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.f-btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.f-btn-block { width: 100%; }

.f-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--f-primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Generic section bits ---------- */
.f-section { position: relative; }
/* Anchored sections stop below the sticky navbar */
.faro-page section[id] { scroll-margin-top: 62px; }
.f-alt { background: var(--bg-alt); }

.f-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.f-kicker {
  display: inline-block;
  color: var(--f-primary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.f-title { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.2; margin: 0 0 14px; color: var(--text); }
.f-sub { color: var(--text-muted); font-size: 1.02rem; line-height: 1.75; margin: 0; }
.f-sub strong { color: var(--text); }

.f-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}
.f-card + .f-card,
form.f-card { margin-top: 16px; }
.split-col > .f-card:first-child { margin-top: 0; }
.f-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}
.f-card-title .ico { color: var(--f-primary); }
.f-card-title.small { font-size: 0.95rem; margin-top: 18px; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.muted { color: var(--text-muted); font-weight: 400; font-size: 0.9rem; }
.tiny { font-size: 0.78rem; line-height: 1.6; margin: 12px 0 0; }

.f-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.f-badge img { border-radius: 22%; }

/* ---------- Language switch (navbar) ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none !important;
}
.lang-switch span {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}
.lang-switch .cur { background: rgba(255, 255, 255, 0.95); color: #0b3e4a; }
.lang-switch:hover span:not(.cur) { background: rgba(255, 255, 255, 0.18); }
@media (max-width: 991px) {
  .lang-switch { margin: 6px 10px 6px 0; }
  #navbarMain .lang-switch,
  #navbarMain .theme-toggle { display: inline-flex; vertical-align: middle; }
}

/* ===================================
   HERO
   =================================== */
.fh-hero {
  position: relative;
  min-height: min(92vh, 860px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 110%, rgba(255, 216, 102, 0.10), transparent 60%),
    linear-gradient(180deg, #06121f 0%, #0b1f33 45%, #163f5e 80%, #1c4e73 100%);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.fh-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 42%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 35% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 57% 8%, #dff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 74% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 34%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 58%, #dff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 4%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 48%, #fff 50%, transparent 51%);
  opacity: 0.8;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.9; } }

/* Beam: positioned on the lamp by JS, rotated around its left edge */
.fh-beam {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
}
.fh-beam-cone {
  position: absolute;
  left: 0;
  top: -320px;
  width: 2000px;
  height: 640px;
  transform-origin: 0 50%;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  background: linear-gradient(90deg, rgba(255, 230, 150, 0.75) 0%, rgba(255, 216, 102, 0.3) 25%, rgba(255, 216, 102, 0.07) 65%, transparent 100%);
  filter: blur(2px);
  mix-blend-mode: screen;
}
.fh-beam-cone.back {
  transform: rotate(180deg);
  opacity: 0.35;
}

.fh-words {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.fh-words li {
  position: absolute;
  white-space: nowrap;
  font-weight: 600;
  font-size: clamp(0.78rem, 1.3vw, 1rem);
  color: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  transition: color 1.8s ease, background 1.8s ease, border-color 1.8s ease, transform 1.8s ease, text-shadow 1.8s ease;
}
.fh-words li.lit {
  color: #fff6d8;
  background: rgba(255, 216, 102, 0.12);
  border-color: rgba(255, 216, 102, 0.45);
  text-shadow: 0 0 18px rgba(255, 216, 102, 0.9);
  transform: scale(1.06);
  transition-duration: 0.18s;
}

.fh-hero-inner { position: relative; z-index: 3; padding-top: 80px; padding-bottom: 160px; }
.fh-hero-copy { max-width: 620px; }
.fh-hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 22px 0 18px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.fh-lead { font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.7; color: rgba(255, 255, 255, 0.86); margin: 0 0 28px; max-width: 540px; }
.fh-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.fh-ctas.center { justify-content: center; }
.fh-note { margin: 22px 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); display: flex; align-items: center; gap: 10px; }

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5ed39a;
  box-shadow: 0 0 0 0 rgba(94, 211, 154, 0.7);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(94, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 211, 154, 0); }
}

.fh-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 70px;
  z-index: 3;
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  transition: opacity 0.6s;
}
.fh-hint.gone { opacity: 0; }
@media (pointer: coarse), (max-width: 767px) { .fh-hint { display: none; } }

.fh-lighthouse {
  position: absolute;
  right: clamp(8px, 9vw, 160px);
  bottom: 38px;
  height: min(62%, 480px);
  width: auto;
  z-index: 2;
  overflow: visible;
}
.lh-rock { fill: #3c4a57; }
.lh-tower { fill: #f5f7fa; }
.lh-stripe,
.lh-roof { fill: #e04646; }
.lh-shade { fill: #000; fill-opacity: 0.12; }
.lh-dark { fill: #37474f; }
.lh-glass { fill: #ffd866; stroke: #37474f; stroke-width: 1.1; }
.lh-frame { stroke: #37474f; stroke-width: 1.1; }
#lamp { fill: #fff6d0; }
.lh-glow { animation: glow 2.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes glow { from { opacity: 0.7; transform: scale(0.9); } to { opacity: 1; transform: scale(1.15); } }

.fh-sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  width: 100%;
  z-index: 2;
}
.wave { animation: drift 14s linear infinite; }
.wave.w1 { fill: rgba(91, 180, 229, 0.3); stroke: rgba(91, 180, 229, 0.8); stroke-width: 2; }
.wave.w2 { fill: var(--bg); animation-duration: 9s; animation-direction: reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-720px); } }

@media (max-width: 1199px) {
  .fh-words li:nth-child(n + 8) { display: none; }
}
@media (max-width: 767px) {
  .fh-hero { min-height: 640px; align-items: flex-start; }
  .fh-hero-inner { padding-top: 48px; padding-bottom: 230px; }
  .fh-lighthouse { height: 220px; right: 12px; bottom: 30px; }
  .fh-words { display: none; }
}

/* ===================================
   WHY – chaos to order
   =================================== */
.f-split-head {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.f-split-head .f-sub { margin-bottom: 26px; }
@media (max-width: 991px) { .f-split-head { grid-template-columns: 1fr; } }

.chaos {
  position: relative;
  height: 400px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 50%, var(--f-soft), transparent 70%),
    var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
}
.chaos-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  transition: all 0.7s cubic-bezier(.2, .9, .3, 1.3) 0.25s;
}
.chaos-core img { border-radius: 22%; box-shadow: 0 10px 40px rgba(11, 31, 51, 0.55); }

.chaos-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--f-shadow);
  white-space: nowrap;
  transition: transform 0.8s cubic-bezier(.6, -0.3, .3, 1.2), opacity 0.6s ease;
  animation: wobble 4s ease-in-out infinite alternate;
}
.chaos-chip em { font-style: normal; font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }
.chaos-chip .ico { color: var(--f-primary); }
.chaos-chip.c1 { transform: translate(-108%, -175%) rotate(-7deg); }
.chaos-chip.c2 { transform: translate(8%, -150%) rotate(5deg); animation-delay: -1s; }
.chaos-chip.c3 { transform: translate(-125%, -30%) rotate(4deg); animation-delay: -2s; }
.chaos-chip.c4 { transform: translate(12%, -10%) rotate(-6deg); animation-delay: -0.5s; }
.chaos-chip.c5 { transform: translate(-90%, 100%) rotate(-3deg); animation-delay: -1.5s; }
.chaos-chip.c6 { transform: translate(5%, 125%) rotate(7deg); animation-delay: -2.5s; }
@keyframes wobble { from { margin-top: -4px; } to { margin-top: 4px; } }

.chaos.tidy .chaos-chip { transform: translate(-50%, -50%) scale(0.2) rotate(0); opacity: 0; animation: none; }
.chaos.tidy .chaos-core { transform: translate(-50%, -50%) scale(1); opacity: 1; }

@media (max-width: 575px) {
  .chaos { height: 380px; }
  .chaos-chip { font-size: 0.75rem; padding: 8px 10px; }
  .chaos-chip em { display: none; }
  .chaos-chip.c1 { transform: translate(-100%, -220%) rotate(-7deg); }
  .chaos-chip.c2 { transform: translate(4%, -170%) rotate(5deg); }
  .chaos-chip.c3 { transform: translate(-110%, -50%) rotate(4deg); }
  .chaos-chip.c4 { transform: translate(10%, 10%) rotate(-6deg); }
  .chaos-chip.c5 { transform: translate(-100%, 150%) rotate(-3deg); }
  .chaos-chip.c6 { transform: translate(6%, 210%) rotate(7deg); }
}

/* ===================================
   SPLITTER
   =================================== */
.split-app {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 991px) { .split-app { grid-template-columns: 1fr; } }
.split-col { min-width: 0; }

.people { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  background: var(--f-soft);
  font-weight: 600;
  font-size: 0.88rem;
  animation: pop 0.35s cubic-bezier(.2, .9, .3, 1.4);
}
.person button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.person button:hover { background: rgba(255, 138, 128, 0.18); color: var(--f-bad); }
.person button:disabled { visibility: hidden; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #06222c;
  flex-shrink: 0;
}
.av0 { background: #5fb8d6; }
.av1 { background: #ffd866; }
.av2 { background: #f49a8e; }
.av3 { background: #8fdcb0; }
.av4 { background: #c3a6f2; }
.av5 { background: #f7b267; }

.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

.faro-page input[type="text"],
.faro-page input[type="number"],
.faro-page select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faro-page input:focus,
.faro-page select:focus { outline: none; border-color: var(--f-primary); box-shadow: 0 0 0 3px var(--f-soft); }

.join-prompt {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed var(--f-primary);
  background: var(--f-soft);
  animation: pop 0.3s ease;
}
.join-prompt p { margin: 0 0 10px; font-size: 0.9rem; }
.join-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.field { margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.field label,
.field legend { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; float: none; width: auto; padding: 0; }
.field-row { display: flex; gap: 12px; }
.field.grow { flex: 1; min-width: 0; }
.field.amount { width: 130px; flex-shrink: 0; }

.share-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.share-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.share-chip .avatar { width: 22px; height: 22px; font-size: 0.7rem; opacity: 0.4; transition: opacity 0.15s; }
.share-chip[aria-pressed="true"] { border-color: var(--f-primary); color: var(--text); background: var(--f-soft); }
.share-chip[aria-pressed="true"] .avatar { opacity: 1; }

.expense-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.expense-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.35s ease;
}
.expense-list li:last-child { border-bottom: 0; }
.expense-list .desc { min-width: 0; }
.expense-list .desc strong { display: block; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-list .desc small { color: var(--text-muted); font-size: 0.75rem; }
.expense-list .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.icon-btn:hover { background: rgba(255, 138, 128, 0.15); color: var(--f-bad); }
.empty { color: var(--text-muted); font-size: 0.88rem; padding: 6px 0; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }


.compare { display: flex; align-items: center; gap: 12px; }
.compare-item {
  flex: 1;
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-alt);
  text-align: center;
}
.compare-item.best { background: var(--f-soft); outline: 1.5px solid var(--f-primary); }
.compare-num { display: block; font-size: 2.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.compare-item.best .compare-num { color: var(--f-primary); }
.compare-item:not(.best) .compare-num { color: var(--text-muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(255, 138, 128, 0.7); }
.compare-label { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.compare-vs { color: var(--text-muted); font-size: 1.4rem; }
.bump { animation: bump 0.45s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }

.debt-graph { width: 100%; height: auto; margin: 10px 0 0; display: block; overflow: visible; }
.g-node circle { stroke: var(--card-bg); stroke-width: 3; }
.g-node text { font-size: 13px; font-weight: 700; fill: #06222c; dominant-baseline: central; }
.g-node .g-name { fill: var(--text); font-size: 11px; font-weight: 600; }
.g-node .g-bal { font-size: 10px; font-weight: 600; }
.g-bal.pos { fill: var(--f-ok); }
.g-bal.neg { fill: var(--f-bad); }
.g-bal.zero { fill: var(--text-muted); }
.g-node.c0 circle { fill: #5fb8d6; }
.g-node.c1 circle { fill: #ffd866; }
.g-node.c2 circle { fill: #f49a8e; }
.g-node.c3 circle { fill: #8fdcb0; }
.g-node.c4 circle { fill: #c3a6f2; }
.g-node.c5 circle { fill: #f7b267; }
.g-edge {
  fill: none;
  stroke: var(--f-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 0.9s ease forwards;
}
.arrow-head { fill: var(--f-primary); }
.g-label rect { fill: var(--card-bg); stroke: var(--f-primary); stroke-width: 1; }
.g-label text { fill: var(--text); font-size: 10.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.g-label { opacity: 0; animation: fadeUp 0.4s ease 0.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { to { opacity: 1; } }
.g-done { font-size: 14px; font-weight: 700; fill: var(--f-ok); text-anchor: middle; }

.transfer-list { list-style: none; margin: 0; padding: 0; }
.transfer-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-alt);
  margin-bottom: 8px;
  font-size: 0.88rem;
  animation: slideIn 0.35s ease;
}
.transfer-list .avatar { width: 24px; height: 24px; font-size: 0.7rem; }
.transfer-list .t-arrow { color: var(--text-muted); }
.transfer-list .t-amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.transfer-list .settle {
  border: 1.5px solid var(--f-ok);
  color: var(--f-ok);
  background: transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  cursor: pointer;
}
.transfer-list .settle:hover { background: var(--f-ok); color: var(--card-bg); }
.transfer-list li.all-good { justify-content: center; color: var(--f-ok); font-weight: 600; background: transparent; }

.balance-list { list-style: none; margin: 0; padding: 0; }
.balance-list li {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 82px;
  align-items: center;
  gap: 0;
  font-size: 0.85rem;
  padding: 5px 0;
}
.balance-list .b-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; }
.balance-list .b-neg,
.balance-list .b-pos { height: 12px; position: relative; }
.balance-list .b-neg { border-right: 1px solid var(--border); }
.balance-list .b-neg span,
.balance-list .b-pos span { position: absolute; top: 0; bottom: 0; width: 0; transition: width 0.6s cubic-bezier(.2, .9, .3, 1); }
.balance-list .b-neg span { right: 0; background: var(--f-bad); border-radius: 6px 0 0 6px; }
.balance-list .b-pos span { left: 0; background: var(--f-ok); border-radius: 0 6px 6px 0; }
.balance-list .b-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.b-val.pos { color: var(--f-ok); }
.b-val.neg { color: var(--f-bad); }

/* ===================================
   FEATURES – tabs + phone
   =================================== */
.explorer {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: center;
}
@media (max-width: 991px) { .explorer { grid-template-columns: 1fr; gap: 32px; } }

.feat-tabs { display: flex; flex-direction: column; gap: 8px; }
.feat-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}
.feat-tab > .ico { width: 22px; height: 22px; color: var(--text-muted); margin-top: 2px; transition: color 0.2s; }
.feat-tab strong { display: block; font-size: 0.98rem; }
.feat-tab small { display: block; color: var(--text-muted); font-size: 0.83rem; line-height: 1.5; margin-top: 2px; }
.feat-tab:hover { background: var(--f-soft); }
.feat-tab[aria-selected="true"] { background: var(--card-bg); border-color: var(--border); box-shadow: var(--f-shadow); }
.feat-tab[aria-selected="true"] > .ico { color: var(--f-primary); }
.feat-tab::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--f-primary);
}
.feat-tab.timing::after { animation: progress var(--feat-ms, 6500ms) linear forwards; }
@keyframes progress { to { width: 100%; } }

@media (max-width: 991px) {
  .feat-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; order: 2; }
  .feat-tab { flex: 0 0 230px; scroll-snap-align: start; border-color: var(--border); }
  .phone-wrap { order: 1; }
}

.phone-wrap { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 320px;
  max-width: 100%;
  height: 650px;
  border-radius: 46px;
  background: var(--bg);
  border: 10px solid #0a0f14;
  box-shadow: 0 0 0 2px #2a333c, var(--f-shadow), 0 40px 80px -20px rgba(26, 107, 138, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
[data-theme="light"] .phone { background: #f7fafb; }
.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 26px;
  background: #0a0f14;
  border-radius: 20px;
  z-index: 5;
}
.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px 0;
  height: 40px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.screen {
  flex: 1;
  overflow: hidden;
  padding: 8px 16px 12px;
  animation: screenIn 0.45s cubic-bezier(.2, .9, .3, 1);
}
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.phone-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.phone-nav .on { color: var(--f-primary); font-weight: 700; }

.phone-toast {
  position: absolute;
  top: 46px;
  left: 12px;
  right: 12px;
  z-index: 6;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(20, 32, 40, 0.92);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-30px);
  transition: transform 0.45s cubic-bezier(.2, .9, .3, 1.2), opacity 0.3s ease, visibility 0.3s;
}
.phone-toast.show { opacity: 1; visibility: visible; transform: translateY(0); }
.phone-toast strong { display: block; color: var(--f-gold); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }

.scr-hero {
  height: 120px;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.scr-hero.sicily { background: linear-gradient(160deg, #f6b26b 0%, #e0765a 40%, #1a6b8a 100%); }
.scr-hero::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 240, 200, 0.45);
}
.scr-hero-title { font-weight: 700; font-size: 1.1rem; position: relative; z-index: 1; }
.scr-hero-sub { font-size: 0.75rem; opacity: 0.9; position: relative; z-index: 1; }

.mini-map { width: 100%; height: auto; margin: 10px 0 4px; }
.mini-map .island { fill: var(--f-soft); stroke: var(--border); }
.mini-map .route-line { fill: none; stroke: var(--f-primary); stroke-width: 3; stroke-dasharray: 300; stroke-dashoffset: 300; stroke-linecap: round; }
.screen:not([hidden]) .route-line { animation: draw 1.6s ease 0.2s forwards; }
.mini-map .route-dot { fill: var(--f-gold); stroke: var(--bg); stroke-width: 2; }

.stop-list { list-style: none; margin: 0; padding: 0; }
.stop-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  font-size: 0.8rem;
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
}
.stop-list li:nth-child(2) { animation-delay: 0.1s; }
.stop-list li:nth-child(3) { animation-delay: 0.2s; }
.stop-list li:nth-child(4) { animation-delay: 0.3s; }
.stop-list strong { display: block; font-size: 0.85rem; }
.stop-list small { color: var(--text-muted); font-size: 0.7rem; }
.stop-list .grip { color: var(--text-muted); stroke-width: 3; }
.stop-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--f-primary);
  color: var(--f-primary-ink);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scr-bar { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 14px; }
.scr-bar span { font-weight: 700; font-size: 1.15rem; }
.scr-bar small { color: var(--text-muted); font-size: 0.72rem; display: inline-flex; align-items: center; gap: 4px; }
.scr-fine { font-size: 0.68rem; color: var(--text-muted); margin: 10px 0 0; line-height: 1.5; }

.info-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--f-ok);
  font-size: 0.8rem;
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
}
.info-card:nth-child(3) { animation-delay: 0.1s; }
.info-card:nth-child(4) { animation-delay: 0.2s; }
.info-card:nth-child(5) { animation-delay: 0.3s; }
.info-card .ico { color: var(--f-ok); margin-top: 1px; }
.info-card.warn { border-left-color: var(--f-warn); }
.info-card.warn .ico { color: var(--f-warn); }
.info-card strong { display: block; }
.info-card small { color: var(--text-muted); font-size: 0.72rem; line-height: 1.45; }

.budget { position: relative; width: 170px; margin: 4px auto 14px; }
.ring { width: 100%; height: auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 12; }
.ring-fg {
  fill: none;
  stroke: var(--f-primary);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  transition: stroke-dashoffset 1s cubic-bezier(.2, .9, .3, 1), stroke 0.4s;
}
.ring-fg.over { stroke: var(--f-warn); }
.budget-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.budget-text strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.budget-text small { color: var(--text-muted); font-size: 0.72rem; }

.mini-exp { list-style: none; margin: 0; padding: 0; font-size: 0.8rem; }
.mini-exp li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mini-exp li span:last-child { font-weight: 600; }
.mini-exp li.pending { color: var(--text-muted); }
.mini-exp li.pending span:first-child { display: inline-flex; gap: 6px; align-items: center; }

.scr-chip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 10px;
  border-radius: 12px;
  background: var(--f-soft);
  margin: 10px 0;
}
.scr-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 11px;
  margin-top: 10px;
  background: var(--f-primary);
  color: var(--f-primary-ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, opacity 0.15s;
}
.scr-btn:active { transform: scale(0.97); }
.scr-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.avatars i {
  font-style: normal;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #06222c;
  margin-left: -6px;
  border: 2px solid var(--bg);
}
.avatars i:nth-child(1) { background: #5fb8d6; }
.avatars i:nth-child(2) { background: #ffd866; }
.avatars i:nth-child(3) { background: #f49a8e; }

.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 6px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}
.shop-list .box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--f-primary);
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s;
}
.shop-list button[aria-pressed="true"] { color: var(--text-muted); text-decoration: line-through; }
.shop-list button[aria-pressed="true"] .box { background: var(--f-primary); }
.shop-list button[aria-pressed="true"] .box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--f-primary-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.vehicle { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--border); }
.vehicle .ico.big { width: 40px; height: 40px; color: var(--f-primary); }
.vehicle strong { display: block; }
.vehicle small { color: var(--text-muted); font-size: 0.75rem; }
.countdown {
  text-align: center;
  padding: 20px 10px;
  margin: 12px 0;
  border-radius: 18px;
  background: linear-gradient(140deg, #1a6b8a, #0b3e4a);
  color: #fff;
}
.countdown small { display: block; font-size: 0.72rem; opacity: 0.85; }
.countdown strong { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; margin: 4px 0; letter-spacing: 0.02em; }

.place-filter { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.place-filter button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.place-filter button[aria-pressed="true"] { background: var(--f-primary); border-color: var(--f-primary); color: var(--f-primary-ink); }
.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  animation: slideIn 0.35s ease;
}
.place-list strong { display: block; font-size: 0.85rem; }
.place-list small { color: var(--text-muted); font-size: 0.7rem; }
.place-list .rate { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 0.78rem; }
.place-list .rate .ico { color: var(--f-gold); fill: var(--f-gold); width: 13px; height: 13px; }

.ph { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.ph.p1 { background: linear-gradient(135deg, #e9b77c, #a6573f); }
.ph.p2 { background: linear-gradient(135deg, #7fd3e6, #1a6b8a); }
.ph.p3 { background: linear-gradient(135deg, #f7e6b5, #e98f6f); }
.ph.p4 { background: linear-gradient(135deg, #b9d98c, #4e7f52); }
.ph.p5 { background: linear-gradient(135deg, #f3b2a0, #8a3b3b); }

.diary-photos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 70px 70px; gap: 6px; margin-bottom: 12px; }
.diary-photos .ph { width: 100%; height: 100%; }
.diary-photos .ph:first-child { grid-row: span 2; }
.diary-entry { padding: 14px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--border); }
.diary-entry small { color: var(--f-primary); font-weight: 600; font-size: 0.7rem; }
.diary-entry strong { display: block; margin: 2px 0 6px; }
.diary-entry p { margin: 0; font-size: 0.78rem; line-height: 1.55; color: var(--text-muted); }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 991px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .mini-grid { grid-template-columns: 1fr; } }
.mini {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini .ico { width: 26px; height: 26px; color: var(--f-primary); margin-bottom: 4px; }
.mini span { color: var(--text-muted); font-size: 0.86rem; line-height: 1.6; }

/* ---------- Plus tag, AI screen ---------- */
.plus-tag {
  display: inline-block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--f-gold);
  color: var(--f-gold-ink);
  vertical-align: 2px;
}
.ai-form { display: flex; flex-direction: column; gap: 6px; }
.ai-form span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 0.8rem;
}
.ai-form .ico { color: var(--f-primary); }
.ai-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 0; font-size: 0.8rem; color: var(--text-muted); }
.ai-loading img { border-radius: 22%; animation: aiThink 1.2s ease-in-out infinite alternate; }
@keyframes aiThink { from { transform: scale(0.94); box-shadow: 0 0 0 0 rgba(255, 216, 102, 0); } to { transform: scale(1.04); box-shadow: 0 0 30px 6px rgba(255, 216, 102, 0.35); } }
.ai-result { animation: screenIn 0.45s cubic-bezier(.2, .9, .3, 1); }
.ai-route { list-style: none; margin: 10px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: stop; }
.ai-route li {
  counter-increment: stop;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: var(--f-soft);
}
.ai-route li::before {
  content: counter(stop);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--f-primary);
  color: var(--f-primary-ink);
  font-size: 0.62rem;
}
.ai-route small { color: var(--text-muted); font-weight: 400; }
.day-plan { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-bg); }
.day-plan > small { font-size: 0.7rem; font-weight: 700; color: var(--f-primary); text-transform: uppercase; letter-spacing: 0.05em; }
.day-plan ul { list-style: none; margin: 6px 0 0; padding: 0; }
.day-plan li { display: flex; gap: 10px; padding: 4px 0 4px 10px; border-left: 3px solid var(--f-primary); margin-bottom: 4px; font-size: 0.78rem; }
.day-plan li.d2 { border-left-color: var(--f-gold); }
.day-plan time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 38px; }
.day-plan strong { display: block; font-size: 0.8rem; }
.day-plan li small { color: var(--text-muted); font-size: 0.68rem; }

/* ===================================
   PRICING
   =================================== */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 991px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.plan {
  position: relative;
  padding: 26px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.plan.best { border: 2px solid var(--f-gold); box-shadow: 0 18px 50px rgba(255, 216, 102, 0.12); }
.plan-flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--f-gold);
  color: var(--f-gold-ink);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.plan h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.plan-price { margin: 0 0 16px; color: var(--text-muted); font-size: 0.9rem; }
.plan-price strong { font-size: 2rem; color: var(--text); font-variant-numeric: tabular-nums; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { position: relative; padding: 6px 0 6px 24px; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.plan li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 12px;
  width: 10px;
  height: 6px;
  border: solid var(--f-ok);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
.plans-fine { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin: 22px auto 0; max-width: 640px; line-height: 1.6; }

/* ===================================
   LAWS
   =================================== */
.country-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.country-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.country-btn .cc {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--f-soft);
  color: var(--f-primary);
}
.country-btn:hover { border-color: var(--f-primary); }
.country-btn[aria-checked="true"] { background: var(--f-primary); border-color: var(--f-primary); color: var(--f-primary-ink); }
.country-btn[aria-checked="true"] .cc { background: rgba(255, 255, 255, 0.25); color: inherit; }

.cat-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 28px; }
.cat-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.cat-btn[aria-pressed="true"] { background: var(--f-soft); color: var(--f-primary); }
.cat-btn .n { opacity: 0.6; margin-left: 4px; }

.laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  min-height: 160px;
}
.law {
  padding: 18px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--f-primary);
  animation: lawIn 0.45s cubic-bezier(.2, .9, .3, 1) both;
}
.law.sev-imprisonment { border-top-color: var(--f-bad); }
.law.sev-fine { border-top-color: var(--f-warn); }
.law-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.law-cat { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.sev {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sev-imprisonment .sev { background: rgba(255, 138, 128, 0.15); color: var(--f-bad); }
.sev-fine .sev { background: rgba(255, 216, 102, 0.16); color: var(--f-warn); }
.sev-etiquette .sev { background: var(--f-soft); color: var(--f-primary); }
.law h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.law p { font-size: 0.86rem; line-height: 1.6; color: var(--text-muted); margin: 0; }
.law .global { display: inline-block; margin-top: 10px; font-size: 0.7rem; color: var(--text-muted); }
@keyframes lawIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.laws-source { font-size: 0.78rem; color: var(--text-muted); text-align: center; max-width: 720px; margin: 24px auto 40px; line-height: 1.6; }

.quiz { max-width: 640px; margin: 0 auto; text-align: center; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz-head .f-card-title { margin: 0; }
.quiz-score { font-weight: 700; color: var(--f-primary); font-variant-numeric: tabular-nums; }
.quiz-q { font-size: 1.15rem; font-weight: 600; line-height: 1.5; margin: 22px 0; min-height: 3.4em; }
.quiz-actions { display: flex; justify-content: center; gap: 10px; }
.quiz-a { margin: 16px 0 6px; font-size: 0.9rem; line-height: 1.6; min-height: 1.6em; }
.quiz-a.right { color: var(--f-ok); }
.quiz-a.wrong { color: var(--f-bad); }
.quiz-a span { color: var(--text-muted); display: block; margin-top: 4px; }

/* ===================================
   PRIVACY
   =================================== */
.priv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 991px) { .priv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .priv-grid { grid-template-columns: 1fr; } }
.priv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.priv:hover { transform: translateY(-4px); border-color: var(--f-primary); }
.priv .ico {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: var(--f-soft);
  color: var(--f-primary);
  margin-bottom: 6px;
}
.priv span { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ===================================
   TECH – architecture
   =================================== */
.f-dark {
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(95, 184, 214, 0.12), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(255, 216, 102, 0.08), transparent 60%),
    #071118;
  color: #e4eef2;
  --text: #e4eef2;
  --text-muted: #9bb0b9;
  --border: #22343d;
  --card-bg: #0f1d24;
  --bg-alt: #0b171d;
  --f-primary: #5fb8d6;
  --f-primary-ink: #06222c;
  --f-soft: rgba(95, 184, 214, 0.12);
  --f-ok: #5ed39a;
}

/* Collapsed by default: a slim bar for the curious */
.nerd { padding: 36px 0; }
.nerd-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1.5px dashed var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nerd-toggle:hover { border-color: var(--f-primary); background: var(--f-soft); }
.nerd-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--f-soft);
  color: var(--f-gold);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-weight: 700;
}
.nerd-text { flex: 1; min-width: 0; }
.nerd-text .f-kicker { margin-bottom: 2px; }
.nerd-text strong { display: block; font-size: 1.1rem; }
.nerd-text small { display: block; color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.nerd-more { display: inline-flex; align-items: center; gap: 6px; color: var(--f-primary); font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
.nerd-more .ico { transition: transform 0.3s ease; }
.nerd-toggle[aria-expanded="true"] .nerd-more .ico { transform: rotate(180deg); }
.nerd-body { padding-top: 56px; animation: nerdIn 0.5s cubic-bezier(.2, .9, .3, 1); }
@keyframes nerdIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (max-width: 575px) {
  .nerd-badge { display: none; }
  .nerd-label { display: none; }
  .nerd-toggle { padding: 16px; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
@media (max-width: 767px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 18px 10px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--f-gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 0.8rem; color: var(--text-muted); }

.arch-wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 991px) { .arch-wrap { grid-template-columns: 1fr; } }

.arch { display: flex; flex-direction: column; align-items: stretch; }
.arch-row { display: flex; justify-content: center; gap: 12px; }
.arch-row.two > .node { flex: 1; }
.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  min-width: 200px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.node .ico { width: 22px; height: 22px; color: var(--f-primary); margin-bottom: 4px; }
.node strong { font-size: 0.92rem; }
.node small { color: var(--text-muted); font-size: 0.72rem; }
.node.side { border-style: dashed; }
@media (max-width: 575px) {
  .node { min-width: 0; padding: 10px; }
  .node small { font-size: 0.66rem; }
}

.arch-link { width: 2px; height: 26px; margin: 0 auto; background: var(--border); position: relative; overflow: hidden; }
.arch-link.active::after {
  content: '';
  position: absolute;
  left: -2px;
  width: 6px;
  height: 12px;
  border-radius: 3px;
  background: var(--f-gold);
  box-shadow: 0 0 12px var(--f-gold);
  animation: flowDown 0.6s linear infinite;
}
.arch-link.active.up::after { animation-name: flowUp; }
@keyframes flowDown { from { top: -12px; } to { top: 26px; } }
@keyframes flowUp { from { top: 26px; } to { top: -12px; } }

.host {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  background: rgba(95, 184, 214, 0.04);
  transition: border-color 0.3s;
}
.host-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-align: center; margin-bottom: 10px; }
.modules { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 575px) { .modules { grid-template-columns: repeat(2, 1fr); } }
.module {
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 4px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, transform 0.2s;
}
.module:hover { border-color: var(--f-primary); transform: translateY(-2px); }
.module[aria-pressed="true"] { border-color: var(--f-primary); background: var(--f-soft); }

.bus {
  position: relative;
  margin-top: 12px;
  padding: 8px;
  border-radius: 999px;
  border: 1.5px dashed var(--border);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
  transition: border-color 0.3s, color 0.3s;
}
.bus-pulse {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 102, 0.5), transparent);
  opacity: 0;
}
.bus.active .bus-pulse { opacity: 1; animation: busRun 0.9s linear infinite; }
@keyframes busRun { to { left: 100%; } }

.node.active,
.module.active,
.bus.active,
.host.active {
  border-color: var(--f-gold);
  box-shadow: 0 0 0 4px rgba(255, 216, 102, 0.15), 0 0 30px rgba(255, 216, 102, 0.25);
  color: var(--text);
}
.node.active { transform: scale(1.03); }
.host.active { box-shadow: none; }

.scenario-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.f-dark .f-btn-ghost { border-color: rgba(255, 255, 255, 0.35); color: #e4eef2; }
.f-dark .f-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.console {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #04090d;
  overflow: hidden;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
.console-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.console-bar i:nth-child(2) { background: #febc2e; }
.console-bar i:nth-child(3) { background: #28c840; }
.console-bar span { margin-left: 8px; font-size: 0.72rem; color: var(--text-muted); }
.console-lines { list-style: none; margin: 0; padding: 12px 14px; min-height: 290px; max-height: 340px; overflow-y: auto; font-size: 0.76rem; line-height: 1.6; }
.console-lines li { padding: 2px 0; animation: slideIn 0.25s ease; color: #cfe3ea; word-break: break-word; }
.console-lines li.dim { color: var(--text-muted); }
.console-lines .tag { display: inline-block; min-width: 92px; color: var(--f-gold); font-weight: 700; }
.console-lines .ok { color: var(--f-ok); }

.module-info {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  min-height: 84px;
}
.module-info strong { color: var(--text); }
.layers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.layers span { font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; background: var(--f-soft); color: var(--f-primary); font-weight: 600; }

.tech-tags { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tech-tags li { font-size: 0.78rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }

/* ===================================
   ROADMAP
   =================================== */
.road { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 767px) { .road { grid-template-columns: 1fr; } }
.road-col { padding: 26px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--border); }
.road-col.next { border-style: dashed; }
.road-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; }
.road-col ul { list-style: none; margin: 0; padding: 0; }
.road-col li { position: relative; padding: 7px 0 7px 26px; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.road-col li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--f-primary);
}
.road-col:not(.next) li::before { background: var(--f-ok); border-color: var(--f-ok); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--f-primary); }
.dot.done { background: var(--f-ok); border-color: var(--f-ok); box-shadow: 0 0 0 4px rgba(94, 211, 154, 0.2); }

/* ===================================
   CTA
   =================================== */
.f-cta {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(160deg, #0b1f33 0%, #1c4e73 60%, #2a6f9a 100%);
}
.f-cta::before {
  content: '';
  position: absolute;
  /* A circle larger than any viewport, centred on the section: its edge never shows while it turns */
  left: 50%;
  top: 50%;
  width: 300vmax;
  height: 300vmax;
  margin: -150vmax 0 0 -150vmax;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 216, 102, 0.2) 14deg, transparent 28deg, transparent 180deg, rgba(255, 216, 102, 0.12) 194deg, transparent 208deg);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.f-cta-inner { position: relative; max-width: 640px; }
.f-cta-logo { border-radius: 22%; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); margin-bottom: 20px; }
.f-cta h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin: 0 0 12px; }
.f-cta p { color: rgba(255, 255, 255, 0.88); line-height: 1.7; margin: 0 0 26px; }
.f-cta .f-cta-fine { margin: 22px 0 0; font-size: 0.8rem; }
.f-cta .f-cta-fine a { color: rgba(255, 255, 255, 0.85); }

/* ===================================
   Motion preferences
   =================================== */
@media (prefers-reduced-motion: reduce) {
  .fh-sky, .wave, .lh-glow, .chaos-chip, .f-cta::before, .pulse-dot { animation: none; }
  .screen, .stop-list li, .info-card, .law, .g-edge, .g-label, .nerd-body { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .feat-tab.timing::after { animation: none; }
  .mini-map .route-line { stroke-dashoffset: 0; animation: none; }
}
