/* Marketing Pulse — one stylesheet for the whole app.
   Tokens first (dark is the default, light is the alternative), then layout,
   then components. No values are repeated outside the tokens. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0d;
  --text: #f5f2ef;
  --text2: #d6d0cb;
  --muted: #a8a29e;
  --faint: #8a847f;
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)), #121217;
  --card-solid: #121217;
  --card-border: rgba(255, 255, 255, 0.09);
  --card-shadow: inset 0 -40px 70px -50px rgba(218, 62, 70, 0.35), 0 20px 50px rgba(0, 0, 0, 0.45);
  --divider: rgba(255, 255, 255, 0.08);
  --grid: rgba(255, 255, 255, 0.1);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-border: rgba(255, 255, 255, 0.08);
  --seg-bg: rgba(255, 255, 255, 0.05);
  --seg-border: rgba(255, 255, 255, 0.09);
  --nav-bg: rgba(22, 22, 28, 0.88);
  --nav-border: rgba(255, 255, 255, 0.1);
  --nav-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  --nav-text: #c9c2bc;
  --accent: #da3e46;
  --accent-2: #ee6a70;
  --accent-text: #ff9ea3;
  --on-accent: #ffffff;
  --top-bg: rgba(10, 10, 13, 0.78);
  --icon-bg: rgba(218, 62, 70, 0.16);
  --icon-border: rgba(218, 62, 70, 0.35);
  --arc-bg: radial-gradient(circle at 50% 0%, rgba(218, 62, 70, 0.5) 0%, rgba(218, 62, 70, 0.1) 20%, rgba(10, 10, 13, 0) 38%);
  --arc-rim: rgba(255, 214, 170, 0.55);
  --arc-glow: rgba(218, 62, 70, 0.38);
  --good: #6fcf97;
  --bad: #e86a6a;
  --warn: #f2c94c;
  --line: #da3e46;
  --login-glow: radial-gradient(1200px 700px at 50% -10%, rgba(238, 106, 112, 0.75), rgba(218, 62, 70, 0.35) 40%, rgba(10, 10, 13, 0) 72%);
  --glass: rgba(18, 18, 23, 0.78);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf7f4;
  --text: #1f1714;
  --text2: #3d3029;
  --muted: #5b524d;
  --faint: #6f645e;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-border: #eadfd8;
  --card-shadow: 0 12px 32px rgba(120, 60, 30, 0.08);
  --divider: #f0e6e0;
  --grid: #efe5de;
  --badge-bg: rgba(31, 23, 20, 0.05);
  --badge-border: #eadfd8;
  --seg-bg: #ffffff;
  --seg-border: #eadfd8;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: #eadfd8;
  --nav-shadow: 0 16px 40px rgba(120, 60, 30, 0.18);
  --nav-text: #5b524d;
  --accent-text: #a8232b;
  --top-bg: rgba(251, 247, 244, 0.82);
  --icon-bg: #fce4e5;
  --icon-border: #f3b5b8;
  --arc-bg: radial-gradient(circle at 50% 0%, rgba(218, 62, 70, 0.3) 0%, rgba(218, 62, 70, 0.07) 20%, rgba(251, 247, 244, 0) 38%);
  --arc-rim: rgba(218, 62, 70, 0.55);
  --arc-glow: rgba(218, 62, 70, 0.22);
  --good: #1e8a4c;
  --bad: #c0392b;
  --warn: #9a6b00;
  --line: #cb5a18;
  --login-glow: radial-gradient(1200px 700px at 50% -10%, rgba(238, 106, 112, 0.7), rgba(218, 62, 70, 0.25) 40%, rgba(251, 247, 244, 0) 72%);
  --glass: rgba(255, 255, 255, 0.86);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { filter: brightness(1.15); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Shell */
