/* DeFi Bangkok
   Layout: the #DeFi BKK logo carried into a page. A royal-blue hero band with the
   Bangkok skyline and floating ETH/BTC art, then a neon "line" (the metro strip)
   that runs into calm list rows. Thai-designed faces (Cadson Demak) for Latin + Thai. */

:root {
  /* page */
  --bg: #F2F6FC;
  --surface: #FFFFFF;
  --surface-2: #E6EEFA;
  --ink: #071A45;
  --ink-2: #2D4270;
  --muted: #566A94;
  --line: #D3DEF1;
  --line-strong: #B4C5E4;
  --accent: #014CB2;
  --accent-strong: #014CB2;
  --on-accent: #FFFFFF;
  --accent-soft: #DDE8FB;
  --focus: #014CB2;
  --metro: #014CB2;
  --metro-glow: transparent;
  --header-bg: rgba(242, 246, 252, 0.86);
  --shadow: 0 1px 0 rgba(7, 26, 69, 0.04), 0 14px 32px -18px rgba(7, 26, 69, 0.35);
  /* brand band (the logo's colours) */
  --brand: #014CB2;
  --band-top: #0459C9;
  --band-bottom: #0250BA;
  --sky-far: #0A48A9;
  --sky-mid: #023E96;
  --sky-near: #033477;
  --cream: #F7F5F6;
  --neon: #61E8FF;
  --neon-core: #83FFFF;
  --on-neon: #03224A;
  /* transit lines and states */
  --bts: #4E9A2A;
  --mrt: #1F4FA8;
  --arl: #9C1D35;
  --ok: #1F7A4D;
  --err: #B3261E;

  --f-display: "Chakra Petch", "Anuphan", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Anuphan", "Noto Sans Thai", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.875rem;
  --t-2xl: clamp(2.2rem, 4.8vw, 3.6rem);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --wrap: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #04122E;
    --surface: #0A1D45;
    --surface-2: #102756;
    --ink: #EEF3FF;
    --ink-2: #C3D0EE;
    --muted: #8C9FCB;
    --line: #183262;
    --line-strong: #27477F;
    --accent: #61E8FF;
    --accent-strong: #8DF0FF;
    --on-accent: #03224A;
    --accent-soft: #0B2F5C;
    --focus: #8DF0FF;
    --metro: #61E8FF;
    --metro-glow: rgba(97, 232, 255, 0.55);
    --header-bg: rgba(4, 18, 46, 0.84);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 16px 34px -18px rgba(0, 0, 0, 0.8);
    --band-top: #023C93;
    --band-bottom: #022A6E;
    --sky-far: #06357F;
    --sky-mid: #042A66;
    --sky-near: #04122E;
    --bts: #7CC24E;
    --mrt: #7FA2F0;
    --arl: #EC7D93;
    --ok: #5FD49A;
    --err: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #04122E;
  --surface: #0A1D45;
  --surface-2: #102756;
  --ink: #EEF3FF;
  --ink-2: #C3D0EE;
  --muted: #8C9FCB;
  --line: #183262;
  --line-strong: #27477F;
  --accent: #61E8FF;
  --accent-strong: #8DF0FF;
  --on-accent: #03224A;
  --accent-soft: #0B2F5C;
  --focus: #8DF0FF;
  --metro: #61E8FF;
  --metro-glow: rgba(97, 232, 255, 0.55);
  --header-bg: rgba(4, 18, 46, 0.84);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 16px 34px -18px rgba(0, 0, 0, 0.8);
  --band-top: #023C93;
  --band-bottom: #022A6E;
  --sky-far: #06357F;
  --sky-mid: #042A66;
  --sky-near: #04122E;
  --bts: #7CC24E;
  --mrt: #7FA2F0;
  --arl: #EC7D93;
  --ok: #5FD49A;
  --err: #FF8A80;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.glyph { flex: none; vertical-align: -3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(28px, env(safe-area-inset-left, 0px));
    padding-right: max(28px, env(safe-area-inset-right, 0px));
  }
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: var(--r-sm);
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0 1.15em;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-family: var(--f-body); font-weight: 600; font-size: var(--t-sm);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 84%, var(--ink)); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 38px; padding: 0 0.9em; font-size: var(--t-xs); }
.btn-lg { min-height: 52px; padding: 0 1.5em; font-size: var(--t-base); }
.btn-tg { background: var(--brand); color: #FFFFFF; }
.btn-tg:hover { background: color-mix(in srgb, var(--brand) 82%, #000); }
/* On the blue band: the neon of the logo's "BKK" */
.btn-neon { background: var(--neon); color: var(--on-neon); box-shadow: 0 0 0 1px rgba(131, 255, 255, .5), 0 0 22px -4px rgba(97, 232, 255, .75); }
.btn-neon:hover { background: var(--neon-core); box-shadow: 0 0 0 1px rgba(131, 255, 255, .8), 0 0 30px -2px rgba(97, 232, 255, .9); }
.btn-outline-light { background: transparent; border-color: rgba(247, 245, 246, .55); color: var(--cream); }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(247, 245, 246, .08); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-sm); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: -12px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-btn:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .i-moon, .theme-btn[data-mode="day"] .i-sun { display: none; }
.theme-btn[data-mode="day"] .i-moon { display: block; }
@media (max-width: 860px) {
  .topbar-in { gap: 12px; padding-block: 10px 0; }
  .btn-tg { margin-left: auto; min-height: 40px; }
  /* Phones: the day/dim button sits at the right end of the menu row, so the top row stays as before. */
  .topbar-in { position: relative; }
  .theme-btn { position: absolute; right: 0; bottom: 5px; width: 34px; height: 34px; margin: 0; background: var(--bg); z-index: 1; }
  .theme-btn svg { width: 18px; height: 18px; }
  .nav { order: 3; width: 100%; margin: 0 -12px; padding: 2px 46px 6px 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
}

/* ---------- Hero band ---------- */
.hero-band {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 70% at 78% 30%, rgba(97, 232, 255, .16), transparent 70%),
    linear-gradient(180deg, var(--band-top), var(--band-bottom));
  color: var(--cream);
  padding-block: clamp(40px, 6vw, 72px) clamp(150px, 17vw, 240px);
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.group-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: rgba(3, 34, 74, .35); border: 1px solid rgba(131, 255, 255, .35);
  font-size: var(--t-sm); font-weight: 600; text-decoration: none; color: var(--cream);
}
.group-chip img { width: 26px; height: 26px; border-radius: 50%; display: block; }
.group-chip:hover { border-color: var(--neon); }
.hero-copy h1 { font-size: var(--t-2xl); font-weight: 600; max-width: 17ch; margin-top: 22px; }
.lede { margin-top: 18px; font-size: var(--t-md); color: rgba(247, 245, 246, .86); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { width: 100%; max-width: 560px; justify-self: end; aspect-ratio: 560 / 470; }
.hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(130px, 16vw, 230px); z-index: 1; pointer-events: none; }
.skyline svg { width: 100%; height: 100%; display: block; }
@keyframes float-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float-b { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes shadow-a { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.86); opacity: .7; } }
.art-float-a { animation: float-a 6.5s ease-in-out infinite; }
.art-float-b { animation: float-b 5.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.art-float-c { animation: float-a 7.5s ease-in-out infinite reverse; }
.art-shadow { animation: shadow-a 6.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { justify-self: center; max-width: 300px; margin-top: 4px; }
  .hero-band { padding-bottom: 150px; }
}

/* ---------- Metro line ---------- */
.line-card {
  position: relative; z-index: 3;
  margin-top: clamp(-44px, -3vw, -28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 22px clamp(16px, 3vw, 32px) 18px;
}
.line-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; }
.line-head h2 { font-size: var(--t-lg); font-weight: 600; }
.line-sub { color: var(--ink-2); font-size: var(--t-sm); margin-top: 4px; }
.line-hint { color: var(--muted); font-size: var(--t-xs); }
.line-scroll { overflow-x: auto; margin-top: 10px; padding-bottom: 4px; scrollbar-width: thin; }
.metro {
  --stop: 18px;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--days, 9), minmax(64px, 1fr));
  min-width: calc(var(--days, 9) * 64px);
  position: relative;
}
.metro::before {
  content: ""; position: absolute; left: calc(100% / var(--days, 9) / 2); right: calc(100% / var(--days, 9) / 2);
  top: 60px; height: 6px; border-radius: 3px; background: var(--metro);
  box-shadow: 0 0 14px 1px var(--metro-glow);
}
.stop { position: relative; }
.stop button {
  width: 100%; background: none; border: 0; padding: 0 2px 6px; cursor: pointer;
  display: grid; justify-items: center; gap: 0; border-radius: var(--r-md);
}
.stop-day { font-size: var(--t-xs); color: var(--muted); font-weight: 500; height: 20px; }
.stop-date { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; height: 22px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stop-dot {
  margin-block: 6px; width: var(--stop); height: var(--stop); border-radius: 50%;
  background: var(--surface); border: 4px solid var(--metro); position: relative; z-index: 1;
  transition: transform .15s ease, background-color .15s ease;
}
.stop.is-interchange .stop-dot {
  width: 30px; height: 30px; margin-block: 0;
  border: 4px solid var(--ink); box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--metro), 0 0 16px 4px var(--metro-glow);
}
.stop-count { margin-top: 8px; font-size: var(--t-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.stop-count.is-zero { color: var(--muted); }
.stop-tag { font-size: 0.7rem; font-weight: 600; color: var(--accent-strong); min-height: 1.3em; text-align: center; line-height: 1.25; }
.stop button:hover .stop-dot { transform: scale(1.12); }
.stop button[aria-pressed="true"] .stop-dot { background: var(--metro); }
.stop button[aria-pressed="true"] .stop-date { color: var(--accent-strong); }
.stop.is-today .stop-day::after { content: " · today"; color: var(--accent-strong); }
.stop.is-past { opacity: .5; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px) 0; }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 70ch; }
.section-head h2 { font-size: var(--t-xl); font-weight: 600; }
.section-head p { color: var(--ink-2); }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; max-width: none; flex-wrap: wrap; }
.section-head-row > div { display: grid; gap: 8px; }
.updated { color: var(--muted); }

