/* ==========================================================================
   Media Lens - Liquid Glass design system
   --------------------------------------------------------------------------
   Two complete themes, dark by default. Every colour is a token; no component
   below hardcodes one, so switching themes is a single attribute on <html>
   and nothing has to be restyled twice.

   The glass look is built from four layers that always travel together:
     1. a translucent fill            (--glass)
     2. a blur behind it              (backdrop-filter)
     3. a lit top edge                (::before hairline)
     4. depth below                   (layered shadow)
   Using fewer than all four reads as "transparent box", not as glass.

   Motion rule: only `transform` and `opacity` are ever animated. Anything
   else forces layout or paint on every frame and turns a 60fps interaction
   into a stutter on the mid-range Android the site will mostly be read on.
   ========================================================================== */

/* --------------------------------------------------------------- fonts -- */
/* Served from our own domain. A CDN would be a third party in the request
   path for readers whose access to it is unreliable, and a font that fails
   to load is a page that renders in Tahoma. */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------- dark tokens -- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  /* The page sits on deep blue-black, not grey: the whole palette leans
     blue-green, and a neutral base would make the accents look pasted on. */
  --bg: #060b16;
  --bg-2: #091326;

  --text: #eaf1fb;
  --text-strong: #ffffff;
  --muted: #9aafc9;
  --faint: #6d829c;

  --accent: #2fd6a8;        /* green  - primary action, success, progress */
  --accent-2: #4d9bff;      /* blue   - links, secondary emphasis */
  --accent-ink: #04141d;    /* text on top of an accent fill */
  --danger: #ff8a8a;
  --warn: #f3c168;

  /* Glass */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  /* The lit edge - what actually sells the material. */
  --edge: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.32) 30%,
    rgba(255, 255, 255, 0.32) 70%,
    transparent
  );
  --blur: 20px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, 0.7), 0 8px 24px rgba(0, 0, 0, 0.35);
  --glow: 0 0 32px -8px rgba(47, 214, 168, 0.45);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 140ms;
  --normal: 260ms;
  --slow: 420ms;
}

/* -------------------------------------------------------- light tokens -- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #eef4fb;
  --bg-2: #e2ecf7;

  --text: #0a1826;
  --text-strong: #030b14;
  --muted: #46617e;
  --faint: #586f88;

  /* Both accents are darkened for light mode, and by more than looks
     necessary. Measured against the translucent glass fill below - which is
     the background these actually sit on, not --bg - the obvious choices came
     out at 3.8-4.1:1. These clear 4.5:1 both as text on glass and as a fill
     under white button labels. */
  --accent: #097355;
  --accent-2: #1c62d6;
  --accent-ink: #ffffff;
  --danger: #c0392b;
  --warn: #9a6a10;

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-hover: rgba(255, 255, 255, 0.92);
  --border: rgba(10, 30, 60, 0.12);
  --border-strong: rgba(10, 30, 60, 0.2);
  --edge: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.95) 30%,
    rgba(255, 255, 255, 0.95) 70%,
    transparent
  );
  --blur: 18px;
  --shadow-1: 0 1px 2px rgba(16, 42, 76, 0.08);
  --shadow-2: 0 8px 24px -10px rgba(16, 42, 76, 0.22), 0 2px 6px rgba(16, 42, 76, 0.08);
  --shadow-3: 0 24px 56px -20px rgba(16, 42, 76, 0.3), 0 6px 18px rgba(16, 42, 76, 0.1);
  --glow: 0 0 32px -10px rgba(13, 143, 109, 0.35);
}

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

/* An author-level `display` always beats the browser's own [hidden] rule,
   whatever the specificity - so any component laid out with flex or grid
   would stay visible when hidden. Every hidden panel depends on this. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The light behind the glass. Without something textured to blur, a
   backdrop-filter has nothing to work with and every panel looks flat. Fixed
   and non-interactive so it never affects layout or scrolling cost. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 78% 12%, rgba(77, 155, 255, 0.28), transparent 70%),
    radial-gradient(34% 38% at 12% 78%, rgba(47, 214, 168, 0.24), transparent 70%),
    radial-gradient(46% 46% at 50% 108%, rgba(77, 155, 255, 0.14), transparent 70%),
    var(--bg-2);
  /* Barely-there drift: enough to feel alive, slow enough never to distract
     from reading. Transform only - the element is composited, so this costs
     nothing per frame. */
  animation: aurora 34s var(--ease) infinite alternate;
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(38% 42% at 78% 12%, rgba(28, 98, 214, 0.16), transparent 70%),
    radial-gradient(34% 38% at 12% 78%, rgba(13, 143, 109, 0.16), transparent 70%),
    radial-gradient(46% 46% at 50% 108%, rgba(28, 98, 214, 0.1), transparent 70%),
    var(--bg-2);
}

@keyframes aurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.45;
  font-weight: 700;
  margin-block: 0 0.6rem;
}

h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }

p { margin-block: 0 1rem; }

