/* ============================================================================
   Nocturne — Gosei public site design system
   Ported from the Claude Design handoff (ds/styles.css). Dark is the default
   look; a light variant is provided and chosen via <html data-theme="...">.
   Applies to the PUBLIC site only; the admin area keeps MudBlazor/Bootstrap.
   ============================================================================ */

:root {
  /* ---- Dark theme (default) ---- */
  --color-bg: #161826;
  --color-bg-deep: #0e0f18;
  --color-surface: #232532;
  --color-surface-2: #1c1e2b;
  --color-text: #e9e9ed;
  --color-muted: #b2b6ca;   /* neutral-400 — body secondary text */
  --color-faint: #9397ab;   /* neutral-500 — meta */
  --color-fainter: #75798c; /* neutral-600 */
  --color-accent: #9184d9;
  --color-accent-text: #d2cefd; /* accent-300 — accent text on dark ground */
  --color-accent-weak: #423a6a; /* accent-800 — tinted fills */
  --color-accent-weak-text: #e7e5fe; /* accent-200 */
  --color-neutral-tint: #3f424d; /* neutral-800 */
  --color-neutral-tint-text: #f3f5fe;
  --color-divider: rgba(233, 233, 237, .16);
  --color-divider-strong: rgba(233, 233, 237, .28);

  /* Saturated indigo band (stat strip / section dividers) */
  --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-text: #e7e5fe;
  --color-section-sub: #b5afe8;

  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --heading-weight: 500;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0, 0, 0, .55);
  --shadow-lg: 0 0 0 1px #9397ab33, 0 16px 40px rgba(0, 0, 0, .65);

  --gutter: 48px;
  --maxw: 1160px;
  color-scheme: dark;
}

/* Explicit dark (toggle) — same as defaults, kept for clarity/override wins */
:root[data-theme="dark"] { color-scheme: dark; }

/* ---- Light theme ---- */
:root[data-theme="light"] {
  --color-bg: #f4f6fc;
  --color-bg-deep: #eef1f9;
  --color-surface: #ffffff;
  --color-surface-2: #f7f8fd;
  --color-text: #20222e;
  --color-muted: #545a6b;
  --color-faint: #6b7183;
  --color-fainter: #8a90a2;
  --color-accent: #6f5fb8;
  --color-accent-text: #5a4a9e;
  --color-accent-weak: #ece9fb;
  --color-accent-weak-text: #4a3d86;
  --color-neutral-tint: #eceef5;
  --color-neutral-tint-text: #33384a;
  --color-divider: rgba(24, 24, 48, .12);
  --color-divider-strong: rgba(24, 24, 48, .2);

  --color-section: #2b2f68;
  --color-section-glow: #3b4290;
  --color-section-text: #eeecfb;
  --color-section-sub: #c9c3ee;

  --shadow-sm: 0 0 0 1px rgba(24, 24, 48, .1);
  --shadow-md: 0 0 0 1px rgba(24, 24, 48, .08), 0 6px 18px rgba(24, 24, 48, .1);
  --shadow-lg: 0 0 0 1px rgba(24, 24, 48, .08), 0 18px 44px rgba(24, 24, 48, .16);
  color-scheme: light;
}

/* System preference fallback when JS hasn't set an explicit theme */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg: #f4f6fc; --color-bg-deep: #eef1f9; --color-surface: #ffffff;
    --color-surface-2: #f7f8fd; --color-text: #20222e; --color-muted: #545a6b;
    --color-faint: #6b7183; --color-fainter: #8a90a2; --color-accent: #6f5fb8;
    --color-accent-text: #5a4a9e; --color-accent-weak: #ece9fb;
    --color-accent-weak-text: #4a3d86; --color-neutral-tint: #eceef5;
    --color-neutral-tint-text: #33384a; --color-divider: rgba(24, 24, 48, .12);
    --color-divider-strong: rgba(24, 24, 48, .2);
    --shadow-sm: 0 0 0 1px rgba(24, 24, 48, .1);
    --shadow-md: 0 0 0 1px rgba(24, 24, 48, .08), 0 6px 18px rgba(24, 24, 48, .1);
    --shadow-lg: 0 0 0 1px rgba(24, 24, 48, .08), 0 18px 44px rgba(24, 24, 48, .16);
    color-scheme: light;
  }
}

