:root
{
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;
}

*
{
  box-sizing: border-box;
}

html
{
  scroll-behavior: smooth;
}

body
{
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
}

a
{
  color: inherit;
}

img
{
  max-width: 100%;
  height: auto;
}

/* Public site */

body.public
{
  --ink: #e8ecef;
  --ink-soft: #9aa3ab;
  --void: #07090c;
  --panel: #10151a;
  --panel-2: #151b22;
  --accent: #d4a017;
  --accent-hot: #e8943a;
  --accent-ink: #140f05;
  --line: rgba(232, 236, 239, 0.12);
  --steel: #6d7b88;
  color: var(--ink);
  background: var(--void);
}

body.public .grid-overlay
{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(232, 236, 239, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 236, 239, 0.7) 1px, transparent 1px);
  background-size: 48px 48px;
}

body.public > .topbar,
body.public > main,
body.public > .site-foot
{
  position: relative;
  z-index: 1;
}

body.public .topbar
{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(7, 9, 12, 0.78), transparent);
}

body.public .mark
{
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  opacity: 0.92;
  flex: 0 0 auto;
}

body.public .mark:hover
{
  opacity: 1;
}

body.public .mark img
{
  display: block;
  width: clamp(7rem, 16vw, 9.5rem);
  height: auto;
}

body.public .site-nav
{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.15rem;
}

body.public .site-nav a
{
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.78;
}

body.public .site-nav a:hover,
body.public .site-nav a.is-active
{
  opacity: 1;
  color: var(--accent);
}

body.public .hero
{
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

body.public .hero-media
{
  position: absolute;
  inset: 0;
  z-index: 0;
}

body.public .hero-media img
{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% center;
  transform: scale(1.06);
  animation: hero-drift 18s ease-out both;
}

body.public .hero-veil
{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.84) 0%, rgba(7, 9, 12, 0.42) 46%, rgba(7, 9, 12, 0.2) 70%, rgba(7, 9, 12, 0.55) 100%),
    linear-gradient(0deg, rgba(7, 9, 12, 0.94) 0%, rgba(7, 9, 12, 0.35) 38%, rgba(7, 9, 12, 0.15) 62%, rgba(7, 9, 12, 0.55) 100%);
}

body.public .hero-copy
{
  position: relative;
  z-index: 2;
  width: min(46rem, 100%);
  padding:
    clamp(5.5rem, 12vh, 7rem)
    clamp(1.25rem, 4vw, 3rem)
    clamp(2.5rem, 8vh, 5.5rem);
}

body.public .brand
{
  margin: 0;
}

body.public .brand-logo
{
  display: block;
  width: min(34rem, 92vw);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
  animation: rise 900ms ease-out both;
}

body.public .headline
{
  margin: 1.35rem 0 0;
  max-width: 28ch;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  animation: rise 1000ms ease-out 90ms both;
}

body.public .cta
{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: rise 1200ms ease-out 210ms both;
}

body.public .button
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.public .button:hover
{
  transform: translateY(-1px);
}

body.public .button.primary
{
  background: var(--accent);
  color: var(--accent-ink);
}

body.public .button.primary:hover
{
  background: var(--accent-hot);
}

body.public .button.secondary
{
  background: transparent;
  border-color: rgba(232, 236, 239, 0.28);
  color: var(--ink);
}

body.public .button.secondary:hover
{
  border-color: var(--accent);
  color: var(--accent);
}