.arc {
  position: absolute; left: 50%; top: 120px; width: 1700px; height: 1700px; margin-left: -850px; border-radius: 50%;
  background: var(--arc-bg); box-shadow: inset 0 3px 0 var(--arc-rim), inset 0 14px 70px var(--arc-glow);
  pointer-events: none; z-index: 0;
}
.page { position: relative; overflow: hidden; min-height: 100vh; }
.wrap {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 96px 24px 140px;
  display: flex; flex-direction: column; gap: 28px;
}
.narrow { max-width: 760px; }
@media (min-width: 1300px) { .wrap:not(.narrow) { max-width: 1360px; } }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 10px max(16px, calc((100% - 1200px) / 2));
  background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); font-weight: 800; font-size: 16px;
}
.brand-name { font-weight: 800; font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offering-btn {
  display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px; padding: 0; border: 0;
  background: transparent; color: var(--accent-text); font-size: 13px; font-weight: 700;
}
.offering-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.menu {
  position: absolute; left: 0; top: 100%; margin-top: 8px; z-index: 40; width: 300px; max-width: calc(100vw - 32px);
  padding: 8px; background: var(--card-solid); border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--nav-shadow);
}
.menu-title { padding: 6px 10px 8px; font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: 0.03em; text-transform: uppercase; }
.menu-item {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text);
  display: flex; align-items: center; gap: 8px; text-align: left; font-size: 14px; font-weight: 700;
}
.menu-item[aria-selected="true"] { background: var(--icon-bg); }
.menu-item .grow { flex: 1; min-width: 0; }
.menu-foot { margin-top: 6px; padding: 10px 10px 4px; border-top: 1px solid var(--divider); font-size: 12px; color: var(--muted); }

.nav {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; width: max-content;
  max-width: calc(100% - 16px); display: flex; align-items: center; gap: 2px; padding: 8px 10px;
  background: var(--nav-bg); border: 1px solid var(--nav-border); border-radius: 999px; box-shadow: var(--nav-shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav a {
  position: relative; width: 76px; padding: 8px 0 6px; border-radius: 999px; color: var(--nav-text);
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; min-height: 52px;
}
.nav a[aria-current="page"] { background: var(--icon-bg); color: var(--accent-text); }
.nav a.plus {
  width: 60px; height: 60px; min-height: 60px; margin: -18px 6px 0; padding: 0; border: 4px solid var(--bg); border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--on-accent); justify-content: center;
  box-shadow: 0 8px 26px rgba(218, 62, 70, 0.5);
}
.nav .count {
  position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
@media (max-width: 480px) { .nav a:not(.plus) { width: 60px; } }

.themebtn {
  position: fixed; right: 24px; bottom: 24px; z-index: 25; display: flex; gap: 2px; padding: 4px;
  background: var(--nav-bg); border: 1px solid var(--nav-border); border-radius: 999px; box-shadow: var(--nav-shadow);
}
.themebtn button {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--nav-text);
  display: flex; align-items: center; justify-content: center;
}
.themebtn button[aria-pressed="true"] { background: var(--icon-bg); color: var(--accent-text); }
@media (max-width: 760px) { .themebtn { bottom: 96px; right: 12px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 12px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--on-accent);
  font-size: 15px; font-weight: 800; box-shadow: 0 6px 22px rgba(218, 62, 70, 0.3);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 54px; font-size: 17px; border-radius: 14px; width: 100%; }
.btn.sec {
  background: var(--seg-bg); color: var(--text); border: 1px solid var(--card-border); box-shadow: none;
}
.btn.danger { background: var(--seg-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); box-shadow: none; }
.btn.dashed { border-style: dashed; color: var(--accent-text); }
.lnk { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--accent-text); font-size: 14px; font-weight: 800; }
.back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--seg-bg); border: 1px solid var(--seg-border); color: var(--text); font-size: 14px; font-weight: 700; min-height: 44px;
}