/* ============================================================================
   Base — scoped to .nocturne so admin (Bootstrap/MudBlazor) is untouched
   ============================================================================ */
.nocturne, .nocturne *, .nocturne *::before, .nocturne *::after { box-sizing: border-box; }
.nocturne {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
.nocturne h1, .nocturne h2, .nocturne h3, .nocturne h4, .nocturne h5, .nocturne h6 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5rem;
  text-wrap: balance;
  color: var(--color-text);
}
.nocturne h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.nocturne h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.nocturne h3 { font-size: 1.5rem; }
.nocturne h4 { font-size: 1.25rem; }
.nocturne h6 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.nocturne p { margin: 0 0 .5rem; }
.nocturne a { color: var(--color-accent-text); text-decoration: none; text-underline-offset: 3px; }
.nocturne a:hover { color: var(--color-accent); }
.nocturne img { display: block; max-width: 100%; }
.nocturne a:focus-visible, .nocturne button:focus-visible, .nocturne input:focus-visible,
.nocturne textarea:focus-visible, .nocturne select:focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px;
}
/* h1 receives tabindex=-1 from FocusOnNavigate; never show a focus ring on it */
.nocturne h1:focus, .nocturne h1:focus-visible, .nocturne [tabindex="-1"]:focus { outline: none; }
.nocturne ::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* ---- layout helpers ---- */
.nc-wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.nc-section { padding: 56px 0 72px; }
.nc-muted { color: var(--color-muted); }
.nc-faint { color: var(--color-faint); }
.nc-mono { font-family: var(--font-mono); }
.nc-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent); font-weight: 500; }
.nc-lead { font-size: 17px; color: var(--color-muted); text-wrap: pretty; }
.nc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.nc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.nc-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.nc-stack { display: flex; flex-direction: column; }
.nc-row { display: flex; align-items: center; gap: 12px; }

/* ---- rules (fade at both ends) ---- */
.nc-hr {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(to right, transparent, var(--color-divider) 48px,
              var(--color-divider) calc(100% - 48px), transparent);
}

/* ---- buttons (outlined primary) ---- */
.nc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: 10px 22px; border-radius: var(--radius-md);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nc-btn:disabled { opacity: .45; cursor: not-allowed; }
.nc-btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.nc-btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); color: var(--color-accent); }
.nc-btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.nc-btn-secondary { border-color: var(--color-divider-strong); color: var(--color-text); }
.nc-btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
.nc-btn-ghost { color: var(--color-accent); padding-inline: 6px; }
.nc-btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.nc-btn-sm { font-size: 13px; padding: 7px 14px; }

/* ---- cards ---- */
.nc-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.nc-card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.nc-card-kicker { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent); }
.nc-card-title { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 17px; line-height: 1.2; color: var(--color-text); }
.nc-card-body { margin: 0; font-size: 13px; color: var(--color-muted); flex: 1; }
.nc-card-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-faint); }