/* ---------- Conferences ---------- */
.conf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .conf-grid { grid-template-columns: minmax(0, 1fr); } }
.conf {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; align-content: start;
}
.conf-top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.conf-org { font-size: var(--t-xs); color: var(--muted); font-weight: 500; }
.conf h3 { font-size: var(--t-lg); font-weight: 600; margin-top: 4px; }
.conf h3 .glyph { margin-right: 8px; vertical-align: -4px; }
.conf-dates { font-family: var(--f-display); text-align: right; line-height: 1; flex: none; }
.conf-dates b { display: block; font-size: 2.1rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--accent-strong); }
.conf-dates span { font-size: var(--t-xs); color: var(--muted); }
.conf p.conf-summary { color: var(--ink-2); max-width: 60ch; }
.conf-where { display: grid; gap: 6px; font-size: var(--t-sm); }
.conf-where a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.conf-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-xs); color: var(--muted); }
.conf-facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--metro); margin-right: 8px; vertical-align: 1px; }
.conf-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }

/* Station chip: every listing says how to get there */
.station {
  display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
}
.station::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 3px solid var(--line-color, var(--muted)); background: var(--surface); flex: none;
}
.station[data-line="bts"] { --line-color: var(--bts); }
.station[data-line="mrt"] { --line-color: var(--mrt); }
.station[data-line="arl"] { --line-color: var(--arl); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 0 12px; min-height: 44px;
}
.search:focus-within { border-color: var(--focus); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font: inherit; color: var(--ink); padding: 10px 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; }
.seg-btn { border: 0; background: none; padding: 8px 14px; border-radius: 4px; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); cursor: pointer; min-height: 38px; }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: transparent; border-radius: 999px;
  padding: 6px 14px; font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; min-height: 36px;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .65; margin-left: -2px; }