/* Cards and text */
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 24px; padding: 24px; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card.plain { box-shadow: none; }
.h1 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.h3 { font-size: 16px; font-weight: 800; }
.sub { font-size: 15px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
.tiny { font-size: 12px; color: var(--faint); }
.pre { white-space: pre-wrap; font-size: 13px; color: var(--text2); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrapx { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--badge-bg); border: 1px solid var(--badge-border); color: var(--muted); white-space: nowrap;
}
.badge.on { background: var(--icon-bg); border-color: var(--icon-border); color: var(--accent-text); }
.badge.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.badge.good { color: var(--good); }
.badge.bad { color: var(--bad); }
.badge.warn { color: var(--warn); }

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 8px; }
.hero .big { font-size: 84px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.hero .big.word { font-size: 44px; letter-spacing: -0.02em; }
.hero .unit { font-size: 16px; color: var(--muted); font-weight: 700; }
.hero .summary { max-width: 640px; font-size: 16px; color: var(--text2); }

.notice {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--icon-bg); border: 1px solid var(--icon-border);
  font-size: 14px; color: var(--text2);
}
.notice.err { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--text); }
.notice svg { flex-shrink: 0; margin-top: 2px; }

/* Home */
.home-hero { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 8px 0 100px; align-items: flex-start; }
.home-hero .h1 { font-size: 56px; max-width: 760px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -90px; }
.tile {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 22px; padding: 18px 18px 0; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--text); transition: transform 0.25s ease, border-color 0.25s ease;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(218, 62, 70, 0.55); filter: none; }
.tile-top { display: flex; align-items: center; gap: 10px; }
.tile-icon {
  width: 38px; height: 38px; border-radius: 12px; background: var(--icon-bg); border: 1px solid var(--icon-border);
  display: flex; align-items: center; justify-content: center; color: var(--accent-text); flex-shrink: 0;
}
.tile-label { font-size: 16px; font-weight: 800; color: var(--accent-text); line-height: 1.25; }
.tile-value { font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; }
.tile-value.word { font-size: 22px; letter-spacing: -0.01em; }
.tile-sub { font-size: 13px; color: var(--muted); min-height: 36px; }
.tile-delta { font-size: 13px; font-weight: 800; }
.tile-foot {
  margin-top: auto; border-top: 1px solid var(--divider); padding: 12px 0; font-size: 14px; font-weight: 800; color: var(--accent-text);
  display: flex; align-items: center; justify-content: space-between; min-height: 44px;
}
.up { color: var(--good); }
.down { color: var(--bad); }
.flat { color: var(--muted); }

.charts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chartcard { padding: 18px 16px; border-radius: 22px; gap: 12px; }
.chart { width: 100%; height: 120px; display: block; }
.chart-empty {
  height: 120px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--muted);
  border: 1px dashed var(--card-border); border-radius: 14px; padding: 12px;
}
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--seg-border); max-width: 100%; overflow-x: auto; }
.seg button {
  flex-shrink: 0; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--nav-text);
  font-size: 13px; font-weight: 800;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.seg.wide { flex-wrap: wrap; border-radius: 26px; }
.seg.wide button { min-height: 44px; padding: 0 18px; font-size: 14px; }

@media (max-width: 1100px) { .tiles, .charts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .wrap { padding: 88px 16px 130px; gap: 22px; }
  .h1 { font-size: 34px; }
  .home-hero .h1 { font-size: 34px; }
  .tiles { gap: 10px; }
  .charts { grid-template-columns: 1fr; }
  .tile { padding: 14px 12px 0; border-radius: 18px; gap: 8px; }
  .tile-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tile-icon { width: 32px; height: 32px; }
  .tile-label { font-size: 14px; }
  .tile-value { font-size: 26px; }
  .tile-value.word { font-size: 17px; }
  .tile-sub { font-size: 12px; }
  .card { padding: 18px 16px; border-radius: 20px; }
  .hero .big { font-size: 60px; }
  .hero .big.word { font-size: 32px; }
  .topbar .btn span.label { display: none; }
}

