/* ============================================================
   Toraks / HTD — Design System
   ============================================================ */

:root {
  /* Color */
  --red:        oklch(58% 0.205 25);
  --red-deep:   oklch(48% 0.185 25);
  --red-ink:    oklch(40% 0.16 25);
  --red-soft:   oklch(96% 0.025 25);

  --ink:        oklch(22% 0.01 250);
  --ink-2:      oklch(40% 0.012 250);
  --ink-3:      oklch(58% 0.008 250);
  --ink-4:      oklch(72% 0.005 250);

  --line:       oklch(92% 0.005 250);
  --line-2:     oklch(86% 0.006 250);

  --paper:      oklch(98.5% 0.003 80);
  --paper-2:    oklch(96.5% 0.004 80);
  --surface:    #ffffff;

  --blue-deep:  oklch(22% 0.06 245);
  --blue-mid:   oklch(32% 0.085 240);
  --blue-soft:  oklch(94% 0.015 235);

  /* Type */
  --f-display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --f-body:    "Hanken Grotesk", "Space Grotesk", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Scale (comfortable) */
  --gap:        24px;
  --pad-card:   28px;
  --pad-row:    18px;
  --radius:     14px;
  --radius-sm:  8px;
  --radius-pill: 999px;
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 420;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 5.5vw, 64px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.025em; }
h3 { font-size: 22px; }
h4 { font-size: 18px; letter-spacing: -0.018em; }
p  { margin: 0 0 1em; }
a  { color: var(--red-ink); text-decoration: none; }
a:hover { color: var(--red-deep); }

button { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ----- Layout ----- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

/* ============================================================
   Top bar / navigation
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 42px; width: auto; }
.brand__sub {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.user-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.user-strip a { color: var(--ink-2); }
.user-strip a:hover { color: var(--red); }
.user-strip__dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-4);
}
.user-strip__name {
  color: var(--red);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.user-strip__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--f-display);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 10px 14px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

/* ============================================================
   Hero / Page banner
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--blue-deep);
  color: white;
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.85) brightness(0.65);
  z-index: -2;
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 80% 10%, transparent 0%, rgba(15, 26, 51, 0.55) 60%, rgba(10, 18, 38, 0.92) 100%),
    linear-gradient(180deg, rgba(15, 26, 51, 0.55) 0%, rgba(15, 26, 51, 0.20) 30%, rgba(10, 18, 38, 0.85) 100%);
  z-index: -1;
}
.hero__pattern {
  position: absolute; inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 88px);
  mask-image: radial-gradient(120% 90% at 70% 50%, black 0%, transparent 70%);
}

.hero--page {
  padding: 88px 0 72px;
}
.hero--page .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero--page .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--red);
}
.hero--page h1 {
  color: white;
  max-width: 900px;
}
.hero--page .hero__lead {
  margin-top: 18px;
  font-size: 17px;
  color: rgba(255,255,255,0.78);
  max-width: 720px;
  line-height: 1.6;
}

.hero--home {
  padding: 120px 0 100px;
}
.hero--home h1 {
  font-size: clamp(48px, 6.5vw, 84px);
  max-width: 1100px;
  color: white;
}
.hero--home h1 em {
  font-style: normal;
  color: rgba(255,255,255,0.55);
}
.hero--home .hero__lead {
  margin-top: 28px;
  font-size: 18px;
  max-width: 720px;
  color: rgba(255,255,255,0.80);
  line-height: 1.6;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}

/* hero stat meta strip */
.hero__meta {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.14);
  flex-wrap: wrap;
}
.hero__meta-item .k {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: white;
  display: block;
}
.hero__meta-item .l {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* ============================================================
   Section
   ============================================================ */
section.section {
  padding: 88px 0;
}
section.section--tight { padding: 56px 0; }
section.section--paper { background: var(--paper); }
section.section--paper-2 { background: var(--paper-2); }
section.section--white { background: var(--surface); }

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 32px;
  flex-wrap: wrap;
}
.section__head h2 {
  position: relative;
  padding-bottom: 14px;
}
.section__head h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 3px;
  background: var(--red);
  border-radius: 2px;
}
.section__head .section__meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Buttons / chips
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .1s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--red);
  color: white;
}
.btn--primary:hover { background: var(--red-deep); color: white; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--paper-2); border-color: var(--line-2); color: var(--ink); }
.btn--light {
  background: rgba(255,255,255,0.10);
  color: white;
  border-color: rgba(255,255,255,0.20);
  backdrop-filter: blur(6px);
}
.btn--light:hover { background: rgba(255,255,255,0.16); color: white; }
.btn--link {
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
  border-radius: 0;
}
.btn--link:hover { color: var(--red); }
.btn--lg { padding: 18px 28px; font-size: 16px; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.chip--red { background: var(--red-soft); border-color: transparent; color: var(--red-ink); }
.chip--dark { background: rgba(0,0,0,0.04); }

/* segmented toggle (Prikaži / nadolazeće / sve) */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.seg__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 12px 0 8px;
}
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 18px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.seg button:hover { color: var(--ink); }
.seg button.is-active {
  background: var(--ink);
  color: white;
}

