/* ============================================================================
   Merydion portal — design system
   Warm, editorial, sovereign-European brand identity (shared with the apps:
   Hanken Grotesk + Fraunces, cream/green palette) dressed in a modern,
   Apple-inspired marketing layout: big type, generous space, soft depth,
   scroll-driven motion. Light + dark themes via [data-theme].
   ============================================================================ */

/* --- Optional brand fonts (served alongside the apps; graceful system fallback) --- */
@font-face { font-family: 'Hanken Grotesk'; src: url('/resources/fonts/hanken_grotesk/HankenGrotesk-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/resources/fonts/hanken_grotesk/HankenGrotesk-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/resources/fonts/fraunces/Fraunces-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

/* --- Design tokens ------------------------------------------------------- */
:root {
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;

  --bg: #f6f2ea;
  --bg-elev: #fffdf8;
  --bg-glass: rgba(246, 242, 234, 0.72);
  --bg-sunken: #efe8da;
  --ink: #1f1d18;
  --ink-soft: #5d584e;
  --ink-faint: #8c8676;
  --line: #e6dfcf;
  --line-soft: #efe8db;
  --accent: #1f7a5a;
  --accent-strong: #15614a;
  --accent-soft: rgba(31, 122, 90, 0.12);
  --accent-ink: #ffffff;
  --gold: #c08a2a;
  --status-up: #1f9d57;
  --status-down: #d23b3b;
  --status-wait: #c08a2a;

  --shadow-sm: 0 1px 2px rgba(40, 35, 25, 0.05), 0 2px 8px rgba(40, 35, 25, 0.05);
  --shadow: 0 4px 14px rgba(40, 35, 25, 0.07), 0 14px 40px rgba(40, 35, 25, 0.08);
  --shadow-lg: 0 10px 30px rgba(40, 35, 25, 0.10), 0 30px 80px rgba(40, 35, 25, 0.14);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --r-pill: 999px;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 11vw, 148px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  --bg: #0e1310;
  --bg-elev: #161d18;
  --bg-glass: rgba(14, 19, 16, 0.72);
  --bg-sunken: #0a0e0c;
  --ink: #f1efe7;
  --ink-soft: #bdb9ad;
  --ink-faint: #8b877b;
  --line: #29322b;
  --line-soft: #202823;
  --accent: #44b489;
  --accent-strong: #5fcb9f;
  --accent-soft: rgba(68, 180, 137, 0.16);
  --accent-ink: #06140d;
  --gold: #d7ab4e;
  --status-up: #45c785;
  --status-down: #f06464;
  --status-wait: #d7ab4e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
}

/* --- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden, .skip-link:not(:focus) {
  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: fixed; top: 14px; left: 14px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700;
}

/* --- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--font-sans); font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
[data-theme='dark'] .eyebrow { color: var(--accent-strong); }

.section-title { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.section-lead { color: var(--ink-soft); font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 60ch; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; display: grid; gap: 18px; justify-items: center; }
.section { padding-block: var(--section-y); }
.section-foot { text-align: center; margin-top: clamp(36px, 5vw, 56px); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
  will-change: transform;
}
.btn .ui-glyph { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .ui-glyph { transform: translateX(3px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--accent-soft); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 10px 26px var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--ink-faint); }
.btn-soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn-soft:hover { background: var(--accent); color: var(--accent-ink); }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--accent); }
.link-arrow .ui-glyph { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-arrow:hover .ui-glyph { transform: translateX(4px); }
[data-theme='dark'] .link-arrow { color: var(--accent-strong); }

.icon { width: 100%; height: 100%; }
.ui-glyph { width: 22px; height: 22px; }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header.hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -0.02em; color: var(--ink); }

.primary-nav { display: flex; gap: 4px; margin-inline: auto; }
.nav-link {
  padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.95rem;
  color: var(--ink-soft); transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--accent-soft); }
.nav-link[aria-current='page'] { color: var(--accent); }
[data-theme='dark'] .nav-link[aria-current='page'] { color: var(--accent-strong); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-pill);
  color: var(--ink-soft); transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--accent-soft); }

.theme-toggle .theme-moon { display: none; }
[data-theme='dark'] .theme-toggle .theme-sun { display: none; }
[data-theme='dark'] .theme-toggle .theme-moon { display: block; }

.header-cta { padding: 10px 18px; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: var(--r-pill); color: var(--ink-soft);
  font-weight: 600; font-size: 0.9rem; transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { color: var(--ink); background: var(--accent-soft); }
.lang-switch summary .ui-glyph { width: 19px; height: 19px; }
.lang-switch summary .ui-glyph:last-child { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.lang-switch[open] summary .ui-glyph:last-child { transform: rotate(180deg); }
.lang-current { font-variant-numeric: tabular-nums; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 196px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 7px; display: grid; gap: 2px;
  animation: pop 0.22s var(--ease);
}
.lang-opt { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.lang-opt:hover { background: var(--accent-soft); color: var(--ink); }
.lang-opt.active { color: var(--accent); }
.lang-tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; background: var(--bg-sunken); color: var(--ink-soft); padding: 3px 7px; border-radius: 6px; min-width: 30px; text-align: center; }
.lang-opt.active .lang-tag { background: var(--accent); color: var(--accent-ink); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Account menu (signed-in): avatar disc + dropdown. Mirrors the language switcher's pattern. */
.user-menu { position: relative; }
.user-avatar {
  list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 4px 12px var(--accent-soft);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.user-avatar::-webkit-details-marker { display: none; }
.user-avatar:hover { transform: translateY(-1px); background: var(--accent-strong); box-shadow: 0 8px 18px var(--accent-soft); }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 236px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 7px; display: grid; gap: 2px; animation: pop 0.22s var(--ease);
}
.user-menu-id { padding: 9px 11px 11px; display: grid; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu-name { font-size: 0.95rem; color: var(--ink); }
.user-menu-email { font-size: 0.82rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: var(--r-sm); color: var(--ink-soft);
  font-weight: 600; font-size: 0.92rem; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.user-menu-item:hover { background: var(--accent-soft); color: var(--ink); }
.user-menu-item .ui-glyph { width: 19px; height: 19px; flex: none; }
.user-menu-signout { color: var(--status-down); }
.user-menu-signout:hover { background: color-mix(in srgb, var(--status-down) 12%, transparent); color: var(--status-down); }

/* The signed-in swap toggles these via the [hidden] attribute, but each carries an author `display`
   rule (.btn, .mobile-user, .auth-card) that would otherwise beat the UA `[hidden] { display:none }`.
   Re-assert it at attribute-level specificity so hiding actually takes effect. */
.header-cta[hidden], .mobile-cta[hidden], .mobile-user[hidden], .auth-card[hidden] { display: none; }

.menu-toggle { display: none; }

/* Mobile nav */
.mobile-nav { display: none; }

/* --- Reveal animation (directional, staggered) --------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out), clip-path 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal='left'] { transform: translateX(-42px); }
[data-reveal='right'] { transform: translateX(42px); }
[data-reveal='scale'] { transform: scale(0.94); }
[data-reveal='clip'] { transform: translateY(14px); clip-path: inset(0 0 100% 0); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal='clip'].is-visible { clip-path: inset(0 0 0 0); }

/* --- Scroll progress bar (native scroll-driven; JS fallback via --scroll-progress) --- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 150; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(var(--scroll-progress, 0));
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress { transform: scaleX(0); animation: progress-grow linear both; animation-timeline: scroll(root block); }
    @keyframes progress-grow { to { transform: scaleX(1); } }
  }
}

/* --- Scroll-driven parallax on content visuals (native, decorative only) - */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feature-art, .product-detail-art {
      animation: art-parallax linear both; animation-timeline: view(); animation-range: entry 0% exit 100%;
    }
    @keyframes art-parallax { from { transform: translateY(26px); } to { transform: translateY(-26px); } }
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .btn, .product-card, .news-card, .value-card { transition: none !important; }
  .scroll-progress { display: none; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-bg { position: absolute; inset: -10% -10% 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: drift 18s var(--ease) infinite alternate; }
.blob-a { width: 46vw; height: 46vw; left: -8vw; top: -6vw; background: radial-gradient(circle, rgba(31,122,90,0.55), transparent 70%); }
.blob-b { width: 40vw; height: 40vw; right: -6vw; top: 4vw; background: radial-gradient(circle, rgba(192,138,42,0.4), transparent 70%); animation-delay: -6s; }
.blob-c { width: 34vw; height: 34vw; left: 30vw; bottom: -14vw; background: radial-gradient(circle, rgba(56,82,164,0.32), transparent 70%); animation-delay: -12s; }
[data-theme='dark'] .blob { opacity: 0.4; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 54px 54px; opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
@keyframes drift { to { transform: translate3d(4%, 5%, 0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(24px, 4vw, 56px); }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-eyebrow .euro-stars { width: 22px; height: 22px; color: var(--gold); }
.hero-title { font-size: clamp(2.6rem, 6.4vw, 4.7rem); letter-spacing: -0.035em; }
.hero-sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink-soft); max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-note { font-size: 0.92rem; color: var(--ink-faint); font-weight: 600; }

/* Hero visual (window mock + floating chips) */
.hero-visual { position: relative; z-index: 1; }
.window-mock {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; transform: rotateX(4deg) rotateY(-6deg); transform-style: preserve-3d;
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.window-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-bar .dot:nth-child(1) { background: #e6795b; }
.window-bar .dot:nth-child(2) { background: #e7b14e; }
.window-bar .dot:nth-child(3) { background: #5fb37e; }
.window-title { margin-left: 10px; font-size: 0.8rem; font-weight: 700; color: var(--ink-faint); }
.window-body { padding: 16px; }
/* App "screenshot" mock-ups (hand-authored SVG, theme-token painted). */
.app-screen { display: block; }
.window-body .app-screen { width: 100%; height: auto; }
.screen-caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .screen-caret { animation: none; } }

.float-card {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 9px 15px;
  font-size: 0.84rem; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
  animation: floaty 6s var(--ease) infinite alternate;
}
.float-card .ui-glyph { width: 18px; height: 18px; color: var(--accent); }
.float-card .euro-stars { width: 18px; height: 18px; color: var(--gold); }
.float-secure { top: 8%; left: -7%; }
.float-eu { bottom: 10%; right: -5%; animation-delay: -3s; }
@keyframes floaty { to { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .float-card { animation: none; } }

/* --- Trust strip --------------------------------------------------------- */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: clamp(18px, 4vw, 48px); justify-content: center;
  margin-top: clamp(36px, 5vw, 56px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line);
}
.trust-item { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }
.trust-item .ui-glyph, .trust-item .icon { width: 21px; height: 21px; color: var(--accent); }

/* --- Stats band ---------------------------------------------------------- */
.section-stats { padding-block: clamp(40px, 6vw, 72px); }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 4vw, 40px); }
.stat { text-align: center; display: grid; gap: 6px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
[data-theme='dark'] .stat-value { color: var(--accent-strong); }
.stat-label { color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; }

/* --- Product grid -------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.product-card {
  position: relative; display: grid; gap: 12px; align-content: start;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.product-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); opacity: 0; transition: opacity 0.4s var(--ease); }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.product-card:hover::before { opacity: 1; }
.product-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); position: relative; z-index: 1; }
.product-icon .icon { width: 28px; height: 28px; }
.product-name { font-size: 1.5rem; position: relative; z-index: 1; }
.product-tagline { color: var(--ink-soft); position: relative; z-index: 1; }
.product-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); font-size: 0.92rem; position: relative; z-index: 1; }
.product-more .ui-glyph { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
.product-card:hover .product-more .ui-glyph { transform: translateX(4px); }

/* --- Feature rows -------------------------------------------------------- */
.section-features .feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 84px); align-items: center; margin-bottom: clamp(56px, 9vw, 120px); }
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reversed .feature-copy { order: 2; }
.feature-copy { display: grid; gap: 18px; justify-items: start; }
.feature-badge { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.feature-badge .ui-glyph { width: 28px; height: 28px; }
.feature-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.feature-text { color: var(--ink-soft); font-size: 1.1rem; max-width: 46ch; }
.feature-list { display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.feature-list .ui-glyph { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 2px; }

.feature-art { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-xl); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.feature-art .art-glow { position: absolute; width: 70%; height: 70%; top: -10%; right: -10%; border-radius: 50%; filter: blur(50px); background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); }
.feature-art-sovereign .art-glow { background: radial-gradient(circle, rgba(56,82,164,0.5), transparent 70%); }
.feature-art-fast .art-glow { background: radial-gradient(circle, rgba(192,138,42,0.5), transparent 70%); }
.feature-art .art-lines { position: absolute; inset: 16% 14%; border-radius: var(--r-lg); background:
  repeating-linear-gradient(var(--bg-sunken) 0 9px, transparent 9px 30px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); opacity: 0.7; }

/* --- Value grid ---------------------------------------------------------- */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 22px); }
.value-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.value-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.value-icon .icon { width: 27px; height: 27px; }
.value-card h3 { font-size: 1.28rem; }
.value-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* --- Europe band --------------------------------------------------------- */
.europe-band { padding-block: var(--section-y); }
.europe-inner {
  position: relative; text-align: center; display: grid; gap: 22px; justify-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 92%, #000) 0%, var(--accent-strong) 100%);
  color: #fff; border-radius: var(--r-xl); padding: clamp(48px, 8vw, 90px) clamp(24px, 5vw, 72px); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.europe-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 80% 10%, rgba(255,255,255,0.16), transparent 60%); }
.europe-stars { position: relative; }
.europe-stars .euro-stars { width: 64px; height: 64px; color: var(--gold); }
.europe-title { position: relative; font-size: clamp(1.9rem, 4vw, 3rem); color: #fff; max-width: 18ch; }
.europe-text { position: relative; color: rgba(255,255,255,0.88); max-width: 60ch; font-size: clamp(1.02rem, 1.6vw, 1.2rem); }
.europe-actions { position: relative; }
.europe-actions .link-arrow { color: #fff; }
.cta-band .europe-inner { }

/* --- News ---------------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.news-card, .news-featured { display: grid; gap: 13px; align-content: start; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.news-card:hover, .news-featured:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.news-meta { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--ink-faint); font-weight: 600; }
.news-cat { color: var(--accent); background: var(--accent-soft); padding: 4px 11px; border-radius: var(--r-pill); --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent); }
.news-card-title { font-size: 1.3rem; }
.news-card-excerpt { color: var(--ink-soft); font-size: 0.97rem; }
.news-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.news-more .ui-glyph { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.news-card:hover .news-more .ui-glyph, .news-featured:hover .news-more .ui-glyph { transform: translateX(4px); }

.section-news .news-featured { grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: clamp(24px, 3vw, 36px); padding: 0; overflow: hidden; }
.news-featured-art { position: relative; min-height: 280px; height: 100%; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 88%, #000), var(--accent-strong)); display: grid; place-items: center; }
.news-featured-art .art-glow { position: absolute; width: 60%; height: 60%; top: -8%; left: -8%; border-radius: 50%; filter: blur(50px); background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%); }
.news-featured-mark { position: relative; color: rgba(255,255,255,0.92); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.4); padding: 8px 16px; border-radius: var(--r-pill); }
.news-featured-copy { padding: clamp(28px, 4vw, 44px) clamp(28px, 4vw, 44px) clamp(28px, 4vw, 44px) 0; display: grid; gap: 16px; }
.news-featured-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.news-featured-excerpt { color: var(--ink-soft); font-size: 1.05rem; }
.news-grid-full { margin-top: 0; }

/* --- Documents ----------------------------------------------------------- */
.doc-note { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--ink-soft); background: var(--accent-soft); border-radius: var(--r-pill); padding: 12px 22px; width: fit-content; margin: 0 auto clamp(40px, 6vw, 64px); font-weight: 600; }
.doc-note .ui-glyph { width: 20px; height: 20px; color: var(--accent); }
.doc-group { margin-bottom: clamp(40px, 6vw, 64px); }
.doc-group:last-child { margin-bottom: 0; }
.doc-group-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 20px); }
.doc-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 12px; box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.doc-format { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; }
.doc-format .ui-glyph { width: 20px; height: 20px; }
.doc-title { font-size: 1.2rem; }
.doc-desc { color: var(--ink-soft); font-size: 0.95rem; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.doc-size { color: var(--ink-faint); font-size: 0.85rem; font-weight: 600; }
.doc-download { padding: 9px 16px; font-size: 0.9rem; }
.doc-download .ui-glyph { width: 17px; height: 17px; }

/* Banner on the Documents page linking to the step-by-step Guides section. */
.doc-guides-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); margin-bottom: clamp(40px, 6vw, 64px); box-shadow: var(--shadow-sm); }
.doc-guides-promo-copy { display: grid; gap: 8px; }
.doc-guides-promo h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.doc-guides-promo p { color: var(--ink-soft); max-width: 62ch; }

/* --- Guides -------------------------------------------------------------- */
.section-guide-intro { padding-block: clamp(40px, 6vw, 80px); }
.section-guide-sections { background: var(--bg-sunken); }
.guide-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 22px); }
.guide-section-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 12px; align-content: start; box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.guide-section-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.guide-section-num { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.guide-section-card h3 { font-size: 1.2rem; }
.guide-section-card p { color: var(--ink-soft); font-size: 0.96rem; }
/* A section card that links to its detail page gets a clickable affordance. */
a.guide-section-card { text-decoration: none; color: inherit; }
.guide-section-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.guide-section-more .ui-glyph { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
a.guide-section-card:hover .guide-section-more .ui-glyph { transform: translateX(4px); }

/* --- Guide detail page (per-section how-to) ----------------------------- */
.section-guide-topics { padding-block: clamp(28px, 4vw, 52px) clamp(48px, 7vw, 90px); }
.guide-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: clamp(22px, 3vw, 36px); font-size: 0.92rem; color: var(--ink-soft); }
.guide-crumb a { color: var(--ink-soft); text-decoration: none; }
.guide-crumb a:hover { color: var(--accent); }
.guide-crumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.guide-crumb-sep { color: var(--ink-faint); }
.guide-topics { display: grid; gap: clamp(14px, 1.8vw, 20px); max-width: 860px; }
.guide-topic { background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--shadow-sm); }
.guide-topic-title { font-size: clamp(1.15rem, 1.8vw, 1.4rem); margin-bottom: 10px; }
.guide-topic-body { color: var(--ink-soft); }
.guide-topic-body p { margin-bottom: 8px; }
.guide-steps { margin: 14px 0 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.guide-steps li { position: relative; padding-left: 40px; color: var(--ink); min-height: 26px; display: flex; align-items: center; }
.guide-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; }
.guide-tip { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--ink); font-size: 0.94rem; }
.guide-tip .ui-glyph { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.guide-tip strong { color: var(--accent); }
.guide-back { display: inline-flex; align-items: center; gap: 8px; margin-top: clamp(26px, 3vw, 40px); color: var(--accent); font-weight: 600; text-decoration: none; }
.guide-back .ui-glyph { width: 18px; height: 18px; transform: rotate(180deg); transition: transform 0.3s var(--ease); }
.guide-back:hover .ui-glyph { transform: rotate(180deg) translateX(4px); }

/* --- Page hero (inner) --------------------------------------------------- */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(64px, 11vw, 130px) clamp(40px, 6vw, 72px); }
.page-hero-inner { position: relative; z-index: 1; max-width: 820px; display: grid; gap: 20px; }
.page-hero-title { font-size: clamp(2.4rem, 5.6vw, 4rem); letter-spacing: -0.035em; }
.page-hero-lead { font-size: clamp(1.1rem, 1.9vw, 1.4rem); color: var(--ink-soft); max-width: 60ch; }

/* --- Products page deep-dive -------------------------------------------- */
.product-detail { padding-block: clamp(48px, 7vw, 96px); }
.product-detail:nth-child(even) { background: var(--bg-sunken); }
.product-detail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.product-detail.reversed .product-detail-copy { order: 2; }
.product-detail-copy { display: grid; gap: 16px; justify-items: start; }
.product-detail-copy .eyebrow { color: var(--accent); }
.product-detail-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.product-detail-icon .icon { width: 32px; height: 32px; }
.product-detail-name { font-size: clamp(2rem, 4vw, 2.9rem); }
.product-detail-tagline { font-size: 1.2rem; color: var(--accent); font-weight: 700; }
.product-detail-desc { color: var(--ink-soft); display: grid; gap: 12px; }
.product-points { display: grid; gap: 18px; margin-top: 8px; }
.product-points li { display: flex; gap: 13px; align-items: flex-start; }
.product-points .ui-glyph { width: 24px; height: 24px; color: var(--accent); flex: none; margin-top: 2px; }
.product-points h4 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; margin-bottom: 2px; }
.product-points p { color: var(--ink-soft); font-size: 0.95rem; }
.product-detail-actions { margin-top: 10px; }
.btn-launch:hover .ui-glyph { transform: none; }
.product-detail-art { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; justify-self: center; }
.pd-glow { position: absolute; inset: 8%; border-radius: 50%; filter: blur(60px); background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); }
.pd-window { position: relative; height: 100%; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.pd-bar { display: flex; gap: 7px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pd-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.pd-screen { position: relative; z-index: 1; min-height: 0; padding: 14px; }
.pd-screen .app-screen { width: 100%; height: 100%; }

/* --- Compatibility band -------------------------------------------------- */
.section-compat .compat-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(36px, 5vw, 64px); box-shadow: var(--shadow); }
.compat-copy { display: grid; gap: 14px; }
.format-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.format-chip { font-family: var(--font-sans); font-weight: 800; letter-spacing: 0.04em; font-size: 1rem; padding: 14px 22px; border-radius: var(--r); background: var(--bg-sunken); border: 1px solid var(--line); color: var(--ink); transition: transform 0.3s var(--ease), border-color 0.3s var(--ease); }
.format-chip:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

/* --- About: mission / story / timeline ---------------------------------- */
.mission-inner { max-width: 1000px; margin: 0 auto; text-align: center; display: grid; gap: 24px; justify-items: center; }
.mission-statement { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.18; letter-spacing: -0.02em; max-width: 22ch; }
.story-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.story-copy { display: grid; gap: 16px; }
.story-prose { display: grid; gap: 16px; color: var(--ink-soft); font-size: 1.08rem; }
.story-aside { display: grid; gap: 16px; }
.story-stat { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; display: grid; gap: 4px; box-shadow: var(--shadow-sm); }
.story-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--accent); line-height: 1; }
.story-stat-label { color: var(--ink-soft); font-weight: 600; }