a {
  color: var(--accent-2);
  text-decoration-color: color-mix(in srgb, var(--accent-2) 40%, transparent);
  text-underline-offset: 0.25em;
  transition: color var(--fast) var(--ease);
}
a:hover { color: var(--accent); }

/* A visible focus ring is not decoration - it is the only way a keyboard
   user knows where they are. It is never removed, only styled. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); font-size: 0.94rem; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  z-index: 100;
}
.skip-link:focus {
  inset-inline-start: 1rem;
  top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* --------------------------------------------------------------- glass -- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  /* Keeps the lit edge from spilling past a rounded corner. */
  overflow: hidden;
}

/* The lit top edge. One pixel, and the single detail that separates glass
   from a plain translucent rectangle. */
.glass::before {
  content: "";
  position: absolute;
  inset-inline: 12%;
  top: 0;
  height: 1px;
  background: var(--edge);
  opacity: 0.7;
  pointer-events: none;
}

.glass-raised { box-shadow: var(--shadow-3); }

/* ------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-strong);
  text-decoration: none;
}

/* The mark: a lens. Concentric rings in the two accents, quietly breathing -
   the only "this is an AI product" flourish in the chrome. */
.brand-mark {
  position: relative;
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: var(--glow);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bg);
}
.brand:hover .brand-mark { animation: pulse-ring 1.6s var(--ease) infinite; }

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.09); }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav .btn-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.site-nav a:hover,
.site-nav .btn-link:hover {
  color: var(--text-strong);
  background: var(--glass-strong);
}
.site-nav .btn-primary { color: var(--accent-ink); }

.inline-form { display: inline; margin: 0; }

/* -------------------------------------------------------- theme toggle -- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--muted);
  cursor: pointer;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  transform: rotate(-18deg);
}
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }

/* Each theme shows the icon of the theme you would switch *to*. */
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ------------------------------------------------------------ buttons -- */
.btn-primary,
.btn-ghost {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 0.72rem 1.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform var(--fast) var(--ease), box-shadow var(--normal) var(--ease),
    background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.btn-primary {
  position: relative;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: var(--shadow-2), var(--glow);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--glass-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-small { padding: 0.42rem 1.05rem; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; }

.btn-link {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.is-disabled { opacity: 0.5; cursor: default; pointer-events: none; }

/* -------------------------------------------------------------- forms -- */
.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--glass-strong);
  color: var(--text);
  font: inherit;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input::placeholder,
textarea::placeholder { color: var(--faint); }

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field .help { color: var(--faint); font-size: 0.85rem; margin: 0.4rem 0 0; }
.field .error { color: var(--danger); font-size: 0.88rem; margin: 0.4rem 0 0; }
.field-invalid input { border-color: var(--danger); }

.form-errors {
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--border));
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.2rem;
}
.form-errors p { margin: 0.2rem 0; }

/* ----------------------------------------------------------- messages -- */
.messages { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.message {
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  margin-bottom: 0.6rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: rise-in var(--normal) var(--ease) both;
}
.message-warning { border-inline-start-color: var(--warn); }
.message-error { border-inline-start-color: var(--danger); }

.notice {
  margin: 0 0 1.6rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--glass);
  font-size: 0.93rem;
}
.notice-warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }

/* ------------------------------------------------------------- motion -- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Entrance for the main column. Also the "page transition": each navigation
   starts with content rising into place, which reads as a transition without
   any of the fragility of intercepting navigation in JavaScript. */
main { padding-block: 2.5rem 4rem; animation: rise-in var(--slow) var(--ease) both; }

/* Staggered reveal, driven by --i set in the markup. */
.stagger > * {
  animation: rise-in var(--normal) var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* -------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  padding-block: clamp(2rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3rem);
  text-align: start;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  margin-bottom: 1.1rem;
}

/* The gradient sits on the phrase itself, so the two brand colours are in the
   first thing anyone reads. */
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-points {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 3rem;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: var(--shadow-2);
  transition: transform var(--normal) var(--ease), border-color var(--normal) var(--ease);
}
.hero-points li:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.hero-points b { display: block; color: var(--text-strong); margin-bottom: 0.3rem; }
.hero-points span { color: var(--muted); font-size: 0.94rem; }

/* -------------------------------------------------------------- plans -- */
.plans { margin-top: clamp(2.5rem, 8vw, 5rem); }
.plans-head { margin-bottom: 2rem; }

.plan-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.plan-card {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease),
    border-color var(--normal) var(--ease);
}
.plan-card::before {
  content: "";
  position: absolute;
  inset-inline: 15%;
  top: 0;
  height: 1px;
  background: var(--edge);
  opacity: 0.6;
}
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-3);
  border-color: var(--border-strong);
}

.plan-card.is-current {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-2), var(--glow);
}