/* ============================================================
   Cards (articles + events)
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 280px;
}
.card:hover {
  border-color: var(--ink-4);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -22px rgba(15, 26, 51, 0.25);
}
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.card__meta .author { color: var(--ink-2); text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 13px; }
.card__title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--ink);
}
.card__rule {
  width: 32px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  margin: 0 0 16px;
}
.card__excerpt {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
  -webkit-line-clamp: 4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.card__foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card__foot .arrow {
  color: var(--red);
  font-weight: 600;
  transition: transform .2s ease;
}
.card:hover .card__foot .arrow { transform: translateX(4px); }

/* Event card variant */
.card--event .card__title { font-size: 20px; min-height: 48px; }
.event-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.event-meta__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.event-meta__row svg {
  width: 16px; height: 16px;
  color: var(--red);
  flex-shrink: 0;
}
.event-meta__row b { color: var(--ink); font-weight: 600; }
.event-stats {
  display: flex;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.event-stats span b { color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: -0.01em; text-transform: none; font-family: var(--f-display); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 56px;
}
.pagination a, .pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .15s ease;
}
.pagination a:hover { color: var(--ink); border-color: var(--ink-4); }
.pagination .is-active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.pagination .ellipsis {
  border: 0;
  background: transparent;
  color: var(--ink-3);
}

/* ============================================================
   Partner tiles
   ============================================================ */