/* Stats and tables */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 18px; border-radius: 20px; gap: 4px; }
.stat .sv { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat .sl { font-size: 13px; font-weight: 800; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .stats { gap: 8px; }
  .stats.four { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 12px 10px; border-radius: 16px; }
  .stat .sv { font-size: 20px; }
  .stat .sl { font-size: 11px; }
  .two { grid-template-columns: 1fr; }
}

.table { display: flex; flex-direction: column; }
.tr {
  display: grid; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--divider); font-size: 14px;
}
.tr.head { border-top: 0; padding: 0 0 10px; font-size: 12px; font-weight: 800; color: var(--faint); }
.tr.you { background: var(--icon-bg); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 14px; border-top-color: transparent; }
.tr .main { min-width: 0; }
.tr .name { font-weight: 800; overflow-wrap: anywhere; }
.tr .r { text-align: right; }
.mlabel { display: none; }
@media (max-width: 760px) {
  .tr.head { display: none; }
  .tr { grid-template-columns: 1fr 1fr !important; gap: 6px 12px; }
  .tr .main { grid-column: 1 / -1; }
  .tr .r { text-align: left; }
  .mlabel { display: block; font-size: 11px; font-weight: 800; color: var(--faint); }
}

.bar { height: 10px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--seg-border); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.range { position: relative; height: 12px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--seg-border); margin: 26px 0 30px; }
.range .mark { position: absolute; top: -8px; width: 2px; height: 28px; background: var(--text); }
.range .mark span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 800; }
.range .mark.median span { top: -20px; }
.range .mark.you { background: var(--accent); }
.range .mark.you span { top: 30px; color: var(--accent-text); }
.range .fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0.55; }

/* Forms */
.lab { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.inp {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--seg-bg);
  color: var(--text); font-size: 16px; font-weight: 600;
}
.inp::placeholder { color: var(--faint); }
.inp:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.inp.code { font-size: 28px; letter-spacing: 10px; text-align: center; font-weight: 800; min-height: 60px; }
.inp[aria-invalid="true"] { border-color: var(--bad); }
.pw { position: relative; display: block; }
.pw .inp { padding-right: 84px; }
.pw button { position: absolute; right: 6px; top: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text2); min-height: 44px; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.switch { flex-shrink: 0; position: relative; width: 56px; height: 44px; padding: 0; border: 0; background: transparent; }
.switch .track { position: absolute; left: 0; top: 6px; width: 56px; height: 32px; border-radius: 999px; background: var(--grid); border: 1px solid var(--seg-border); }
.switch .knob { position: absolute; top: 10px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: left 0.15s ease; }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .knob { left: 28px; }
.slot { padding: 14px; border-radius: 16px; border: 1px solid var(--card-border); gap: 8px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }

/* Sign-in */
.login { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 16px 60px; gap: 24px; }
.login::before { content: ""; position: fixed; inset: 0; background: var(--login-glow); pointer-events: none; z-index: 0; }
.login > * { position: relative; z-index: 1; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-logo {
  width: 68px; height: 68px; border-radius: 50%; background: #17060a; color: #ee6a70; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 23px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.login-brand h1 { max-width: 620px; font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.chips span { padding: 6px 14px; border-radius: 999px; background: var(--badge-bg); border: 1px solid var(--card-border); font-size: 13px; font-weight: 700; }
.glass {
  width: 100%; max-width: 460px; padding: 26px; border-radius: 26px; background: var(--glass); border: 1px solid var(--card-border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; gap: 16px;
}
.tabs2 { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--seg-border); }
.tabs2 button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--text2); font-size: 15px; font-weight: 800; }
.tabs2 button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.roundicon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--icon-bg); border: 1px solid var(--icon-border); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 700px) { .login-brand h1 { font-size: 32px; } .glass { padding: 20px; } }

/* Analysis steps */
.step { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); font-size: 15px; }
.dot { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card-border); color: var(--faint); font-size: 13px; font-weight: 800; }
.dot.done { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dot.now { border-color: var(--accent); color: var(--accent-text); }
.dot.wait { border-color: var(--warn); color: var(--warn); }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Actions */
.action { border-top: 1px solid var(--divider); padding: 12px 0; display: flex; gap: 12px; align-items: flex-start; }
.action .tick {
  width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--card-border); background: transparent; color: var(--on-accent);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 2px; padding: 0;
}
.action .tick[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.action.isdone .a-title { text-decoration: line-through; color: var(--muted); }
.a-title { font-size: 15px; font-weight: 800; }
.a-why { font-size: 13px; color: var(--muted); margin-top: 2px; }
.a-step { font-size: 13px; color: var(--text2); margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--card-border); box-shadow: var(--nav-shadow);
  font-size: 14px; font-weight: 700;
}
.loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--muted); gap: 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .rise, .spin { animation: none; }
  .tile, .switch .knob { transition: none; }
}