.plan-badge {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.plan-card h2,
.plan-card h3 { margin: 0 0 0.2rem; font-size: 1.25rem; }
.plan-card .tagline { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }

.price { margin: 0.4rem 0 0.3rem; color: var(--text); }
.price .amount {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price .unit { font-size: 0.85rem; color: var(--muted); }

.quota { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }

.capabilities {
  list-style: none;
  margin: 0.9rem 0 1.1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.91rem;
}
.capabilities li { display: flex; align-items: center; gap: 0.55rem; }

/* Colour alone would not survive a colour-blind reader or a greyscale print,
   so the glyph carries the meaning too. */
.capabilities .mark {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
}
.capabilities .yes .mark {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
}
.capabilities .no { color: var(--faint); }
.capabilities .no .mark { background: var(--glass-strong); color: var(--faint); }
.capabilities.compact { font-size: 0.86rem; }

.extras {
  margin: 0 0 1rem;
  padding-inline-start: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.plan-action { margin-top: auto; padding-top: 0.9rem; }

.plans-more { margin-top: 1.6rem; }

.plans-notes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.plans-notes ul {
  margin: 0;
  padding-inline-start: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 2.1;
}

/* ---------------------------------------------------------- auth card -- */
.auth-card {
  max-width: 470px;
  margin-inline: auto;
  padding: 2.2rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset-inline: 20%;
  top: 0;
  height: 1px;
  background: var(--edge);
}
.auth-card h1 { font-size: 1.55rem; margin-bottom: 0.4rem; }
.auth-card .lede { font-size: 0.98rem; margin-top: 0; }
.auth-alt { color: var(--muted); font-size: 0.92rem; margin: 0.7rem 0 0; }

/* ---------------------------------------------------------- dashboard -- */
.dash-head { margin-bottom: 1.8rem; }
.dash-head .lede { margin-top: 0.2rem; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.1rem;
}

.dash-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  position: relative;
  overflow: hidden;
}
.dash-card::before {
  content: "";
  position: absolute;
  inset-inline: 15%;
  top: 0;
  height: 1px;
  background: var(--edge);
  opacity: 0.6;
}
.dash-card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

.plan-name-lg {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.account-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.1rem;
  margin: 1.1rem 0;
  font-size: 0.92rem;
}
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; }

.dash-cta { margin-top: 1.8rem; }

/* ------------------------------------------------------- quota meter --- */
.quota-meter {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  border: 1px solid var(--border);
  overflow: hidden;
}
.quota-lg { height: 12px; }

.quota-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  transition: width var(--slow) var(--ease);
}

.quota-figure { margin: 0.6rem 0 0.8rem; font-size: 0.92rem; font-weight: 600; }
.quota-caption { margin: 0.45rem 0 0.9rem; font-size: 0.82rem; color: var(--faint); }

/* -------------------------------------------------------- error pages -- */
.error-page {
  text-align: center;
  padding-block: clamp(3rem, 12vw, 7rem);
  max-width: 34rem;
  margin-inline: auto;
}
.error-code {
  font-size: clamp(4.5rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.5rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-page h1 { font-size: 1.5rem; }
.error-page .lede { margin-inline: auto; }
.error-actions { display: flex; gap: 0.8rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* ------------------------------------------------------------ footer -- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  padding-block: 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-grid h3 { font-size: 0.92rem; color: var(--text); margin-bottom: 0.6rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--faint);
}
.trust-badge {
  min-width: 86px;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 0.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  text-align: center;
  color: var(--faint);
}

/* ========================================================================
   Adaptation
   ======================================================================== */

/* Phones: backdrop-filter is the single most expensive thing on this page,
   and on a mid-range Android a full-screen blurred layer costs real frames.
   Below this width the fills become opaque enough to stand on their own and
   the blur is dropped. The design still reads as layered - just cheaply. */
@media (max-width: 640px) {
  :root {
    --blur: 0px;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-strong: rgba(255, 255, 255, 0.11);
  }
  :root[data-theme="light"] {
    --glass: rgba(255, 255, 255, 0.9);
    --glass-strong: rgba(255, 255, 255, 0.97);
  }
  .glass,
  .plan-card,
  .dash-card,
  .auth-card,
  .site-header,
  .site-footer,
  .btn-ghost,
  .message,
  .hero-points li {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body::before { animation: none; }
  main { padding-block: 1.75rem 3rem; }
  .auth-card { padding: 1.5rem; }
}

/* Same reasoning for anyone who has asked the browser to reduce transparency
   at the OS level. */
@media (prefers-reduced-transparency: reduce) {
  :root { --blur: 0px; --glass: var(--bg-2); --glass-strong: var(--bg-2); }
}

/* Motion is a decoration here, never information: with it off, every state
   the animations communicate is still reachable. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary:hover,
  .btn-ghost:hover,
  .plan-card:hover,
  .hero-points li:hover,
  .theme-toggle:hover { transform: none; }
}

/* Windows high-contrast mode strips backgrounds; borders have to carry the
   structure on their own. */
@media (forced-colors: active) {
  .glass, .plan-card, .dash-card, .auth-card { border: 1px solid CanvasText; }
  .quota-fill { background: Highlight; }
}
