:root {
  --paper: #f6f3ec;
  --ink: #1c2a32;
  --muted: #5c6b73;
  --card: #ffffff;
  --line: #dce6ea;
  --sea: #0e7c8b;
  --sea-deep: #0a5c68;
  --sun: #f2a65a;
  --leaf: #2f9e6b;
  --break: #e85d4c;
  --shadow: 0 10px 30px rgba(28, 42, 50, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
body {
  font-family: Outfit, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(14, 124, 139, 0.12), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, rgba(242, 166, 90, 0.18), transparent 50%),
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; }
.glow { display: none; }

.mast {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 48px 16px;
  align-items: flex-start;
}
.brand h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 0.92;
  margin: 0;
  letter-spacing: -0.03em;
}
.brand h1 span { color: var(--sea); }
.brand h1 a { text-decoration: none; }
.top-tools {
  position: fixed;
  top: 8px;
  right: 10px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-pick { margin: 0; }
.lang-pick select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'><path fill='%230e7c8b' d='M4 6l4 5 4-5z'/></svg>") no-repeat right 8px center;
  border: 1px solid var(--sea);
  border-radius: 999px;
  padding: 4px 22px 4px 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  max-width: 150px;
}
.lang-pick select:hover,
.lang-pick select:focus {
  outline: none;
  border-color: var(--sea-deep);
}
.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--sea);
  font-weight: 700;
}
.kicker a { color: var(--sea); }
.tag { max-width: 440px; color: var(--muted); margin: 12px 0 0; }
.mast-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  padding-top: 44px;
  pointer-events: none;
}
.mast-side > * { pointer-events: auto; }
.live-note {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 4px 3px 8px;
  box-shadow: var(--shadow);
}
.inbox { position: relative; z-index: 4; }
.inbox-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--sea);
  border-radius: 999px;
  background: var(--sea);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 124, 139, 0.28);
  cursor: pointer;
}
.inbox-btn:hover,
.inbox-btn[aria-expanded="true"] {
  background: var(--sea-deep);
  border-color: var(--sea-deep);
  color: #fff;
}
.inbox-btn.has-mail {
  background: var(--break);
  border-color: var(--break);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(232, 93, 76, 0.45);
  animation: bell-glow 1.8s ease-out infinite;
}
.inbox-btn.has-mail svg {
  transform-origin: 50% 12%;
  animation: bell-ring 1.15s ease-in-out infinite;
}
.inbox-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--break);
  border: 1px solid var(--break);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.inbox-btn.has-mail .inbox-count {
  background: #fff;
  color: var(--break);
}
.inbox-count.is-hidden { display: none; }
.inbox-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 2;
  padding: 10px 0 8px;
  pointer-events: auto;
}
.inbox-panel.is-hidden,
.inbox-panel[hidden] {
  display: none !important;
  pointer-events: none;
}
.inbox-head {
  margin: 0 14px 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.inbox-empty {
  margin: 0 14px 8px;
  color: var(--muted);
  font-size: 13px;
}
.inbox-empty.is-hidden { display: none; }
.inbox-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inbox-panel li a {
  display: grid;
  gap: 2px;
  padding: 8px 14px;
  text-decoration: none;
  color: inherit;
}
.inbox-panel li a:hover { background: var(--paper); }
.inbox-panel li strong {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}
.inbox-panel li span {
  font-size: 11px;
  color: var(--muted);
}
.pulse { display: flex; gap: 18px; margin: 0; }
.pulse div { margin: 0; }
.pulse dt {
  font-family: Fraunces, serif;
  font-size: 26px;
  color: var(--sea-deep);
  transition: color 0.35s ease, transform 0.35s ease;
}
.pulse dt.is-fresh {
  color: var(--leaf);
  transform: translateY(-2px);
}
.pulse dd { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.ghost {
  color: var(--sea);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wire-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 3px rgba(47, 158, 107, 0.16);
  animation: live-pulse 2s ease-out infinite;
}
.wire-dot.is-stale {
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.18);
  animation: none;
}
.wire-status {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.wire-status strong { color: var(--ink); }
.live-note button {
  position: relative;
  z-index: 4;
  font: inherit;
  border: 0;
  color: #fff;
  padding: 6px 10px;
  min-height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
}
.live-note button.is-on { background: var(--leaf); }
.live-note button.is-off { background: var(--break); }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 107, 0.35); }
  70% { box-shadow: 0 0 0 6px rgba(47, 158, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 158, 107, 0); }
}
@keyframes bell-ring {
  0%, 70%, 100% { transform: rotate(0); }
  12% { transform: rotate(16deg); }
  24% { transform: rotate(-14deg); }
  36% { transform: rotate(10deg); }
  48% { transform: rotate(-8deg); }
  60% { transform: rotate(4deg); }
}
@keyframes bell-glow {
  0% { box-shadow: 0 0 0 0 rgba(232, 93, 76, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(232, 93, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 93, 76, 0); }
}

.dates { align-items: center; }

.console {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: end;
  margin: 18px 48px 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.console-primary,
.console-more {
  display: contents;
}
.console label, .date-label {
  display: grid;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}
.console .search { order: 1; flex: 1 1 220px; min-width: 160px; max-width: 320px; }
.console .vibe { order: 2; flex: 0 1 140px; }
.console-more > label { order: 4; flex: 0 1 124px; max-width: 148px; }
.console .go { order: 9; margin-left: auto; }
.console .more-toggle { display: none; order: 8; }
.search-field {
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.search-field:focus-within {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(14, 124, 139, 0.12);
}
.console input, .console select, .console button {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
}
.console select {
  width: 100%;
  max-width: none;
  min-width: 0;
  text-overflow: ellipsis;
}
.search-field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230e7c8b' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.2-3.2'/></svg>") no-repeat 12px 50%;
  border-radius: 0;
  padding: 8px 8px 8px 36px;
}
.search-field input:focus { outline: none; }
.search-field input::-webkit-search-decoration,
.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.console .go {
  flex: 0 0 auto;
  align-self: end;
  background: var(--sea);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  min-height: 38px;
}
.console .go:hover { background: var(--sea-deep); }
.console .more-toggle {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea-deep);
  background: #fff;
  border: 1px solid var(--sea);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 38px;
  cursor: pointer;
  white-space: nowrap;
}
.console .more-toggle.is-set::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--sun);
}