/* Public home page */
.land { position: relative; min-height: 100vh; overflow: hidden; }
.land::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 900px; background: var(--login-glow); pointer-events: none; z-index: 0; }
.land > * { position: relative; z-index: 1; }
.land-nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--top-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--divider);
}
.land-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.land-brand .logo { width: 36px; height: 36px; font-size: 13px; }
.land-links { display: flex; gap: 4px; }
.land-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--text2);
  font-size: 14px; font-weight: 700; text-decoration: none; border-radius: 10px;
}
.land-link:hover { color: var(--text); background: var(--seg-bg); }
.land main { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 110px; }
.land-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-top: 72px; }
.land-hero h1 { font-size: clamp(38px, 6.4vw, 72px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; max-width: 900px; }
.land-lead { max-width: 680px; font-size: 18px; line-height: 1.55; color: var(--text2); margin: 0 auto; }
.land-big { min-height: 56px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.land-preview {
  width: 100%; max-width: 980px; margin-top: 28px; padding: 18px; border-radius: 28px; background: var(--glass);
  border: 1px solid var(--card-border); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45); text-align: left;
}
.land-preview-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.land-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.land-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--card);
  border: 1px solid var(--card-border); align-items: flex-start; min-width: 0;
}
.land-tile .tile-top { width: 100%; }
.land-tile-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.land-tile-value span { font-size: 14px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.land-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--card-border); border-radius: 22px;
  background: var(--card); margin-top: -40px;
}
.land-strip > div { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; }
.land-strip > div + div { border-left: 1px solid var(--divider); }
.land-strip b { font-size: 16px; }
.land-strip span { font-size: 14px; color: var(--muted); }
.land-sec { display: flex; flex-direction: column; gap: 36px; scroll-margin-top: 90px; }
.land-head { display: flex; flex-direction: column; gap: 10px; text-align: center; align-items: center; }
.land-sec h2, .land-final h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.land-head p { font-size: 17px; color: var(--muted); max-width: 620px; }
.land-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.land-feature {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: var(--card);
  border: 1px solid var(--card-border); transition: transform 0.2s ease, border-color 0.2s ease;
}
.land-feature:hover { transform: translateY(-4px); border-color: rgba(218, 62, 70, 0.55); }
.land-feature p, .land-steps p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.land-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; }
.land-steps li { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-border); }
.land-steps li > div { display: flex; flex-direction: column; gap: 8px; }
.land-num {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--on-accent); font-weight: 800; font-size: 18px;
}
.land-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px; border-radius: 28px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--card-shadow);
}
.land-list { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; }
.land-list li, .land-plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text2); }
.land-list svg, .land-plan svg { flex-shrink: 0; margin-top: 3px; color: var(--accent-text); }
.land-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.land-plan {
  display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: 24px; background: var(--card); border: 1px solid var(--card-border);
  align-items: flex-start;
}
.land-plan.featured { border-color: var(--accent); box-shadow: var(--card-shadow); }
.land-plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; flex: 1; }
.land-plan li { font-size: 14px; }
.land-plan .btn { width: 100%; }
.land-price { font-size: 48px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.land-price span { font-size: 15px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.land-faq { max-width: 820px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.land-faq details { border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); padding: 0 20px; }
.land-faq summary { cursor: pointer; padding: 18px 0; font-size: 16px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-text); }
.land-faq details[open] summary::after { content: "–"; }
.land-faq p { padding: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.land-final {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 64px 24px; border-radius: 32px;
  background: radial-gradient(circle at 50% 0%, rgba(218, 62, 70, 0.4), rgba(218, 62, 70, 0.08) 60%), var(--card-solid); border: 1px solid var(--icon-border);
}
.land-final p { font-size: 17px; color: var(--text2); }
.land-foot { max-width: 1180px; margin: 110px auto 0; padding: 40px 24px 120px; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 28px; }
.land-foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.land-foot .land-link { padding: 0; min-height: 30px; justify-content: flex-start; }
.land-foot .land-link:hover { background: transparent; }
@media (max-width: 1000px) {
  .land-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-links { display: none; }
  .land-split { grid-template-columns: minmax(0, 1fr); padding: 28px; }
}
@media (max-width: 760px) {
  .land main { gap: 72px; padding: 0 16px; }
  .land-nav { padding: 10px 14px; }
  .land-hero { padding-top: 44px; }
  .land-lead { font-size: 16px; }
  .land-steps, .land-plans, .land-strip { grid-template-columns: minmax(0, 1fr); }
  .land-strip > div + div { border-left: 0; border-top: 1px solid var(--divider); }
  .land-big { width: 100%; }
  .land-cta-top { display: none; }
}
@media (max-width: 520px) {
  .land-features { grid-template-columns: minmax(0, 1fr); }
  .land-brand span:last-child { display: none; }
}

/* Team admin page */
.admin-table { width: 100%; overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }

/* Public home page: the theme switch stays fixed in its corner (the rule above made it part of the page flow). */
.land > .themebtn { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
@media (max-width: 760px) { .land > .themebtn { right: 12px; bottom: 16px; } }

/* Hero: shimmering headline */
.land-shine {
  background: linear-gradient(100deg, var(--accent-text) 0%, #ffffff 28%, var(--accent-2) 50%, #ffe3c2 72%, var(--accent-text) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: land-shine 6s linear infinite;
}
:root[data-theme="light"] .land-shine { background-image: linear-gradient(100deg, var(--accent) 0%, #7a1620 30%, var(--accent-2) 55%, #b8480f 78%, var(--accent) 100%); }
@keyframes land-shine { from { background-position: 0% 0; } to { background-position: -220% 0; } }

/* Hero slider */
.land-slider { position: relative; width: 100%; max-width: 980px; margin-top: 28px; }
.land-slider .land-preview { position: relative; margin-top: 0; max-width: none; overflow: hidden; }
/* A soft moving glow around the card. */
.land-slider::before {
  content: ""; position: absolute; inset: -2px; border-radius: 30px; z-index: 0; filter: blur(22px); opacity: 0.55;
  background: conic-gradient(from var(--land-turn, 0deg), rgba(218, 62, 70, 0), rgba(238, 106, 112, 0.9), rgba(255, 214, 170, 0.7), rgba(218, 62, 70, 0), rgba(218, 62, 70, 0.8), rgba(218, 62, 70, 0));
  animation: land-turn 9s linear infinite;
}
@property --land-turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes land-turn { to { --land-turn: 360deg; } }
.land-slider > .land-preview { z-index: 1; }
.land-slide-title { font-size: 14px; font-weight: 800; color: var(--text); }
.land-slides { position: relative; display: grid; min-height: 268px; }
.land-slide {
  grid-area: 1 / 1; opacity: 0; transform: translateX(28px) scale(0.985); pointer-events: none;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); display: flex; flex-direction: column; justify-content: center;
}
.land-slide.on { opacity: 1; transform: none; pointer-events: auto; }
/* The light that crosses the card when the slide changes. */
.land-sweep {
  position: absolute; top: -20%; bottom: -20%; left: -40%; width: 34%; pointer-events: none; opacity: 0; transform: skewX(-18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16), rgba(255, 226, 200, 0.3), rgba(255, 255, 255, 0));
}
.land-sweep.go { animation: land-sweep 1.1s ease-out; }
@keyframes land-sweep { 0% { left: -40%; opacity: 0; } 15% { opacity: 1; } 100% { left: 115%; opacity: 0; } }
.land-dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.land-dots button { width: 44px; height: 28px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.land-dots i { display: block; width: 8px; height: 8px; border-radius: 999px; background: var(--grid); transition: width 0.35s ease, background 0.35s ease; }
.land-dots button.on i { width: 30px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 14px rgba(218, 62, 70, 0.8); }
/* Sparkles: small lights that twinkle around the card. */
.land-sparkles { position: absolute; inset: -34px -22px; z-index: 2; pointer-events: none; }
.land-sparkles i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 214, 170, 0.9) 40%, rgba(238, 106, 112, 0) 70%);
  box-shadow: 0 0 10px 2px rgba(255, 190, 160, 0.55);
  animation: land-twinkle calc(2.6s + var(--i) * 0.23s) ease-in-out calc(var(--i) * -0.41s) infinite;
}
.land-sparkles i:nth-child(1) { left: 2%; top: 6%; } .land-sparkles i:nth-child(2) { left: 14%; top: 0%; }
.land-sparkles i:nth-child(3) { left: 31%; top: 2%; } .land-sparkles i:nth-child(4) { left: 52%; top: 0%; }
.land-sparkles i:nth-child(5) { left: 71%; top: 3%; } .land-sparkles i:nth-child(6) { left: 90%; top: 1%; }
.land-sparkles i:nth-child(7) { left: 99%; top: 22%; } .land-sparkles i:nth-child(8) { left: 97%; top: 61%; }
.land-sparkles i:nth-child(9) { left: 88%; top: 97%; } .land-sparkles i:nth-child(10) { left: 63%; top: 99%; }
.land-sparkles i:nth-child(11) { left: 38%; top: 98%; } .land-sparkles i:nth-child(12) { left: 12%; top: 99%; }
.land-sparkles i:nth-child(13) { left: 0%; top: 72%; } .land-sparkles i:nth-child(14) { left: 1%; top: 38%; }
.land-sparkles i:nth-child(3n) { width: 3px; height: 3px; }
.land-sparkles i:nth-child(4n) { width: 7px; height: 7px; }
@keyframes land-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) translateY(0); } 50% { opacity: 1; transform: scale(1.25) translateY(-6px); } }