.timeline { position: relative; max-width: 760px; margin: 0 auto; display: grid; gap: 8px; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 18px 0 18px 28px; }
.timeline-dot { position: absolute; left: -30px; top: 24px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.timeline-when { font-weight: 800; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.timeline-title { font-size: 1.3rem; margin: 4px 0 6px; }
.timeline-body { color: var(--ink-soft); }

/* --- Offices ------------------------------------------------------------- */
.office-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.office-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.office-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.office-pin { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.office-pin .ui-glyph { width: 24px; height: 24px; }
.office-city { font-size: 1.4rem; }
.office-role { color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.office-address { color: var(--ink-soft); font-size: 0.96rem; }

/* --- Contacts ------------------------------------------------------------ */
.contact-method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 20px); }
.contact-method { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.contact-method:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.contact-method-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.contact-method-icon .ui-glyph { width: 24px; height: 24px; }
.contact-method-label { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; }
.contact-method-value { font-weight: 700; font-size: 1.05rem; color: var(--ink); word-break: break-word; }

.contact-form-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-form-copy { display: grid; gap: 16px; }
.contact-assurances { display: grid; gap: 12px; margin-top: 8px; }
.contact-assurances li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.contact-assurances .ui-glyph { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); }
.field input, .field textarea { font: inherit; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink); transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { color: var(--accent); font-weight: 700; font-size: 0.92rem; }

/* --- Sign-in (auth) ------------------------------------------------------ */
.section-auth { padding-block: clamp(8px, 2vw, 24px) var(--section-y); }
.auth-wrap { display: grid; justify-items: center; gap: 18px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 18px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); }
.auth-actions { display: grid; gap: 13px; justify-items: center; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-forgot { font-size: 0.92rem; color: var(--ink-soft); font-weight: 600; }
.auth-forgot:hover { color: var(--accent); }
.auth-alt { color: var(--ink-soft); font-size: 0.95rem; text-align: center; }

/* Profile page */
.profile-card { gap: 22px; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-avatar {
  width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  box-shadow: 0 6px 18px var(--accent-soft);
}
.profile-id { display: grid; gap: 2px; min-width: 0; }
.profile-signed-in-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
[data-theme='dark'] .profile-signed-in-label { color: var(--accent-strong); }
.profile-name { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.profile-email { color: var(--ink-soft); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; }
.profile-guest-title { font-family: var(--font-display); font-size: 1.3rem; }
/* Signed-in stack: identity header + the two self-service forms, stacked and centered. */
.profile-stack { display: grid; gap: 18px; width: 100%; max-width: 460px; }
.profile-stack .auth-card { max-width: none; }
.profile-form { text-align: left; }
.profile-section-title { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.2; color: var(--ink); }
.profile-section-lead { text-align: left; margin-top: -8px; }
.profile-form .field input:disabled, .profile-form .field input[readonly] {
  background: var(--bg-elev); color: var(--ink-faint); cursor: not-allowed;
}
/* Two fields side by side (name/surname, locale/time zone), collapsing on narrow viewports. */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* --- Newsletter (footer) ------------------------------------------------- */
.newsletter { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter input { flex: 1; min-width: 160px; font: inherit; padding: 12px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.newsletter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.newsletter .form-note { flex-basis: 100%; }

/* --- CTA band ------------------------------------------------------------ */
.cta-band { padding-block: var(--section-y); }
.cta-band .cta-inner { position: relative; text-align: center; display: grid; gap: 20px; justify-items: center; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 92%, #000), var(--accent-strong)); color: #fff; border-radius: var(--r-xl); padding: clamp(48px, 8vw, 96px) clamp(24px, 5vw, 72px); overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-band .cta-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 90% at 20% 0%, rgba(255,255,255,0.16), transparent 60%); }
.cta-stars { position: relative; }
.cta-stars .euro-stars { width: 56px; height: 56px; color: var(--gold); }
.cta-title { position: relative; color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 18ch; }
.cta-sub { position: relative; color: rgba(255,255,255,0.9); max-width: 50ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.cta-actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta-actions .btn-primary { background: #fff; color: var(--accent-strong); }
.cta-actions .btn-primary:hover { background: rgba(255,255,255,0.9); }
.cta-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-actions .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--bg-sunken); border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 88px); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.5fr; gap: clamp(28px, 4vw, 48px); padding-bottom: clamp(40px, 6vw, 64px); }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand .brand-mark { width: 40px; height: 40px; }
.footer-tagline { color: var(--ink-soft); max-width: 32ch; }
.eu-badge { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.eu-badge .euro-stars { width: 28px; height: 28px; color: var(--gold); }
.footer-col h3 { font-family: var(--font-sans); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-weight: 500; transition: color 0.2s var(--ease); display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-products a .icon { width: 18px; height: 18px; opacity: 0.75; }
.footer-products svg { flex: none; }
.footer-news h3 { font-family: var(--font-sans); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 12px; }
.footer-news p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-block: 24px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 0.88rem; }

/* --- Diagnostics (server health board) ----------------------------------- */
.diag-board { max-width: 920px; margin-inline: auto; }
.diag-toolbar { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: clamp(20px, 3vw, 32px); }
.diag-note { color: var(--ink-soft); font-size: 0.95rem; max-width: 56ch; }
.diag-controls { display: inline-flex; align-items: center; gap: 14px; }
.diag-stamp { color: var(--ink-faint); font-size: 0.85rem; white-space: nowrap; }
.diag-refresh { padding-block: 9px; }
.diag-list { list-style: none; display: grid; gap: clamp(12px, 1.6vw, 18px); padding: 0; margin: 0; }
.diag-item {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: clamp(14px, 2vw, 22px);
  background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-lg); padding: clamp(16px, 2.2vw, 24px) clamp(18px, 2.6vw, 28px); box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.diag-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.diag-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.diag-icon .icon, .diag-icon .ui-glyph { width: 24px; height: 24px; }
.diag-copy { display: grid; gap: 5px; min-width: 0; }
.diag-name { font-size: 1.15rem; }
.diag-desc { color: var(--ink-soft); font-size: 0.95rem; }
.diag-endpoint { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--ink-faint); }
.diag-status { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.diag-status-text { font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); }
/* Node rows (Nodes tab) carry no logs-link column — there's no per-node logs page yet — so the row
   drops to three tracks and the status stays flush with the card's right edge. */
.nodes-list .diag-item { grid-template-columns: auto 1fr auto; }
.diag-logs-link {
  width: 42px; height: 42px; display: grid; place-items: center; flex: none;
  border-radius: var(--r-sm); color: var(--ink-soft); border: 1px solid var(--line); background: var(--bg);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.diag-logs-link:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-1px); }
.diag-logs-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diag-logs-link .ui-glyph { width: 22px; height: 22px; }
/* The Upgrade row's trailing controls: a database-detail link + the (conditional) upgrade button. */
.diag-actions { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.diag-detail-link {
  width: 42px; height: 42px; display: grid; place-items: center; flex: none;
  border-radius: var(--r-sm); color: var(--ink-soft); border: 1px solid var(--line); background: var(--bg);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.diag-detail-link:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-1px); }
.diag-detail-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diag-detail-link .ui-glyph { width: 22px; height: 22px; }
/* The upgrade action: an accent-filled icon button (an upward arrow), shown only when a database is
   out of date. `hidden` (display:none) removes it from the row until the diagnosis needs it. */
.diag-upgrade-btn {
  width: 42px; height: 42px; display: grid; place-items: center; flex: none; cursor: pointer;
  border-radius: var(--r-sm); color: #fff; border: 1px solid transparent;
  background: var(--accent); box-shadow: var(--shadow-sm);
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
/* `display:grid` above would otherwise beat the UA `[hidden]{display:none}` (equal specificity →
   author wins), keeping the button visible even when the diagnosis hides it. This restores it. */
.diag-upgrade-btn[hidden] { display: none; }
.diag-upgrade-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.diag-upgrade-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diag-upgrade-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.diag-upgrade-btn .ui-glyph { width: 22px; height: 22px; }
.diag-light {
  width: 13px; height: 13px; border-radius: 50%; background: var(--status-wait); flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-wait) 22%, transparent);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.diag-item[data-state="up"] .diag-light { background: var(--status-up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-up) 24%, transparent); }
.diag-item[data-state="up"] .diag-status-text { color: var(--status-up); }
.diag-item[data-state="down"] .diag-light { background: var(--status-down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-down) 24%, transparent); }
.diag-item[data-state="down"] .diag-status-text { color: var(--status-down); }
.diag-item[data-state="checking"] .diag-light { animation: diag-pulse 1.1s var(--ease) infinite; }
@keyframes diag-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .diag-item[data-state="checking"] .diag-light { animation: none; } }
@media (max-width: 600px) {
  .diag-item { grid-template-columns: auto 1fr auto; }
  .diag-logs-link, .diag-actions { grid-column: 3; grid-row: 1; align-self: start; }
  .diag-status { grid-column: 1 / -1; grid-row: 2; padding-left: calc(44px + clamp(14px, 2vw, 22px)); }
}

/* --- Diagnostics: maintainer console scope tabs -------------------------- */
/* This page trades the marketing hero for a technical console: a scope tab bar sits at the very top
   (only "Status" today) and the live health board is its tab panel. The bar aligns to the board's
   own 920px column so tabs and cards share one left edge. Extra scopes will slot in as sibling tabs. */
.diag-console { padding-block: clamp(32px, 6vw, 72px) var(--section-y); }
.diag-scopebar {
  /* overflow-x:auto lets the tabs scroll horizontally when they overflow. CSS forces the other axis
     from `visible` to `auto` whenever one axis is non-visible, so a 1px sub-pixel/border overflow used
     to raise a spurious vertical scrollbar on the bar (its own height, at the right edge); pin
     overflow-y:hidden to suppress it while keeping the horizontal scroll. */
  display: flex; gap: 2px; align-items: stretch; overflow-x: auto; overflow-y: hidden;
  max-width: 920px; margin: 0 auto clamp(24px, 3.5vw, 40px);
  border-bottom: 1px solid var(--line);
}
.diag-scope {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 12px 18px; margin-bottom: -1px;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink-faint); background: none; border: 0; border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.diag-scope .ui-glyph { width: 18px; height: 18px; }
.diag-scope:hover { color: var(--ink); }
.diag-scope.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.diag-scope:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px 6px 0 0; }
.diag-scope-panel:focus-visible { outline: none; }

/* --- Diagnostics: account administration board --------------------------- */
/* The Account scope tab manages registered users against the auth admin API. The four state messages
   (sign-in / not-authorized / error / empty) and the JS-built user list share the board's 920px
   column; each user row can expand an inline reset-password form spanning its full width. */
.account-msg { color: var(--ink-soft); font-size: 0.98rem; max-width: 60ch; margin: 6px 0; }
.account-msg--error { color: var(--status-down); }
.account-msg[hidden] { display: none; }
.account-list { list-style: none; display: grid; gap: clamp(12px, 1.6vw, 18px); padding: 0; margin: 0; }
.account-list[hidden] { display: none; }
.account-item {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: clamp(12px, 2vw, 22px);
  background: var(--bg-elev); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-lg); padding: clamp(14px, 2vw, 22px) clamp(16px, 2.4vw, 26px); box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.account-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.account-copy { display: grid; gap: 4px; min-width: 0; }
.account-name { font-size: 1.1rem; overflow-wrap: anywhere; }
.account-id { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.78rem; font-weight: 400; color: var(--ink-faint); overflow-wrap: anywhere; }
.account-email { color: var(--ink-soft); font-size: 0.92rem; overflow-wrap: anywhere; }
.account-meta { color: var(--ink-faint); font-size: 0.85rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.account-badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--ink-faint) 16%, transparent); color: var(--ink-soft);
}
.account-badge--active { background: color-mix(in srgb, var(--status-up) 18%, transparent); color: var(--status-up); }
.account-badge--suspended { background: color-mix(in srgb, var(--gold) 20%, transparent); color: color-mix(in srgb, var(--gold) 72%, var(--ink)); }
.account-badge--deactivated { background: color-mix(in srgb, var(--status-down) 16%, transparent); color: var(--status-down); }
.account-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.account-btn {
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.account-btn:hover { transform: translateY(-1px); }
.account-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.account-btn--ghost:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.account-btn--solid { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: var(--shadow-sm); }
.account-btn--solid:hover { filter: brightness(1.06); }
.account-btn--danger { color: var(--status-down); border-color: color-mix(in srgb, var(--status-down) 40%, var(--line)); }
.account-btn--danger:hover { background: var(--status-down); color: #fff; border-color: transparent; }
.account-reset {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.account-reset[hidden] { display: none; }
.account-reset-input {
  flex: 1 1 220px; min-width: 160px; font: inherit; font-size: 0.95rem;
  padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.account-reset-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.account-reset-status { flex-basis: 100%; margin: 2px 0 0; font-size: 0.86rem; color: var(--status-up); }
.account-reset-status[hidden] { display: none; }
.account-reset-status--error { color: var(--status-down); }
/* Create user: the form at the bottom of the board that adds a new (already-active) account. */
.account-create {
  margin-top: clamp(16px, 2vw, 24px); padding-top: 18px; border-top: 1px solid var(--line);
}
.account-create-title { margin: 0 0 4px; font-size: 1.02rem; }
.account-create-note { margin: 0 0 12px; }
.account-create-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-create-input {
  flex: 1 1 220px; min-width: 160px; font: inherit; font-size: 0.95rem;
  padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.account-create-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.account-create-status { flex-basis: auto; margin-top: 10px; }
/* Access log: the inline per-user audit trail (login/logout/admin events) below a user row. */
.account-log {
  grid-column: 1 / -1; margin-top: 4px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.account-log[hidden] { display: none; }
.account-log-scroll { overflow-x: auto; }
.account-log-empty { margin: 0; font-size: 0.86rem; color: var(--ink-faint); }
.account-log-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.account-log-table th, .account-log-table td {
  text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top;
}
.account-log-table th { color: var(--ink-faint); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em; }
.account-log-time { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.account-log-agent { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; }
.account-log-row--failure .account-log-outcome { color: var(--status-down); font-weight: 600; }
.account-log-row--success .account-log-outcome { color: var(--status-up); }
@media (max-width: 600px) {
  .account-item { grid-template-columns: 1fr; }
  .account-actions { justify-content: flex-start; }
}

/* --- Diagnostics: sharing-governance administration board ----------------- */
/* The Governance scope tab (twin of the Account board above) manages the tenant's sharing policy,
   sensitivity-label catalog and audit log against the auth admin governance API. Three stacked
   card sections share the board's 920px column; the label list and audit table reuse the account
   board's badge/table primitives so the two boards read as one system. */
.governance-body[hidden] { display: none; }
.governance-tenant-field { max-width: 260px; margin-bottom: clamp(20px, 3vw, 32px); }
.governance-section {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(18px, 2.4vw, 28px); box-shadow: var(--shadow-sm);
  margin-bottom: clamp(16px, 2.4vw, 24px);
}
.governance-section:last-child { margin-bottom: 0; }
.governance-title { font-size: 1.15rem; margin: 0 0 4px; }
.governance-lead { color: var(--ink-soft); font-size: 0.92rem; max-width: 60ch; margin: 0 0 16px; }
.governance-toggles { display: grid; gap: 10px; margin-bottom: 16px; }
.governance-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; cursor: pointer; width: fit-content; }
.governance-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.governance-toggle--inline { margin: 0 4px; }
.governance-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.governance-actions .btn { width: auto; }
.governance-label-list { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0 0 16px; }
.governance-label-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
}
.governance-label-swatch {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent);
}
.governance-label-name { font-weight: 600; overflow-wrap: anywhere; }
.governance-label-badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--status-down) 16%, transparent); color: var(--status-down);
}
.governance-label-delete { margin-left: auto; }
.governance-label-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
.governance-label-input {
  flex: 1 1 200px; min-width: 160px; font: inherit; font-size: 0.95rem;
  padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.governance-label-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.governance-color-field { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ink-soft); }
.governance-color-select {
  font: inherit; font-size: 0.9rem; padding: 8px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.governance-audit-limit-field { max-width: 140px; margin-bottom: 14px; }
.governance-audit-table td, .governance-audit-table th { white-space: normal; }
@media (max-width: 600px) {
  .governance-label-item { flex-wrap: wrap; }
  .governance-label-delete { margin-left: 0; }
}

/* --- Diagnostics: tenant (organization) administration board --------------- */
/* The Tenant scope tab (twin of the Account/Governance boards) lists the identity plane's real
   organizations, renames them, creates new ones and manages memberships against the auth admin tenant
   API. Reuses the account board's list/button/status primitives so the boards read as one system. */
.tenant-body[hidden] { display: none; }
.tenant-item { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tenant-item:last-of-type { border-bottom: 0; }
.tenant-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tenant-name-input {
  flex: 1 1 220px; min-width: 160px; font: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.tenant-name-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.tenant-meta { font-size: 0.84rem; color: var(--ink-soft); white-space: nowrap; }
.tenant-count { font-variant-numeric: tabular-nums; }
.tenant-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.tenant-row-status { margin: 6px 0 0; }
.tenant-members-panel {
  margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-sunken);
}
.tenant-members-panel[hidden] { display: none; }
.tenant-members-heading { margin: 0 0 10px; font-size: 0.95rem; }
.tenant-member-list { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0 0 14px; }
.tenant-member-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
}
.tenant-member-who { font-weight: 600; overflow-wrap: anywhere; }
.tenant-member-email { font-size: 0.84rem; color: var(--ink-faint); overflow-wrap: anywhere; }
.tenant-member-role {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.tenant-member-item .account-btn { margin-left: auto; }
.tenant-associate-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.tenant-select {
  font: inherit; font-size: 0.9rem; padding: 8px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.tenant-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
@media (max-width: 600px) {
  .tenant-actions { margin-left: 0; }
  .tenant-member-item .account-btn { margin-left: 0; }
}

/* --- Upgrade: per-server database-detail page ----------------------------- */
.updetail .diag-toolbar { align-items: flex-start; }
.updetail-summary {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap;
}
.updetail-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.updetail-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.updetail-table thead th {
  text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint); font-weight: 700; padding: 14px clamp(12px, 1.6vw, 18px);
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-sunken);
}
.updetail-table tbody td { padding: 14px clamp(12px, 1.6vw, 18px); border-bottom: 1px solid var(--line); vertical-align: middle; }
.updetail-table tbody tr:last-child td { border-bottom: 0; }
.updetail-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.updetail-name { font-weight: 600; white-space: nowrap; }
.updetail-path { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--ink-faint); word-break: break-all; }
.updetail-current, .updetail-target { color: var(--ink-soft); white-space: nowrap; }
.updetail-state { white-space: nowrap; }
.updetail-badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg);
}
.updetail-badge-ok { color: var(--status-up); border-color: color-mix(in srgb, var(--status-up) 45%, var(--line)); background: color-mix(in srgb, var(--status-up) 12%, transparent); }
.updetail-badge-outdated, .updetail-badge-toonew { color: var(--status-down); border-color: color-mix(in srgb, var(--status-down) 45%, var(--line)); background: color-mix(in srgb, var(--status-down) 12%, transparent); }
.updetail-badge-missing { color: #c08a2a; border-color: color-mix(in srgb, #c08a2a 45%, var(--line)); background: color-mix(in srgb, #c08a2a 12%, transparent); }
.updetail-empty { margin-top: 16px; color: var(--ink-soft); font-size: 0.95rem; text-align: center; }

/* --- Per-service health-detail page (deep per-subsystem diagnosis, ADR 0151) --- */
/* The Status board status label is a link to the health-detail page. */
.diag-status-link { text-decoration: none; color: inherit; cursor: pointer; border-radius: 8px; transition: color 0.15s ease; }
.diag-status-link:hover .diag-status-text { text-decoration: underline; }
.diag-status-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Aggregate status pill in the toolbar. */
.health-overall { font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); white-space: nowrap; }
.health-overall-ok { color: var(--status-up); }
.health-overall-degraded { color: var(--status-wait); }
.health-overall-down { color: var(--status-down); }
/* One card per subsystem. */
.health-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(12px, 1.6vw, 18px); margin-top: 8px; }
.health-card { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); padding: clamp(14px, 1.8vw, 20px); }
.health-card-ok { border-left-color: var(--status-up); }
.health-card-degraded { border-left-color: var(--status-wait); }
.health-card-down { border-left-color: var(--status-down); }
.health-card-head { display: flex; align-items: center; gap: 10px; }
.health-card-light { width: 11px; height: 11px; border-radius: 50%; background: var(--status-wait); flex: none; }
.health-card-ok .health-card-light { background: var(--status-up); }
.health-card-degraded .health-card-light { background: var(--status-wait); }
.health-card-down .health-card-light { background: var(--status-down); }
.health-card-name { font-weight: 600; font-size: 0.98rem; flex: 1 1 auto; }
.health-card-badge { font-size: 0.76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.health-card-ok .health-card-badge { color: var(--status-up); border-color: color-mix(in srgb, var(--status-up) 45%, var(--line)); background: color-mix(in srgb, var(--status-up) 12%, transparent); }
.health-card-degraded .health-card-badge { color: var(--status-wait); border-color: color-mix(in srgb, var(--status-wait) 45%, var(--line)); background: color-mix(in srgb, var(--status-wait) 12%, transparent); }
.health-card-down .health-card-badge { color: var(--status-down); border-color: color-mix(in srgb, var(--status-down) 45%, var(--line)); background: color-mix(in srgb, var(--status-down) 12%, transparent); }
.health-card-summary { margin: 10px 0 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }
.health-metrics { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: 0.85rem; }
.health-metrics dt { color: var(--ink-faint); font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; }
.health-metrics dd { margin: 0; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; word-break: break-all; }
.health-empty { margin-top: 16px; color: var(--ink-soft); font-size: 0.95rem; text-align: center; }

/* --- Per-service logs page (live console, wired to /diagnostics/logs) ----- */
.log-console {
  max-width: 920px; margin-inline: auto; margin-top: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-elev); box-shadow: var(--shadow-sm);
}
.log-console-head {
  display: flex; align-items: center; gap: 8px; padding: 12px clamp(14px, 2vw, 20px);
  background: var(--bg-sunken); border-bottom: 1px solid var(--line);
}
.log-console-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); flex: none; }
.log-console-title {
  margin-left: 8px; min-width: 0; font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.82rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.log-stream {
  list-style: none; margin: 0; padding: clamp(14px, 2vw, 20px); display: grid; gap: 7px;
  max-height: 60vh; overflow: auto; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.85rem;
}
.log-line { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 16px; align-items: baseline; }
.log-line time { color: var(--ink-faint); white-space: nowrap; }
.log-level { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; }
.log-msg { color: var(--ink-soft); word-break: break-word; }
.log-info .log-level { color: var(--status-up); }
.log-debug .log-level { color: var(--ink-faint); }
.log-trace .log-level { color: var(--ink-faint); }
.log-warn .log-level { color: #c08a2a; }
.log-error .log-level { color: var(--status-down); }
/* Live-console controls: the day selector (in the board toolbar) and the in-console status lines. */
.log-date-field { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.log-date-select { font: inherit; font-weight: 500; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); color: var(--ink); cursor: pointer; }
.log-truncated { margin: 0; padding: 12px clamp(14px, 2vw, 20px) 0; color: var(--ink-faint); font-size: 0.8rem; font-style: italic; }
.log-status { margin: 0; padding: clamp(14px, 2vw, 20px); color: var(--ink-faint); font-size: 0.9rem; }
.log-status[hidden] { display: none; }
@media (max-width: 600px) {
  .log-line { grid-template-columns: auto 1fr; }
  .log-line time { grid-column: 1 / -1; }
}

/* --- Cross-document view transitions (progressive; the sticky chrome stays pinned
       while the page content cross-fades + slides). Ignored by browsers without the
       MPA View Transitions API, which fall back to an instant navigation. ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 0.26s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.42s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .primary-nav { display: none; }
  .header-cta { display: none; }
  .user-menu { display: none; }
  .menu-toggle { display: grid; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; margin-inline: auto; }
  .hero-copy { justify-items: center; text-align: center; }
  .hero-sub { max-width: 50ch; }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-sections { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .feature-row.reversed { grid-template-columns: 1fr; }
  .feature-row .feature-art { order: -1; }
  .feature-row.reversed .feature-copy { order: 0; }
  .feature-copy { justify-items: center; text-align: center; }
  .feature-list { justify-items: start; text-align: left; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .section-news .news-featured { grid-template-columns: 1fr; }
  .news-featured-copy { padding: clamp(24px,5vw,40px); }
  .product-detail-inner, .product-detail.reversed .product-detail-inner { grid-template-columns: 1fr; }
  .product-detail.reversed .product-detail-copy { order: 0; }
  .product-detail-art { order: -1; }
  .product-detail-copy { justify-items: center; text-align: center; }
  .product-points { text-align: left; }
  .section-compat .compat-inner { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .office-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-method-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-news { grid-column: 1 / -1; }

  /* Mobile nav panel */
  .mobile-nav { display: block; position: fixed; inset: 68px 0 auto; z-index: 99;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    padding: 18px var(--gutter) 26px; transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), visibility 0.35s; max-height: calc(100vh - 68px); overflow-y: auto; }
  .mobile-nav.open { transform: none; opacity: 1; visibility: visible; }
  .mobile-nav[hidden] { display: block; }
  .mobile-nav nav { display: grid; gap: 4px; }
  .mobile-link { padding: 14px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 1.1rem; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
  .mobile-link[aria-current='page'] { color: var(--accent); }
  .mobile-cta { margin-top: 18px; width: 100%; justify-content: center; }
  .mobile-user { display: grid; gap: 4px; margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
  .mobile-user .mobile-link { width: 100%; text-align: left; }
  .mobile-signout { color: var(--status-down); border-bottom: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .product-grid, .value-grid, .news-grid, .news-grid-full, .doc-grid, .guide-sections, .office-grid, .contact-method-grid, .contact-form { grid-template-columns: 1fr; }
  .brand-word { font-size: 1.18rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

/* ============================================================
   Workspace — the signed-in home/dashboard (page-workspace).
   Reuses the shared tokens, .eyebrow, .btn, .icon-btn, .link-arrow
   and .auth-card; everything else is namespaced .ws-* to avoid
   collisions. Per-app tint arrives via an inline `--accent`.
   ============================================================ */
.ws-num { font-variant-numeric: tabular-nums; }

/* The header "open your workspace" icon: shown only when signed in (app.js). */
.workspace-link[hidden] { display: none; }

/* Tighten the gap under the sticky header: the workspace lands straight on its
   summary cards, so it forgoes the full section rhythm above the content. */
.section[data-workspace] { padding-top: clamp(16px, 2.4vw, 28px); }
.ws-dash { display: flex; flex-direction: column; gap: clamp(28px, 3.4vw, 44px);
  padding-top: clamp(6px, 1.2vw, 14px); padding-bottom: clamp(48px, 7vw, 88px); }
[data-ws-signed-in]:not([hidden]) { animation: ws-rise 0.5s var(--ease) both; }
@keyframes ws-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ws-search { display: flex; align-items: center; gap: 9px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 10px 16px; min-width: 260px; color: var(--ink-faint); box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.ws-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ws-search .ui-glyph { width: 17px; height: 17px; flex: none; }
.ws-search input { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 0.96rem; width: 100%; outline: none; }
.ws-search input::placeholder { color: var(--ink-faint); }

/* KPI row */
.ws-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.ws-kpi { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.ws-kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.ws-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ws-kpi-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }
.ws-kpi-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  color: var(--accent); background: var(--accent-soft); }
.ws-kpi-ic .icon, .ws-kpi-ic .ui-glyph { width: 20px; height: 20px; }
.ws-kpi-val { font-family: var(--font-display); font-weight: 700; font-size: 2.25rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.ws-kpi-val small { font-family: var(--font-sans); font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.ws-kpi-note { font-size: 0.88rem; color: var(--ink-soft); min-height: 1.2em; }
.ws-kpi-note strong { color: var(--ink); }
.ws-kpi a.ws-kpi-cta { color: var(--accent-strong); font-weight: 700; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }
.ws-meter { height: 8px; border-radius: var(--r-pill); background: var(--accent-soft); overflow: hidden; }
.ws-meter-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), var(--accent-strong)); width: 0; transition: width 0.6s var(--ease); }
.ws-meter-fill.ws-warn { background: linear-gradient(90deg, var(--status-wait), var(--status-wait)); }
.ws-meter-fill.ws-crit { background: linear-gradient(90deg, var(--status-down), var(--status-down)); }
.ws-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.ws-chip-warn { background: color-mix(in srgb, var(--status-wait) 18%, transparent); color: var(--status-wait); }

/* Block heads */
.ws-block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ws-block-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.ws-block-head .ws-rail-title { font-size: 1.3rem; }

/* App launcher */
.ws-app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); gap: 16px; }
.ws-app-tile { position: relative; padding: 22px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; overflow: hidden; color: var(--ink);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.ws-app-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); opacity: 0.9; }
.ws-app-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ws-app-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ws-app-ic .icon { width: 25px; height: 25px; }
.ws-app-name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.ws-app-desc { font-size: 0.9rem; color: var(--ink-soft); margin-top: -6px; }
.ws-app-go { display: inline-flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 700; color: var(--accent-strong); margin-top: auto; }
.ws-app-go .ui-glyph { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.ws-app-tile:hover .ws-app-go .ui-glyph { transform: translate(2px, -2px); }
.ws-app-badge { position: absolute; top: 15px; right: 15px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-size: 0.8rem; font-weight: 800; display: none; place-items: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.ws-app-badge:not(:empty) { display: grid; }

/* Lower grid: recent files + rail */
.ws-lower { display: grid; grid-template-columns: 1.9fr 1fr; gap: 20px; align-items: start; }
.ws-panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 24px; }
.ws-empty { color: var(--ink-faint); font-size: 0.94rem; padding: 8px 4px; margin: 0; }

.ws-file-list { display: flex; flex-direction: column; }
.ws-file-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 15px;
  padding: 12px; border-radius: var(--r); transition: background 0.2s var(--ease); color: var(--ink); }
.ws-file-row + .ws-file-row { border-top: 1px solid var(--line-soft); }
.ws-file-row:hover { background: var(--accent-soft); }
.ws-file-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ws-file-ic .icon { width: 21px; height: 21px; }
.ws-file-name { font-weight: 600; font-size: 1rem; word-break: break-word; }
.ws-file-meta { font-size: 0.84rem; color: var(--ink-faint); }
.ws-file-time { font-size: 0.86rem; color: var(--ink-soft); white-space: nowrap; }
.ws-file-go { width: 26px; height: 26px; display: grid; place-items: center; color: var(--ink-faint); opacity: 0; transition: opacity 0.2s var(--ease), color 0.2s var(--ease); }
.ws-file-row:hover .ws-file-go { opacity: 1; color: var(--accent-strong); }
.ws-file-go .ui-glyph { width: 16px; height: 16px; }

.ws-rail { display: flex; flex-direction: column; gap: 20px; }
.ws-act-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ws-act { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 11px 4px; }
.ws-act + .ws-act { border-top: 1px solid var(--line-soft); }
.ws-act-dot { width: 34px; height: 34px; border-radius: var(--r-pill); display: grid; place-items: center; flex: none;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.ws-act-dot .icon, .ws-act-dot .ui-glyph { width: 17px; height: 17px; }
.ws-act-text { font-size: 0.92rem; line-height: 1.45; }
.ws-act-text strong { font-weight: 700; }
.ws-act-time { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-top: 2px; }
.ws-ql { display: flex; flex-direction: column; gap: 4px; }
.ws-ql a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r); color: var(--ink-soft); font-weight: 600; font-size: 0.96rem; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.ws-ql a:hover { background: var(--accent-soft); color: var(--ink); }
.ws-ql .icon, .ws-ql .ui-glyph { width: 18px; height: 18px; color: var(--accent); }

@media (max-width: 900px) { .ws-lower { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .ws-search { flex: 1; min-width: 0; }
  .ws-file-time { display: none; }
}

/* --- Node metrics page (ADR 0157) --------------------------------------- */
/* A Nodes-tab row is a link to its metrics page: the row splits into [link | status], the link lays
   out icon/copy/chevron, and hovering hints the drill-down. */
.nodes-list .node-item { grid-template-columns: 1fr auto; }
.node-open {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(14px, 2vw, 22px); text-decoration: none; color: inherit; min-width: 0; border-radius: var(--r);
}
.node-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.node-open .diag-name { transition: color 0.25s var(--ease); }
.node-open-chevron { display: grid; place-items: center; color: var(--ink-faint); transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.node-open-chevron .ui-glyph { width: 20px; height: 20px; }
.node-item:hover .node-open-chevron { color: var(--accent); transform: translateX(4px); }
.node-item:hover .diag-name { color: var(--accent); }
@media (max-width: 600px) {
  .nodes-list .node-item { grid-template-columns: 1fr; }
  .nodes-list .node-item .diag-status { grid-column: 1; grid-row: 2; padding-left: calc(44px + clamp(14px, 2vw, 22px)); }
}

/* The metrics board is wider than the other console boards — the charts want room. */
.section-node-metrics .node-metrics-board { max-width: 1080px; margin-inline: auto; }
.node-metrics-msg { color: var(--ink-soft); text-align: center; padding: clamp(30px, 6vw, 60px) 0; font-size: 0.98rem; }
.node-metrics-content { display: grid; gap: clamp(16px, 2.4vw, 26px); }
.node-metrics-content[hidden] { display: none; }

.metric-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 1.8vw, 20px); }
.metric-card {
  --chart: var(--accent);
  display: grid; gap: 12px; align-content: start;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elev);
  box-shadow: var(--shadow-sm); padding: clamp(16px, 2vw, 22px);
}
.metric-card[hidden] { display: none; }
.metric-card-mem { --chart: #4f7cc9; }
[data-theme='dark'] .metric-card-mem { --chart: #79a6e6; }
.metric-card-net { --chart: #0f8a8a; }
[data-theme='dark'] .metric-card-net { --chart: #5ec7c7; }
.metric-card-disk { --chart: var(--gold); }
.metric-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.metric-card-title { font-size: 1.05rem; font-weight: 650; }
.metric-card-now { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; line-height: 1; color: var(--chart); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.metric-card-mount { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.8rem; font-weight: 500; color: var(--ink-faint); }
.metric-card-sub { color: var(--ink-soft); font-size: 0.86rem; margin-top: -4px; }
.metric-chart { width: 100%; }
.metric-chart svg { width: 100%; height: auto; display: block; }

/* Network card: two rows (received/sent) reusing the per-process metric row layout. */
.metric-net { display: grid; gap: 10px; }

/* SVG chart primitives. The per-metric hues are deliberate, data-driven colours (a legitimate
   exception to the site's accent-only palette) picked to read on both light and dark card surfaces. */
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { fill: var(--ink-faint); font-size: 13px; font-family: var(--font-sans); }
.chart-area { fill: var(--chart); opacity: 0.16; }
.chart-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--chart); }

/* Disk gauge. */
.disk-gauge { height: 16px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--gold) 15%, var(--bg-sunken)); overflow: hidden; }
.disk-gauge-fill { height: 100%; border-radius: var(--r-pill); background: var(--gold); transition: width 0.6s var(--ease); }
.disk-gauge-fill.is-low { background: var(--status-down); }
.disk-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 10px; margin: 0; }
.disk-figures div { display: grid; gap: 2px; }
.disk-figures dt { color: var(--ink-faint); font-size: 0.77rem; }
.disk-figures dd { font-weight: 650; font-size: 0.98rem; font-variant-numeric: tabular-nums; }