.chip[data-empty]:not([aria-pressed="true"]) { opacity: .55; }

.active-day { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.active-day button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: var(--t-xs); }

/* ---------- Day list ---------- */
.daylist { margin-top: 24px; }
.day { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0 28px; border-top: 1px solid var(--line-strong); padding-top: 18px; margin-bottom: 26px; }
.day-head { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); align-self: start; font-family: var(--f-display); line-height: 1.05; }
.day-head b { font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; display: block; letter-spacing: -0.02em; }
.day-head span { display: block; font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; margin-top: 2px; }
.day-head .day-rel { color: var(--accent-strong); font-size: var(--t-xs); margin-top: 6px; }
.day-events { display: grid; }
@media (max-width: 720px) {
  .day { grid-template-columns: minmax(0, 1fr); }
  .day-head { position: static; display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
  .day-head b { font-size: 1.7rem; display: inline; }
  .day-head span { display: inline; margin: 0; }
}

.ev { border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-main { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto; gap: 4px 20px; padding: 14px 0; align-items: start; }
.ev-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--t-sm); padding-top: 2px; }
.ev-time small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-xs); }
.ev-body { min-width: 0; display: grid; gap: 4px; }
.ev-title { font-weight: 600; font-size: var(--t-md); line-height: 1.3; text-decoration: none; }
.ev-title:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.ev-host { font-size: var(--t-sm); color: var(--ink-2); }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 4px; font-size: var(--t-xs); color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge-parent { background: var(--accent-soft); color: var(--accent-strong); }
.badge-main { background: var(--brand); color: #FFFFFF; }
.ev-toggle {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.ev-toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
.ev-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ev-detail { padding: 0 0 18px calc(6.6rem + 20px); display: grid; gap: 12px; }
.ev-detail p { color: var(--ink-2); max-width: 68ch; }
.ev-detail .addr { font-size: var(--t-sm); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ev.is-target { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
@media (max-width: 720px) {
  .ev-main { grid-template-columns: minmax(0, 1fr) auto; }
  .ev-time { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .ev-time small { display: inline; }
  .ev-detail { padding-left: 0; }
}

.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 28px; text-align: left;
  display: grid; gap: 10px; justify-items: start; color: var(--ink-2);
}
.empty h3 { font-size: var(--t-md); color: var(--ink); }

/* ---------- Submit ---------- */
.section-submit .submit-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .section-submit .submit-grid { grid-template-columns: minmax(0, 1fr); } }
.submit-copy { display: grid; gap: 16px; position: sticky; top: 96px; }
@media (max-width: 960px) { .submit-copy { position: static; } }
.submit-copy h2 { font-size: var(--t-xl); font-weight: 600; }
.submit-copy > p { color: var(--ink-2); }
.steps { list-style: none; counter-reset: step; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 20px 46px; color: var(--ink-2); }
.steps li strong { color: var(--ink); display: block; font-weight: 600; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--metro); background: var(--surface); font-family: var(--f-display); font-weight: 700;
  font-size: 0.8rem; display: grid; place-items: center; color: var(--ink);
}
.steps li::after { content: ""; position: absolute; left: 12.5px; top: 30px; bottom: 2px; width: 3px; background: var(--metro); opacity: .45; }
.steps li:last-child::after { display: none; }
.small { font-size: var(--t-xs); color: var(--muted); }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 32px); display: grid; gap: 18px; box-shadow: var(--shadow);
}
.field { display: grid; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field label, .field legend { font-size: var(--t-sm); font-weight: 600; padding: 0; }
.field legend { margin-bottom: 6px; }
.req { font-weight: 400; color: var(--muted); font-size: var(--t-xs); margin-left: 4px; }
.form input[type="text"], .form input[type="url"], .form input[type="date"], .form input[type="time"], .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
.form textarea { resize: vertical; min-height: 104px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.form [aria-invalid="true"] { border-color: var(--err); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.hint { font-size: var(--t-xs); color: var(--muted); }
.hint.is-ok { color: var(--ok); }
.hint.is-err { color: var(--err); }
.grid-2, .grid-3 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 .field:first-child { grid-column: 1 / -1; } }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); margin-top: -8px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: var(--t-sm); color: var(--ink-2);
}
.pill input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.form-msg { font-size: var(--t-sm); color: var(--ink-2); flex: 1 1 240px; }
.form-msg.is-ok { color: var(--ok); }
.form-msg.is-err { color: var(--err); }
.sent { display: grid; gap: 12px; justify-items: start; padding: 12px 0; }
.sent h3 { font-size: var(--t-lg); }
.sent p { color: var(--ink-2); }