.partners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .partners { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .partners { grid-template-columns: 1fr; } }
.partner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 240px;
  transition: border-color .15s ease, transform .15s ease;
}
.partner:hover { border-color: var(--ink-4); transform: translateY(-2px); }
.partner__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.partner__name {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.partner__logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 24px 0;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 8px,
      var(--paper-2) 8px 9px);
  border-radius: var(--radius-sm);
  min-height: 90px;
}
.partner__logo--pliva { color: oklch(40% 0.12 245); }
.partner__logo--msd   { color: oklch(45% 0.13 165); }
.partner__logo--astra { color: oklch(45% 0.16 285); }
.partner__logo--teva  { color: oklch(45% 0.16 240); }
.partner__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.partner__cta:hover { color: var(--red); }
.partner__cta::after {
  content: "→";
  color: var(--red);
  transition: transform .2s ease;
}
.partner:hover .partner__cta::after { transform: translateX(4px); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: oklch(18% 0.01 250);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 32px;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } }
.footer h5 {
  color: white;
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: rgba(255,255,255,0.65); font-size: 14px; }
.footer a:hover { color: white; }
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer__brand .brand img {
  height: 38px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer__brand p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 320px;
  color: rgba(255,255,255,0.55);
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  gap: 24px;
  flex-wrap: wrap;
}
.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.65);
}
.footer__social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.footer__social a:hover { background: var(--red); color: white; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field > label {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.field > label .req { color: var(--red); margin-left: 4px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-4); }
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%237b7e85' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field--check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.field--check input { accent-color: var(--red); width: 17px; height: 17px; }
.form-hint {
  font-size: 13px;
  color: var(--ink-3);
  margin: 4px 0 14px;
}

/* ============================================================
   Auth (login/register) layout
   ============================================================ */
.auth {
  min-height: calc(100vh - 80px);
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  isolation: isolate;
  overflow: hidden;
}
@media (max-width: 920px) { .auth { grid-template-columns: 1fr; } }
.auth__side {
  position: relative;
  padding: 96px 64px;
  color: white;
  background: var(--blue-deep);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.auth__side .hero__media,
.auth__side .hero__overlay,
.auth__side .hero__pattern { position: absolute; inset: 0; }
.auth__side .hero__media { filter: saturate(0.7) brightness(0.55); z-index: -2; }
.auth__side .hero__overlay { z-index: -1; background: linear-gradient(160deg, rgba(15,26,51,0.55) 0%, rgba(10,18,38,0.92) 100%); }
.auth__side .hero__pattern { z-index: -1; }
.auth__side-content { position: relative; max-width: 520px; }
.auth__side .eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}
.auth__side h2 {
  color: white;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.025em;
}
.auth__side p { color: rgba(255,255,255,0.78); font-size: 15px; line-height: 1.65; margin-top: 20px; }
.auth__panel {
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
}
.auth__panel-inner { max-width: 460px; width: 100%; margin: 0 auto; }
.auth__panel h1 { font-size: 32px; margin-bottom: 8px; }
.auth__panel-sub { color: var(--ink-3); margin-bottom: 32px; }
.auth__switch {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
  width: fit-content;
}
.auth__switch a {
  padding: 8px 18px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: var(--radius-pill);
  transition: all .15s ease;
}
.auth__switch a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.05); }

/* ============================================================
   Article view (single)
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 80px;
  align-items: start;
}
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; gap: 56px; } }
.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}
.article-body h2 {
  font-size: 28px;
  margin: 48px 0 18px;
}
.article-body h3 {
  font-size: 20px;
  margin: 32px 0 14px;
}
.article-body p { margin-bottom: 1.2em; color: var(--ink); }
.article-body ul { padding-left: 18px; margin-bottom: 1.5em; }
.article-body li { margin-bottom: 10px; }
.article-body li b, .article-body li strong { color: var(--ink); }
.article-body blockquote {
  margin: 36px 0;
  padding: 20px 28px;
  border-left: 3px solid var(--red);
  background: var(--paper-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
}
.article-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 36px;
  margin-bottom: 36px;
}
.article-head h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 22px; }
.article-head__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.article-head__meta .by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--ink-2);
}
.article-head__meta .by .av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--f-display);
}
.article-side h3 {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.archive-item {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color .15s ease;
}
.archive-item:last-child { border-bottom: 0; }
.archive-item:hover .archive-item__title { color: var(--red); }
.archive-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.archive-item__meta .author { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 12.5px; color: var(--ink-2); }
.archive-item__title {
  font-family: var(--f-display);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  transition: color .15s ease;
}

/* ============================================================
   Event single page (schedule)
   ============================================================ */
.event-head {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
  margin-bottom: 64px;
}
@media (max-width: 920px) { .event-head { grid-template-columns: 1fr; gap: 40px; } }
.event-head__meta-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.event-head__meta-card h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 14px;
}
.event-head__meta-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  gap: 16px;
}
.event-head__meta-row:last-child { border-bottom: 0; }
.event-head__meta-row .k { color: var(--ink-3); }
.event-head__meta-row .v { color: var(--ink); font-weight: 500; text-align: right; }
.event-head__authors {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.event-head__author { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink); }
.event-head__author .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--f-display);
}
.event-body p { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin-bottom: 1.2em; }
.event-body p b, .event-body p strong { color: var(--ink); }