.ticker {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 16px 48px 0;
  padding: 0 0 0 16px;
  border-left: 4px solid var(--break);
  background: #fff4f2;
  border-radius: 12px;
  overflow: hidden;
}
.ticker-kicker {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--break);
  font-weight: 700;
  padding: 12px 16px 12px 0;
  background: #fff4f2;
  z-index: 1;
  box-shadow: 12px 0 12px 4px #fff4f2;
}
.ticker-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  padding: 12px 40px 12px 8px;
  animation: ticker-move 72s linear infinite;
}
.ticker-track a {
  max-width: min(36rem, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
}
.ticker-track.is-static {
  animation: none;
  width: auto;
}
.ticker-track a::after {
  content: "•";
  margin-left: 40px;
  color: var(--break);
  font-weight: 700;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
  .inbox-btn.has-mail,
  .inbox-btn.has-mail svg { animation: none; }
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 20px;
  padding: 24px 48px 8px;
}
.lead {
  background: linear-gradient(180deg, #fff8ee, #fff 42%);
  border: 1px solid #f3d7b3;
  border-radius: 24px;
  padding: 28px;
  min-height: 260px;
  box-shadow: var(--shadow);
}
.lead h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  margin: 10px 0 16px;
}
.lead h2 a { text-decoration: none; }
.dek { font-size: 18px; color: #41545c; max-width: 46rem; }
.side-stack { display: grid; gap: 12px; }
.side-stack article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.side-stack h3 { font-family: Fraunces, serif; margin: 6px 0 0; font-size: 22px; line-height: 1.2; }
.side-stack h3 a { text-decoration: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 22.25rem;
  gap: 16px;
  padding: 24px 48px 48px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--sea); }
.card.is-new {
  border-color: var(--sea);
  box-shadow: 0 10px 30px rgba(14, 124, 139, 0.18);
}
.card h2 {
  font-family: Fraunces, serif;
  font-size: 22px;
  line-height: 1.25;
  height: 3.75em;
  margin: 10px 0 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.card h2 a { text-decoration: none; }
.card .blurb {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #41545c;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}
.meta { color: var(--muted); font-size: 12px; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.card .meta:not(.foot) {
  flex: 0 0 auto;
  min-height: 1.5em;
  max-height: 1.5em;
  overflow: hidden;
}
.card .meta:not(.foot) > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: none;
}
.card .meta > .badge,
.card .meta > .where {
  flex: 0 0 auto;
  overflow: visible;
  max-width: none;
}
.card .meta > span { max-width: 10em; flex: 1 1 auto; }
.card .meta > a:not(.where):not(.open-original) { flex: 0 1 7em; }
.meta a { color: var(--sea); text-decoration: none; }
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
  min-height: 1.85em;
  max-height: none;
  overflow: visible;
  line-height: 1.3;
  white-space: nowrap;
}
.foot .when {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  font-variant-numeric: tabular-nums;
}
.open-original {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.open-original svg { flex: 0 0 auto; }
.where { font-weight: 600; }

.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.badge-break { background: var(--break); }
.badge-lang { background: #e7f5f7; color: var(--sea-deep); }
.banner, .notice {
  margin: 12px 48px;
  padding: 12px 16px;
  background: #fff8ee;
  border: 1px solid #f3d7b3;
  border-radius: 12px;
  color: var(--ink);
}
.pager { display: flex; gap: 16px; align-items: center; padding: 0 48px 64px; }
.pager a { color: var(--sea); }
.empty { padding: 24px 0; color: var(--muted); grid-column: 1 / -1; }

.story { max-width: 820px; padding: 32px 48px 80px; }
.story h1 { font-family: Fraunces, serif; font-size: clamp(36px, 5vw, 60px); margin: 8px 0 16px; line-height: 1.05; }
.body { font-size: 20px; }
.excerpt { font-size: 20px; color: #41545c; }
.hero { width: 100%; height: auto; margin: 16px 0; border-radius: 16px; border: 1px solid var(--line); }
.button {
  display: inline-block;
  margin-top: 16px;
  background: var(--sea);
  color: #fff;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tech { margin-top: 32px; font-size: 13px; color: var(--muted); }
.login-wrap { max-width: 460px; }
.login {
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.login label {
  display: grid;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.login input { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.top h1 { font-family: Fraunces, Georgia, serif; margin: 0; font-size: clamp(28px, 4vw, 42px); }
.login button, .editorial button {
  font: inherit;
  padding: 10px 16px;
  background: var(--sea);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}
.editorial {
  margin-top: 32px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  display: grid;
  gap: 10px;
}
.top { display: flex; justify-content: space-between; gap: 24px; padding: 32px 48px 16px; }

.toast {
  position: fixed;
  top: 42px;
  right: 10px;
  max-width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sea);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  z-index: 90;
}
.toast a { color: var(--sea); font-weight: 700; text-decoration: none; }
.toast.is-hidden { display: none; }

@media (max-width: 960px) {
  .stage, .mast { grid-template-columns: 1fr; display: grid; }
  .mast-side { justify-items: start; }
}
@media (max-width: 800px) {
  body { padding-top: 42px; }
  .mast, .console, .ticker, .grid, .story, .pager, .banner { padding-left: 16px; padding-right: 16px; }
  .mast { padding-top: 8px; padding-bottom: 8px; gap: 16px; }
  .brand h1 { font-size: 34px; }
  .mast-side { padding-top: 0; }
  .pulse dt { font-size: 20px; }
  .pulse { gap: 12px; }
  .console {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 12px;
  }
  .console-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "search search search"
      "vibe more go";
    gap: 8px;
    align-items: end;
  }
  .console-more {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .console.is-open .console-more { display: grid; }
  .console-more > label:last-child { grid-column: 1 / -1; }
  .console .search,
  .console .vibe,
  .console .more-toggle,
  .console .go,
  .console-more > label {
    order: unset;
    flex: none;
    max-width: none;
    min-width: 0;
    margin: 0;
  }
  .console .search { grid-area: search; }
  .console .vibe { grid-area: vibe; }
  .console .more-toggle { display: inline-flex; align-items: center; grid-area: more; min-height: 44px; }
  .console .go { grid-area: go; min-height: 44px; padding-left: 18px; padding-right: 18px; }
  .console label:not(.search) { flex: none; }
  .console select,
  .console input,
  .more-toggle,
  .console .go { font-size: 16px; }
  .ticker { margin: 12px 16px 0; }
  .grid { padding-top: 16px; padding-bottom: 32px; gap: 12px; grid-template-columns: 1fr; grid-auto-rows: 20rem; }
  .card { padding: 16px; }
  .card h2 { font-size: 20px; height: 3.75em; }
  .card:hover { transform: none; }
  .pager { padding-bottom: 40px; }
  .top-tools { top: 6px; right: 8px; gap: 4px; }
  .lang-pick select { max-width: 118px; }
  .open-original { min-height: 32px; }
}