/* ---- tags ---- */
.nc-tag { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: .02em; padding: 3px 10px; border-radius: 6px; }
.nc-tag-accent { background: var(--color-accent-weak); color: var(--color-accent-weak-text); }
.nc-tag-neutral { background: var(--color-neutral-tint); color: var(--color-neutral-tint-text); }
.nc-tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* ---- inputs ---- */
.nc-input {
  width: 100%; min-height: 38px; padding: 8px 12px; font: inherit; font-size: 14px;
  color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.nc-input::placeholder { color: var(--color-fainter); }
.nc-input:hover { border-color: var(--color-divider-strong); }
.nc-input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.nc-input { min-height: 96px; resize: vertical; }
.nc-field-label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--color-muted); }
.nc-err { display: block; font-size: 12px; margin-top: 5px; color: #e06b6b; }

/* ---- segmented control ---- */
.nc-seg { display: inline-flex; overflow: hidden; border: 1px solid var(--color-divider); border-radius: var(--radius-md); }
.nc-seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--color-muted); background: transparent; border: 0; font-family: inherit; text-decoration: none; }
.nc-seg-opt + .nc-seg-opt { border-left: 1px solid var(--color-divider); }
.nc-seg-opt.is-active { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.nc-seg-opt:not(.is-active):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

/* ---- image placeholder / lighten ---- */
.nc-lighten { mix-blend-mode: lighten; background-color: transparent; }
.nc-ph {
  display: grid; place-items: center;
  border: 1px dashed var(--color-divider-strong); border-radius: var(--radius-md);
  background: repeating-linear-gradient(45deg, transparent, transparent 7px,
              color-mix(in srgb, var(--color-text) 4%, transparent) 7px,
              color-mix(in srgb, var(--color-text) 4%, transparent) 8px);
  color: var(--color-fainter); font-family: var(--font-mono); font-size: 11px; text-align: center; padding: 8px;
}

/* ---- Home "Giải pháp": vibrant 4-panel cards ---- */
.nc-sol-heading { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.02em; line-height: 1.1; }
.nc-sol-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.nc-sol-card {
  position: relative; background: var(--color-surface); border: 1px solid var(--color-divider);
  border-radius: 18px; padding: 28px 24px 24px; overflow: hidden; min-width: 0;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.nc-sol-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--sol), color-mix(in srgb, var(--sol) 55%, transparent)); }
.nc-sol-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px -20px var(--sol-glow); border-color: color-mix(in srgb, var(--sol) 45%, var(--color-divider)); }
.nc-sol-ico {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; color: #fff;
  margin-bottom: 18px; background: linear-gradient(135deg, var(--sol), color-mix(in srgb, var(--sol) 55%, #101018));
  box-shadow: 0 10px 22px -10px var(--sol-glow);
}
.nc-sol-title { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; color: var(--color-text); line-height: 1.25; }
.nc-sol-body { color: var(--color-muted); font-size: .93rem; margin-top: 9px; }
.nc-sol-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--sol-text); text-decoration: none; transition: gap .2s ease; }
.nc-sol-card:hover .nc-sol-more { gap: 10px; }
.sol-c1 { --sol: #2f8ce0; --sol-glow: rgba(47,140,224,.55); --sol-text: #4aa6f0; }
.sol-c2 { --sol: #22b39a; --sol-glow: rgba(34,179,154,.55); --sol-text: #2ec9ac; }
.sol-c3 { --sol: #8b5cf6; --sol-glow: rgba(139,92,246,.55); --sol-text: #a487f8; }
.sol-c4 { --sol: #f2933a; --sol-glow: rgba(242,147,58,.55); --sol-text: #f6a659; }
@media (max-width: 900px) { .nc-sol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nc-sol-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Home "Hành trình phát triển": vertical zigzag timeline ---- */
.nc-timeline { position: relative; max-width: 920px; margin: 0 auto; padding: 8px 0; }
.nc-timeline::before {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); top: 4px; bottom: 4px; width: 2px;
  background: linear-gradient(180deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 18%, transparent));
}
.nc-tl-row { display: grid; grid-template-columns: 1fr 84px 1fr; align-items: center; min-height: 360px; }
.nc-tl-year {
  grid-column: 2; grid-row: 1; justify-self: center; z-index: 1;
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, #101018));
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--color-accent) 60%, transparent), 0 0 0 6px color-mix(in srgb, var(--color-bg) 100%, transparent);
}
.nc-tl-card {
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 14px; padding: 16px 20px;
  position: relative; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nc-tl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-divider)); }