/* Per-process grid. */
.metric-procs { border-top: 1px solid var(--line); padding-top: clamp(16px, 2vw, 22px); display: grid; gap: 14px; }
.metric-procs-title { font-size: 1.05rem; font-weight: 650; }
.proc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(12px, 1.6vw, 16px); }
.proc-card { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 14px 16px; }
.proc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.proc-name { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-pid { color: var(--ink-faint); font-size: 0.77rem; white-space: nowrap; flex: none; }
.proc-metric { --chart: var(--accent); display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; }
.proc-metric-mem { --chart: #4f7cc9; }
[data-theme='dark'] .proc-metric-mem { --chart: #79a6e6; }
.proc-metric-label { color: var(--ink-faint); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.proc-spark { width: 100%; min-width: 0; }
.proc-spark svg { width: 100%; height: 30px; display: block; }
.proc-metric-val { font-weight: 650; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.proc-empty { color: var(--ink-soft); }

/* Network metric rows: received (teal) and sent (amber) — data-driven hues that read on both themes. */
.net-metric-rx { --chart: #0f8a8a; }
[data-theme='dark'] .net-metric-rx { --chart: #5ec7c7; }
.net-metric-tx { --chart: #c9791f; }
[data-theme='dark'] .net-metric-tx { --chart: #e6a24f; }

/* Monthly network cumulative (current + previous calendar month, server local time). */
.metric-monthly { border-top: 1px solid var(--line); padding-top: clamp(16px, 2vw, 22px); display: grid; gap: 6px; }
.metric-monthly-title { font-size: 1.05rem; font-weight: 650; }
.metric-monthly-sub { color: var(--ink-soft); font-size: 0.86rem; margin-bottom: 6px; }
.monthly-grid { display: grid; gap: 8px; }
.monthly-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: clamp(12px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 12px 16px; }
.monthly-month { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.95rem; font-weight: 650; }
.monthly-rx, .monthly-tx { font-weight: 650; font-size: 0.92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.monthly-rx { color: #0f8a8a; }
[data-theme='dark'] .monthly-rx { color: #5ec7c7; }
.monthly-tx { color: #c9791f; }
[data-theme='dark'] .monthly-tx { color: #e6a24f; }
.monthly-empty { color: var(--ink-soft); }