/* ---------- Toolkit ---------- */
.toolkit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 36px; }
.tk-cat { border-top: 3px solid var(--metro); padding-top: 16px; margin-bottom: 32px; min-width: 0; }
.tk-cat h3 { font-size: var(--t-lg); font-weight: 600; }
.tk-cat > p { font-size: var(--t-sm); color: var(--muted); margin-top: 4px; min-height: 2.9em; }
.tk-list { list-style: none; padding: 0; margin: 10px 0 0; }
.tk-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.tk-name { font-weight: 600; }
.tk-label { font-size: 0.72rem; color: var(--muted); align-self: center; justify-self: end; }
.tk-desc { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--ink-2); }
.tk-list a:hover .tk-name { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Telegram band ---------- */
.tg-band {
  position: relative; overflow: hidden; isolation: isolate; margin-top: clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, var(--band-top), var(--band-bottom)); color: var(--cream);
}
.tg-sky { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; opacity: .38; z-index: -1; }
.tg-sky svg { width: 100%; height: 100%; display: block; }
.tg-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding-block: clamp(40px, 5vw, 64px) clamp(56px, 6vw, 80px); }
.tg-logo { width: 112px; height: 112px; border-radius: 50%; display: block; box-shadow: 0 0 0 4px rgba(131, 255, 255, .25), 0 18px 36px -16px rgba(0, 0, 0, .6); }
.tg-copy h2 { font-size: var(--t-xl); font-weight: 600; max-width: 24ch; }
.tg-copy p { margin-top: 8px; color: rgba(247, 245, 246, .85); max-width: 52ch; }
@media (max-width: 760px) {
  .tg-in { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 18px; }
  .tg-logo { width: 84px; height: 84px; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 40px; padding-block: 28px 36px; font-size: var(--t-xs); color: var(--muted); }
.footer-brand { display: grid; gap: 2px; }
.footer-brand strong { font-family: var(--f-display); color: var(--ink); font-size: var(--t-sm); }
@media (max-width: 640px) { .footer-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Popover / toast ---------- */
.subscribe { margin: 0 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: grid; gap: 10px; max-width: 640px; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; font: inherit; font-size: var(--t-sm); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); font-size: var(--t-sm); z-index: 40;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