.nc-tl-card .yr { display: none; font-family: var(--font-display); font-weight: 600; color: var(--color-accent-text); font-size: 14px; margin-bottom: 6px; }
.nc-tl-img { width: 100%; height: 210px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.nc-tl-title { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; letter-spacing: -.01em; color: var(--color-text); margin-bottom: 4px; line-height: 1.3; }
.nc-tl-text { color: var(--color-muted); font-size: 14px; margin: 0; }
.nc-tl-row.left .nc-tl-card { grid-column: 1; grid-row: 1; margin-right: 18px; }
.nc-tl-row.right .nc-tl-card { grid-column: 3; grid-row: 1; margin-left: 18px; }
@media (max-width: 700px) {
  .nc-timeline { max-width: 100%; }
  .nc-timeline::before { left: 22px; transform: none; }
  .nc-tl-row { grid-template-columns: 44px 1fr; min-height: auto; margin-bottom: 22px; }
  .nc-tl-year { grid-column: 1; width: 44px; height: 44px; font-size: 11px; }
  .nc-tl-row.left .nc-tl-card, .nc-tl-row.right .nc-tl-card { grid-column: 2; text-align: left; margin: 0 0 0 14px; }
  .nc-tl-card .yr { display: block; }
}

/* ---- About photo gallery: main banner + thumbnail carousel ---- */
.nc-photo { position: relative; }
.nc-photo-main { width: 100%; height: clamp(280px, 44vh, 430px); object-fit: cover; border-radius: var(--radius-lg); display: block; box-shadow: var(--shadow-md); }
.nc-photo-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(16, 18, 28, .38); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 19px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .32); z-index: 2; transition: background .2s ease, transform .2s ease, opacity .2s ease, box-shadow .2s ease; }
.nc-photo-arrow.is-prev { left: 14px; }
.nc-photo-arrow.is-next { right: 14px; }
.nc-photo-arrow:hover:not(:disabled) { background: var(--color-accent); border-color: transparent; transform: translateY(-50%) scale(1.08); box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
.nc-photo-arrow:active:not(:disabled) { transform: translateY(-50%) scale(.96); }
.nc-photo-arrow:disabled { opacity: 0; pointer-events: none; }
.nc-photo-count { position: absolute; right: 14px; bottom: 14px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #fff; background: rgba(16, 18, 28, .48); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-variant-numeric: tabular-nums; z-index: 2; }
.nc-photo-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.nc-photo-thumb { flex: 1 1 0; min-width: 0; height: 70px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .5; filter: saturate(.9); transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.nc-photo-thumb:hover { opacity: .88; transform: translateY(-2px); }
.nc-photo-thumb.is-active { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent); }

/* ---- generic "fills first screen" wrapper (e.g. About intro) ---- */
.nc-onescreen { min-height: calc(100vh - 78px); display: flex; flex-direction: column; justify-content: center; gap: 48px; padding: 24px 0; }
@media (max-width: 900px) { .nc-onescreen { min-height: 0; gap: 32px; padding: 32px 0; } }

/* ---- home hero: hero + stats fill the first screen ---- */
.nc-hero-screen { min-height: calc(100vh - 78px); display: flex; flex-direction: column; }
.nc-hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding: 40px 0 28px; }
.nc-hero-grid > * { min-width: 0; }
.nc-hero-grid h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.08; }
.nc-hero-grid .nc-lead { font-size: 1.2rem; max-width: 560px; }
.nc-hero-media { height: clamp(360px, 52vh, 560px); }
.nc-hero-media .nc-hero-slides, .nc-hero-media > .nc-ph { height: 100% !important; }
@media (max-width: 900px) {
  .nc-hero-screen { min-height: 0; }
  .nc-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 28px 0; }
  .nc-hero-media { height: 300px; }
}

/* ---- hero slideshow ---- */
.nc-hero-slides { position: relative; width: 100%; height: 340px; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); }
.nc-hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.nc-hero-slide.is-active { opacity: 1; }
.nc-hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 6px; justify-content: center; z-index: 2; }
.nc-hero-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .3s; }
.nc-hero-dots span.is-active { background: #fff; }

/* ---- hero country chips (5 chính + "+N") ---- */
.nc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.nc-chip { display: inline-flex; align-items: center; font-size: 12.5px; padding: 5px 13px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--color-divider-strong); color: color-mix(in srgb, var(--color-text) 84%, transparent); }
.nc-chip-more { border-color: color-mix(in srgb, var(--color-accent) 55%, transparent); color: var(--color-accent-weak-text); cursor: default; }