/* Day tabs */
.day-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.day-tabs button {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 28px;
  cursor: pointer;
  text-align: left;
  font-family: var(--f-display);
  transition: all .15s ease;
  min-width: 200px;
}
.day-tabs button .day-tabs__n {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.day-tabs button .day-tabs__d {
  display: block;
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.day-tabs button:hover { border-color: var(--ink-4); }
.day-tabs button.is-active {
  background: var(--ink);
  border-color: var(--ink);
}
.day-tabs button.is-active .day-tabs__n { color: white; }
.day-tabs button.is-active .day-tabs__d { color: rgba(255,255,255,0.6); }

/* Schedule controls */
.schedule-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.schedule-controls__stats {
  display: flex;
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.schedule-controls__stats b {
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* ============================================================
   Schedule — timeline
   ============================================================ */
.schedule .sch-day { display: block; }
.schedule .sch-items {
  position: relative;
  margin-left: 96px;
  border-left: 1px solid var(--line);
  padding-left: 36px;
}
.schedule .sch-item {
  position: relative;
  padding: var(--pad-row) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.schedule .sch-item:last-child { border-bottom: 0; }
.schedule .sch-item .sch-time {
  position: absolute;
  left: -132px;
  top: calc(var(--pad-row) + 1px);
  width: 90px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  padding-right: 20px;
  letter-spacing: 0.02em;
}
.schedule .sch-item .sch-time::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  position: absolute;
  right: -10px;
  top: 7px;
}
.schedule .sch-title {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1.35;
}
.schedule .sch-person {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule .sch-person .av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; font-family: var(--f-display);
}
.schedule .sch-dur {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.schedule .sch-item--break {
  background: var(--paper-2);
  padding-left: 14px;
  padding-right: 14px;
  border-radius: var(--radius-sm);
  border-bottom: 0;
}
.schedule .sch-item--break + .sch-item { border-top: 1px solid var(--line); }
.schedule .sch-item--break .sch-title { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.schedule .sch-item--break .sch-time::before { background: var(--ink-4); }

/* schedule head bar */
.sch-day__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.sch-day__head h3 {
  font-size: 22px;
  font-family: var(--f-display);
  letter-spacing: -0.02em;
}
.sch-day__head .sch-day__date {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* hidden day */
.sch-day[hidden] { display: none !important; }

/* ============================================================
   Profile
   ============================================================ */
.profile-form-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
}
@media (max-width: 720px) { .profile-form-wrap { padding: 28px; } }
.profile-form-wrap h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.profile-form-wrap .form-sub {
  color: var(--ink-3);
  margin-bottom: 36px;
  font-size: 14px;
}
.profile-form-wrap fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 32px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.profile-form-wrap fieldset:first-of-type { border-top: 0; padding-top: 0; }
.profile-form-wrap legend {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  padding: 0;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  position: sticky;
  top: 96px;
}
.contact-side h3 { font-size: 22px; margin-bottom: 6px; }
.contact-side .contact-side__sub { color: var(--ink-3); font-size: 14px; margin-bottom: 28px; }
.contact-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contact-item__ic {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-item__ic svg { width: 16px; height: 16px; }
.contact-item__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.contact-item__value { font-size: 15px; color: var(--ink); }
.contact-item__value a { color: var(--ink); }
.contact-item__value a:hover { color: var(--red); }
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
}
@media (max-width: 720px) { .contact-form-wrap { padding: 28px; } }

/* small flash */
.flash {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 18px;
}
.flash.is-on { display: block; }
.flash--ok { background: oklch(96% 0.04 145); color: oklch(38% 0.12 145); border: 1px solid oklch(86% 0.06 145); }
.flash--err { background: var(--red-soft); color: var(--red-ink); border: 1px solid oklch(88% 0.07 25); }

/* ============================================================
   Comment box (single article)
   ============================================================ */
.comment-box {
  margin-top: 56px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.comment-box h3 { font-size: 18px; margin-bottom: 18px; }

/* utility */
.hidden { display: none !important; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--ink-3); }

/* divider rule */
.rule-red {
  width: 36px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin: 14px 0 22px;
}