/* Slide contents */
.land-rank, .land-price-slide, .land-actions { display: flex; flex-direction: column; gap: 12px; padding: 6px 4px; }
.land-rank-row { display: grid; grid-template-columns: 28px minmax(90px, 170px) minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: var(--badge-bg); border: 1px solid transparent; font-size: 14px; }
.land-rank-row.you { border-color: var(--icon-border); background: var(--icon-bg); font-weight: 800; }
.land-rank-pos { color: var(--faint); font-weight: 800; }
.land-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.land-rank-bar { height: 8px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.land-rank-bar i { display: block; height: 100%; border-radius: 999px; background: var(--faint); }
.land-rank-row.you .land-rank-bar i { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.land-rank-score { text-align: right; font-weight: 800; }
.land-price-slide { gap: 18px; }
.land-range { position: relative; height: 12px; border-radius: 999px; background: var(--grid); margin: 14px 0 4px; }
.land-range-fill { position: absolute; left: 12%; right: 10%; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(218, 62, 70, 0.25), rgba(218, 62, 70, 0.6)); }
.land-range-mid, .land-range-you { position: absolute; top: -6px; width: 4px; height: 24px; border-radius: 4px; transform: translateX(-50%); }
.land-range-mid { background: var(--text); }
.land-range-you { background: var(--accent-2); box-shadow: 0 0 14px rgba(238, 106, 112, 0.9); }
.land-action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--badge-bg); border: 1px solid var(--card-border); text-align: left; }
.land-tick { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--icon-bg); border: 1px solid var(--icon-border); color: var(--accent-text); }
@media (max-width: 1000px) { .land-slides { min-height: 420px; } }
@media (max-width: 760px) {
  .land-preview-bar .tiny { display: none; }
  .land-action { flex-wrap: wrap; }
  .land-action .badge { margin-left: 38px; }
  .land-rank-row { grid-template-columns: 22px minmax(0, 1fr) 60px 30px; gap: 8px; }
  .land-sparkles { inset: -18px -6px; }
}
@media (prefers-reduced-motion: reduce) {
  .land-shine, .land-slider::before, .land-sparkles i, .land-sweep.go { animation: none; }
  .land-sparkles { display: none; }
  .land-slide { transition: none; }
}