/* ---- stats band — dark, refined; short faded column dividers ---- */
.nc-band { position: relative; background: var(--color-bg-deep); }
.nc-band::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--color-divider-strong) 18%, var(--color-divider-strong) 82%, transparent); }
.nc-band .nc-grid-4 > div { position: relative; }
.nc-band .nc-grid-4 > div:not(:first-child)::before { content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 1px; height: 52px; background: linear-gradient(to bottom, transparent, var(--color-divider-strong), transparent); }
.nc-band .nc-stat-num { font-family: var(--font-heading); font-weight: 500; font-size: 46px; letter-spacing: -.02em; line-height: 1; color: color-mix(in srgb, var(--color-text) 86%, transparent); font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .nc-band .nc-stat-num { color: var(--color-text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .nc-band .nc-stat-num { color: var(--color-text); } }
.nc-band .nc-stat-lbl { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); margin-top: 11px; }
@media (max-width: 900px) {
  .nc-band .nc-grid-4 > div:not(:first-child)::before { display: none; }
  .nc-band .nc-grid-4 > div:nth-child(even)::before { display: block; left: -8px; }
  .nc-band .nc-stat-num { font-size: 38px; }
}

/* ============================================================================
   Site chrome — header / footer
   ============================================================================ */
.nc-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.nc-nav { display: flex; align-items: center; gap: 26px; height: 78px; max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.nc-brand { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 18px; letter-spacing: .04em; margin-right: auto; color: var(--color-text); text-decoration: none; display: inline-flex; align-items: center; }
.nc-brand .dot { color: var(--color-accent); }
.nc-brand-logo { display: inline-flex; align-items: center; }
.nc-brand-logo img { height: 48px; width: auto; display: block; }
/* Theme-specific logo: dark theme is the default → show the dark-bg logo */
.nc-brand-logo .logo-light { display: none; }
.nc-brand-logo .logo-dark { display: block; }
:root[data-theme="light"] .nc-brand-logo .logo-light { display: block; }
:root[data-theme="light"] .nc-brand-logo .logo-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .nc-brand-logo .logo-light { display: block; }
  :root:not([data-theme]) .nc-brand-logo .logo-dark { display: none; }
}
.nc-navlinks { display: flex; align-items: center; gap: 6px; }
.nc-navlink { color: var(--color-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; white-space: nowrap; transition: color .15s ease; }
.nc-navlink:hover { color: var(--color-accent); }
.nc-navlink.is-active { color: var(--color-accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nc-nav-tools { display: flex; align-items: center; gap: 12px; }
.nc-btn-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--color-accent); color: #fff; border: 1px solid var(--color-accent); padding: 9px 20px; border-radius: 999px; font-family: var(--font-heading); font-weight: 500; font-size: 14.5px; text-decoration: none; transition: filter .15s ease, transform .15s ease; }
.nc-btn-cta:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.nc-langseg { display: inline-flex; border: 1px solid var(--color-divider); border-radius: 6px; overflow: hidden; font-size: 12px; }
.nc-langseg a { padding: 4px 10px; color: var(--color-faint); text-decoration: none; }
.nc-langseg a.is-active { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.nc-theme-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--color-divider); background: transparent; color: var(--color-muted); cursor: pointer; font-size: 15px; }
.nc-theme-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }
.nc-nav-toggle { display: none; background: transparent; border: 1px solid var(--color-divider); border-radius: 6px; color: var(--color-text); width: 36px; height: 34px; cursor: pointer; }

.nc-footer { border-top: 1px solid var(--color-divider); background: var(--color-bg-deep); }
.nc-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; padding: 44px 0; font-size: 13px; color: var(--color-faint); }
.nc-footer h5 { font-family: var(--font-heading); font-size: 16px; color: var(--color-text); margin: 0 0 10px; letter-spacing: normal; text-transform: none; }
.nc-footer .head { color: var(--color-text); display: block; margin-bottom: 8px; }
.nc-footer a { color: var(--color-faint); text-decoration: none; }
.nc-footer a:hover { color: var(--color-accent); }
.nc-footer-bottom { border-top: 1px solid var(--color-divider); padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--color-faint); }

