:root {
  --ink: #0a0d16;
  --ink-2: #121728;
  --panel: rgba(18, 23, 40, 0.72);
  --line: rgba(232, 210, 160, 0.16);
  --gold: #e3c27a;
  --gold-2: #f4e2b0;
  --cream: #f6f0e6;
  --muted: #b7b3c9;
  --teal: #7ec8c3;
  --violet: #c9a0e8;
  --danger: #f0b4b4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 760px;
  --font-display: "Fraunces", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(227, 194, 122, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(126, 200, 195, 0.1), transparent 50%),
    linear-gradient(180deg, #070910 0%, var(--ink) 40%, #0c101c 100%);
  line-height: 1.55;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(246, 240, 230, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 230, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.15rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold-2); }

.app-header,
.feed-toolbar,
.onboard-actions,
.people-bar,
.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-header {
  padding: 1.15rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--gold);
  background: rgba(227, 194, 122, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0.7rem 0 0.85rem;
}

.onboarding h1 {
  font-size: clamp(2.1rem, 8vw, 3.4rem);
}

.feed-toolbar h1 {
  font-size: 1.8rem;
  margin: 0;
}

.lede, .sub, .app-footer, .muted, .search-hint {
  color: var(--muted);
}

.lede { margin: 0 0 1.4rem; max-width: 36rem; }

.primary-btn,
.ghost-btn,
.text-btn,
.follow-btn,
.filter {
  font: inherit;
  cursor: pointer;
}

.primary-btn,
.ghost-btn,
.follow-btn {
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
}

.primary-btn {
  border: 0;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1408;
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-btn,
.follow-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
}

.follow-btn.is-on {
  background: rgba(227, 194, 122, 0.14);
  color: var(--gold-2);
  border-color: rgba(227, 194, 122, 0.4);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.4rem;
}

.text-btn:hover,
.text-btn:focus-visible { color: var(--cream); }

.onboard-actions {
  justify-content: flex-start;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.search-box {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
}

.search-box label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-box input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 9, 16, 0.7);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
}

.search-box input:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.filter:focus-visible,
.follow-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.search-hint { margin: 0.65rem 0 0; font-size: 0.85rem; }

.results { list-style: none; margin: 0.75rem 0 0; padding: 0; }

.result, .feed-card, .coming-soon, .empty {
  background: rgba(246, 240, 230, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.result {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.result + .result { margin-top: 0; }

.avatar, .avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 44px;
  object-fit: cover;
  background: #161b2e;
  border: 1px solid var(--line);
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
}

.result .meta { flex: 1; min-width: 0; }
.result strong, .feed-card .title { display: block; }
.result span, .feed-card .byline {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.people-bar {
  margin: 0.75rem 0 0.25rem;
  align-items: flex-start;
}

.people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.7rem;
  background: rgba(18, 23, 40, 0.65);
  color: var(--cream);
  font-size: 0.85rem;
}

.chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.35rem;
}

.search-panel { margin: 0.9rem 0; }

.filters {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin: 1rem 0 0.85rem;
  padding-bottom: 0.15rem;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}

.filter.is-active {
  color: #1a1408;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: transparent;
}

.status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

.feed { display: flex; flex-direction: column; gap: 0.7rem; }

.feed-card .kicker {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.25rem;
}

.feed-card.posts .kicker { color: var(--violet); }
.feed-card.facts .kicker { color: var(--gold); }
.feed-card.coming .kicker { color: var(--gold); }

.feed-card .title {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.feed-card a.title:hover { color: var(--gold-2); }

.feed-card .byline { margin-top: 0.3rem; font-size: 0.8rem; }

.facts-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.facts-list li { margin: 0 0 0.2rem; }

.thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.55rem 0 0.15rem;
  border: 1px solid var(--line);
}

.coming-soon, .empty {
  color: var(--muted);
}

.app-footer {
  margin-top: auto;
  padding-top: 2.5rem;
  font-size: 0.8rem;
}

.app-footer p { margin: 0 0 0.45rem; }

[hidden] { display: none !important; }

@media (max-width: 600px) {
  .feed-toolbar { flex-wrap: wrap; }
  .result { align-items: flex-start; }
}
