:root {
  --tvl-ink: #111111;
  --tvl-muted: #646464;
  --tvl-line: #dedbd5;
  --tvl-paper: #fbfaf7;
  --tvl-soft: #f3f0e9;
  --tvl-red: #f3133b;
  --tvl-red-dark: #c6092d;
  --tvl-mint: #00bba7;
  --tvl-mint-dark: #007f74;
  --tvl-yellow: #ffe45c;
  --tvl-shadow: 0 22px 60px rgba(17, 17, 17, 0.1);
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--tvl-paper);
  color: var(--tvl-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--tvl-yellow);
  color: var(--tvl-ink);
}

.font-editorial,
.editorial-title {
  font-family: Iowan Old Style, Baskerville, "Times New Roman", Georgia, serif;
  font-variation-settings: "opsz" 48;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0.75rem 1rem;
  font-weight: 800;
  box-shadow: var(--tvl-shadow);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  isolation: isolate;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

.site-header::after {
  background: linear-gradient(90deg, var(--tvl-red) 0 58%, var(--tvl-mint) 58% 100%);
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.masthead-logo {
  display: block;
  height: 40px;
  width: 174px;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  background: var(--tvl-red);
  bottom: -0.45rem;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
  width: 100%;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.tvl-grid {
  background-image: linear-gradient(rgba(17, 17, 17, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.055) 1px, transparent 1px);
  background-size: 38px 38px;
}

.tvl-noise {
  position: relative;
}

.tvl-noise::before {
  background-image: radial-gradient(rgba(17, 17, 17, 0.13) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
  content: "";
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  position: absolute;
}

.section-kicker {
  align-items: center;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  gap: 0.55rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.section-kicker::before {
  background: var(--tvl-red);
  border-radius: 999px;
  content: "";
  height: 0.5rem;
  width: 0.5rem;
}

.headline-balance {
  text-wrap: balance;
}

.copy-balance {
  text-wrap: pretty;
}

.editorial-card {
  background: #fff;
  border: 1px solid var(--tvl-line);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.editorial-card:hover {
  border-color: rgba(243, 19, 59, 0.45);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.1);
  transform: translateY(-3px);
}

.editorial-card img {
  transition: transform 420ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.editorial-card:hover img {
  transform: scale(1.035);
}

.media-frame {
  background: #e9e6df;
  overflow: hidden;
  position: relative;
}

.media-frame > img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.media-frame::after {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.topic-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--tvl-line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 750;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.topic-chip:hover {
  background: var(--tvl-ink);
  border-color: var(--tvl-ink);
  color: #fff;
  transform: translateY(-2px);
}

.topic-chip::before {
  background: var(--tvl-mint);
  border-radius: 999px;
  content: "";
  height: 0.45rem;
  width: 0.45rem;
}

.number-marker {
  color: transparent;
  font-family: Iowan Old Style, Baskerville, Georgia, serif;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(17, 17, 17, 0.35);
}

.brand-shadow {
  box-shadow: 9px 9px 0 var(--tvl-mint);
}

.brand-shadow-red {
  box-shadow: 9px 9px 0 var(--tvl-red);
}

.ticker-mask {
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  overflow: hidden;
}

.ticker-track {
  animation: ticker 34s linear infinite;
  display: flex;
  min-width: max-content;
  will-change: transform;
}

.ticker-mask:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.article-copy {
  color: #292929;
  font-family: Iowan Old Style, Baskerville, Georgia, serif;
  font-size: clamp(1.08rem, 1.6vw, 1.23rem);
  line-height: 1.82;
}

.article-copy > * + * {
  margin-top: 1.25em;
}

.article-copy h2,
.article-copy h3,
.article-copy h4 {
  color: var(--tvl-ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 1.8em;
}

.article-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.article-copy h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
}

.article-copy a {
  color: var(--tvl-red-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(243, 19, 59, 0.35);
  text-underline-offset: 0.2em;
}

.article-copy ul,
.article-copy ol {
  padding-left: 1.4em;
}

.article-copy ul {
  list-style: disc;
}

.article-copy ol {
  list-style: decimal;
}

.article-copy li + li {
  margin-top: 0.5em;
}

.article-copy blockquote {
  border-left: 4px solid var(--tvl-mint);
  color: #3f3f3f;
  font-size: 1.12em;
  font-style: italic;
  padding: 0.25rem 0 0.25rem 1.25rem;
}

.article-copy img,
.article-copy video,
.article-copy iframe {
  border-radius: 1rem;
  height: auto;
  max-width: 100%;
}

.dashboard-shell {
  background: #f4f2ed;
  min-height: calc(100vh - 112px);
}

.dashboard-sidebar {
  background: #151515;
  color: #fff;
}

.dashboard-nav-link {
  align-items: center;
  border-radius: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-nav-link:hover,
.dashboard-nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(2px);
}

.dashboard-nav-link[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--tvl-mint);
}

.form-control {
  background: #fff;
  border: 1px solid #d7d3cb;
  border-radius: 0.85rem;
  color: var(--tvl-ink);
  min-height: 3rem;
  outline: none;
  padding: 0.75rem 0.9rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.form-control:focus {
  border-color: var(--tvl-mint-dark);
  box-shadow: 0 0 0 4px rgba(0, 187, 167, 0.13);
}

.form-control[disabled] {
  background: #efede8;
  color: #777;
  cursor: not-allowed;
}

.field-help {
  color: #777;
  font-size: 0.75rem;
  line-height: 1.4;
}

.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  text-transform: uppercase;
}

.status-published {
  background: #dff9ee;
  color: #006c52;
}

.status-draft {
  background: #eeeae2;
  color: #625f58;
}

.status-pending {
  background: #fff2c4;
  color: #7a5700;
}

.toast-region {
  bottom: 1rem;
  display: grid;
  gap: 0.5rem;
  max-width: min(92vw, 24rem);
  position: fixed;
  right: 1rem;
  z-index: 100;
}

.tvl-toast {
  animation: toast-in 200ms ease both;
  background: #151515;
  border-left: 4px solid var(--tvl-mint);
  border-radius: 0.75rem;
  box-shadow: var(--tvl-shadow);
  color: #fff;
  font-size: 0.88rem;
  padding: 0.85rem 1rem;
}

.tvl-toast[data-type="error"] {
  border-left-color: var(--tvl-red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.scrollbar-none {
  scrollbar-width: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

:focus-visible {
  outline: 3px solid rgba(0, 187, 167, 0.55);
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .dashboard-sidebar {
    bottom: 0;
    left: 0;
    max-width: 19rem;
    overflow-y: auto;
    position: fixed;
    top: 0;
    transform: translateX(-102%);
    transition: transform 220ms ease;
    width: 86vw;
    z-index: 70;
  }

  .dashboard-sidebar.is-open {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