body.public .section
{
  padding: clamp(3rem, 8vh, 5rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

body.public .section-head
{
  max-width: 46rem;
  margin-bottom: 2rem;
}

body.public .section-head.row
{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

body.public .section-head h2,
body.public .page-hero h1,
body.public .post-detail h1,
body.public .channel h2,
body.public .priority-body h2,
body.public .teaser-panel h2,
body.public .press-grid h2
{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.public .section-head h2,
body.public .teaser-panel h2,
body.public .press-grid h2,
body.public .channel h2
{
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}

body.public .section-head p,
body.public .lede,
body.public .channel p,
body.public .priority-body p,
body.public .teaser-panel p,
body.public .post-card p
{
  margin: 0.85rem 0 0;
  line-height: 1.6;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

body.public .note
{
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--steel);
}

body.public .text-link
{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

body.public .text-link:hover
{
  text-decoration: underline;
}

body.public .eyebrow
{
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}

body.public .eyebrow a
{
  text-decoration: none;
  color: inherit;
}

body.public .meta
{
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
}

body.public .muted
{
  color: var(--ink-soft);
}

body.public .page-hero
{
  padding: clamp(6.5rem, 14vh, 8rem) clamp(1.25rem, 4vw, 3rem) 1.5rem;
  max-width: 48rem;
}

body.public .page-hero h1
{
  font-size: clamp(2rem, 5vw, 3rem);
}

body.public .pillar-list
{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.25rem;
  max-width: none;
}

body.public .pillar
{
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.35rem 1.25rem;
}

body.public .pillar h3
{
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.public .pillar p
{
  margin: 0.85rem 0 0;
  line-height: 1.6;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

body.public .pillar p + p
{
  margin-top: 0.75rem;
}

body.public .post-list
{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

body.public .post-list.stacked
{
  grid-template-columns: 1fr;
  max-width: 46rem;
}

body.public .post-card
{
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.25rem 1.35rem;
}

body.public .post-card h3
{
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.public .post-card h3 a
{
  text-decoration: none;
}

body.public .post-card h3 a:hover
{
  color: var(--accent);
}

body.public .teaser-panel
{
  max-width: 42rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(212, 160, 23, 0.08), transparent 45%),
    var(--panel);
  padding: 1.75rem 1.5rem;
}

body.public .channel-grid
{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

body.public .channel
{
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.35rem 1.25rem;
}

body.public .priority-list
{
  display: grid;
  gap: 0.85rem;
  max-width: 52rem;
}

body.public .priority-item
{
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1rem 1.1rem;
}

body.public .vote-col
{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

body.public .vote-btn
{
  border: 0;
  background: transparent;
  color: var(--steel);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
}

body.public .vote-btn:hover,
body.public .vote-btn.is-active
{
  color: var(--accent);
}

body.public .vote-score
{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

body.public .priority-meta
{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

body.public .status,
body.public .category
{
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.public .status
{
  color: var(--accent);
}

body.public .category
{
  color: var(--steel);
}

body.public .priority-body h2
{
  font-size: 1.25rem;
}

body.public .post-detail
{
  max-width: 46rem;
  padding-top: clamp(6.5rem, 14vh, 8rem);
}

body.public .post-detail h1
{
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

body.public .post-figure
{
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

body.public .post-figure img
{
  display: block;
  width: 100%;
}

body.public .prose
{
  margin-top: 1.5rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

body.public .prose p,
body.public .prose ul,
body.public .prose ol
{
  margin: 0 0 1rem;
}

body.public .prose h2
{
  margin: 1.75rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

body.public .prose a
{
  color: var(--accent);
}

body.public .press-grid
{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
}

body.public .press-facts
{
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem;
}

body.public .press-facts div
{
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
}

body.public .press-facts dt
{
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

body.public .press-facts dd
{
  margin: 0;
  font-weight: 600;
}

body.public .press-assets
{
  display: grid;
  gap: 1rem;
}

body.public .press-asset
{
  margin: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

body.public .press-asset img
{
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #0b0f13;
}

body.public .press-asset figcaption
{
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
}

body.public .press-asset a
{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

body.public .site-foot
{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.75rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--void);
}

body.public .foot-mark
{
  display: block;
  width: 7.5rem;
  height: auto;
  opacity: 0.85;
}

body.public .foot-links
{
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

body.public .foot-links a
{
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

body.public .foot-links a:hover
{
  color: var(--accent);
}

@keyframes rise
{
  from
  {
    opacity: 0;
    transform: translateY(16px);
  }
  to
  {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift
{
  from { transform: scale(1.12); }
  to { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce)
{
  body.public .brand-logo,
  body.public .headline,
  body.public .cta,
  body.public .hero-media img
  {
    animation: none;
  }

  body.public .hero-media img
  {
    transform: scale(1.04);
  }
}

@media (max-width: 1100px)
{
  body.public .pillar-list
  {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px)
{
  body.public .pillar-list,
  body.public .press-grid,
  body.public .channel-grid
  {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px)
{
  body.public .site-nav
  {
    gap: 0.65rem 0.85rem;
  }

  body.public .site-nav a
  {
    font-size: 0.88rem;
  }

  body.public .headline
  {
    max-width: 20ch;
  }

  body.public .priority-item
  {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }
}

/* Admin */

body.admin
{
  --ink: #142028;
  --ink-soft: #3a4a55;
  --accent: #c45c26;
  --accent-ink: #fff7f0;
  --line: rgba(20, 32, 40, 0.14);
  --admin-bg: #f3f6f8;
  color: var(--ink);
  background: var(--admin-bg);
}

.admin-shell
{
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.admin-header
{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.admin-header h1,
.login-panel h1,
.panel h2
{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
}

.admin-header h1
{
  font-size: 1.75rem;
}

.admin .eyebrow
{
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.admin .eyebrow a
{
  text-decoration: none;
}

.lede
{
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

.ghost
{
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.ghost-button
{
  display: inline-flex;
  align-items: center;
}

.ghost.danger
{
  border-color: rgba(160, 40, 28, 0.35);
  color: #8a2418;
}

.ghost.danger:hover
{
  background: #fdece6;
}

.admin-actions,
.row-actions
{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.row-actions
{
  width: 1%;
  white-space: nowrap;
}

.admin-cards
{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.admin-card
{
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.35rem 1.25rem;
}

.admin-card h2
{
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
}

.admin-card p
{
  margin: 0;
  color: var(--ink-soft);
}

.login-shell
{
  max-width: 22rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  margin: 0 auto;
}

.login-form.bare-login
{
  width: 100%;
  margin-top: 0;
}

.login-form.bare-login .login-error
{
  margin: 0;
}

.login-panel,
.panel
{
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
}

.panel
{
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.login-panel h1
{
  font-size: 1.6rem;
}

.login-form
{
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.login-form label
{
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.login-form input,
.login-form textarea,
.login-form select
{
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  background: #f7fafc;
  font: inherit;
  color: var(--ink);
}

.login-form textarea
{
  resize: vertical;
  min-height: 8rem;
}

.login-form input:focus,
.login-form textarea:focus,
.login-form select:focus
{
  outline: 2px solid rgba(196, 92, 38, 0.35);
  outline-offset: 1px;
  border-color: rgba(196, 92, 38, 0.55);
}

.login-form .button,
.admin .button.primary
{
  justify-self: start;
  border: 0;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.login-error
{
  margin: 1rem 0 0;
  padding: 0.65rem 0.75rem;
  background: #fdece6;
  border: 1px solid rgba(196, 92, 38, 0.35);
  color: #7a2f12;
  font-size: 0.92rem;
}

table
{
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

th,
td
{
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.95rem;
}

th
{
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #f8fafb;
}

td a
{
  font-weight: 600;
  text-decoration: none;
}

td a:hover
{
  text-decoration: underline;
}

.panel h2
{
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}

.panel h3
{
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.facts
{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.facts div
{
  margin: 0;
}

.facts dt
{
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.facts dd
{
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.comment,
.json
{
  margin: 0;
  padding: 0.85rem 1rem;
  background: #f7fafc;
  border: 1px solid var(--line);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
}

.admin .meta
{
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.shot
{
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0f171c;
  border: 1px solid var(--line);
}

.empty
{
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.admin .muted
{
  color: var(--ink-soft);
}

@media (max-width: 640px)
{
  .admin-header
  {
    flex-direction: column;
  }

  table
  {
    display: block;
    overflow-x: auto;
  }
}