/* ---- rich text (post content) ---- */
.nc-prose { font-size: 16px; line-height: 1.75; color: var(--color-text); }
.nc-prose > *:first-child { margin-top: 0; }
.nc-prose h2, .nc-prose h3, .nc-prose h4 { margin: 2rem 0 .75rem; color: var(--color-text); }
.nc-prose p { margin: 0 0 1.25rem; color: var(--color-muted); }
.nc-prose a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.nc-prose ul, .nc-prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; color: var(--color-muted); }
.nc-prose li { margin-bottom: .4rem; }
.nc-prose img { border-radius: var(--radius-md); margin: 1.5rem 0; }
.nc-prose blockquote { border-left: 3px solid var(--color-accent); padding: .5rem 1.25rem; margin: 1.5rem 0; color: var(--color-muted); background: var(--color-surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.nc-prose pre { background: var(--color-bg-deep); border: 1px solid var(--color-divider); color: var(--color-text); border-radius: var(--radius-md); padding: 1.25rem; overflow-x: auto; margin: 1.5rem 0; }
.nc-prose code { font-family: var(--font-mono); font-size: .9em; }

/* ============================================================================
   Events interaction bits
   ============================================================================ */
.nc-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; }
.nc-avatar-accent { background: var(--color-accent-weak); color: var(--color-accent-weak-text); }
.nc-avatar-neutral { background: var(--color-neutral-tint); color: var(--color-neutral-tint-text); }
.nc-comment { display: flex; gap: 12px; font-size: 13px; }
.nc-like-note { border: 1px dashed var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); color: var(--color-accent-text); border-radius: var(--radius-md); padding: 12px 16px; font-size: 13px; }

/* ---- partner logo + modal ---- */
.nc-logo { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; flex: none; overflow: hidden;
  background: var(--color-accent-weak); color: var(--color-accent-weak-text); font-family: var(--font-heading); font-weight: 600; font-size: 18px; }
.nc-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.nc-partner-card { cursor: pointer; text-align: left; }
.nc-modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, #05060a 62%, transparent); animation: nc-fade .15s ease; }
.nc-modal { width: min(760px, 100%); max-height: 88vh; overflow-y: auto; background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 28px; }
.nc-modal-close { background: transparent; border: 1px solid var(--color-divider); border-radius: 999px; width: 34px; height: 34px;
  cursor: pointer; color: var(--color-muted); font-size: 16px; flex: none; }
.nc-modal-close:hover { color: var(--color-accent); border-color: var(--color-accent); }
@keyframes nc-fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nc-grid-2 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .nc-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .nc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .nc-navlinks { display: none; }
  .nc-nav-toggle { display: grid; place-items: center; }
  .nc-header.is-open .nc-navlinks { display: flex; position: absolute; top: 78px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px var(--gutter); background: var(--color-bg); border-bottom: 1px solid var(--color-divider); }
  .nc-footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
/* ---- responsive fixes ---- */
html { overflow-x: clip; }               /* prevent sideways scroll without breaking sticky header */
.nocturne main { overflow-x: clip; }
@media (max-width: 900px) {
  .nc-nav { padding: 0 16px; gap: 12px; }
  .nc-brand-logo img { height: 34px; }
  .nc-nav-tools { gap: 8px; }
  .nc-navlink { font-size: 15px; }
}
.nc-collapse-flex > * { min-width: 0; }
@media (max-width: 768px) {
  .nc-collapse { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .nc-collapse-flex { flex-direction: column !important; align-items: stretch !important; }
  .nc-collapse-flex > .nc-ph, .nc-collapse-flex > img { width: 100% !important; }
}
@media (max-width: 640px) {
  .nc-hero-grid h1 { font-size: clamp(1.9rem, 7.5vw, 2.6rem); }
  .nc-hero-grid .nc-lead { font-size: 1.05rem; }
}
@media (max-width: 640px) { .nc-hide-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .nocturne * { transition: none !important; scroll-behavior: auto !important; }
}
