:root {
  --ink: #101318;
  --paper: #f1f2f5;
  --card: #ffffff;
  --muted: #667085;
  --line: #e3e6ec;
  --accent: #0f766e;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 30;
}

.skip:focus { left: 12px; top: 12px; }

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 66px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.logo a { color: inherit; text-decoration: none; }

.nav-tabs { flex: 1 1 auto; min-width: 0; }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid transparent;
  background: none;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tabs button:hover { background: #eef0f4; color: var(--ink); }

.tabs button.is-active {
  background: var(--ink);
  color: #fff;
}

.head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.stamp { color: var(--accent); font-weight: 600; }

main { padding-top: 26px; padding-bottom: 70px; }

.tagline {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .01em;
}

.story {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 0;
  transition: box-shadow .2s ease, transform .2s ease;
}

.story:hover {
  box-shadow: 0 10px 26px rgba(16, 19, 24, .08);
  transform: translateY(-2px);
}

.story-media {
  display: block;
  background: #e8ebf0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-media--empty { background: #e8ebf0; }

.story-body { padding: 16px 18px 18px; }

.story-cat {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.01em;
}

.story-title a { text-decoration: none; }

.story-title a:hover { color: var(--accent); }

.story-desc {
  margin: 0 0 10px;
  font-size: 14.5px;
  color: #475467;
  line-height: 1.55;
}

.story-meta {
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.hero { margin-bottom: 30px; }

.hero .story {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}

.hero .story-media {
  order: 2;
  position: relative;
  aspect-ratio: auto;
  min-height: 320px;
}

.hero .story-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .story-body {
  padding: 40px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .story-title {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.14;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.hero .story-desc { font-size: 17px; max-width: 42ch; }

.feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.sponsored {
  margin: 0 0 32px;
  padding: 20px 22px 8px;
  background: #fff;
  border: 1px dashed #c9ced8;
  border-radius: 14px;
}

.sponsored-title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sponsored-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 28px;
}

.sponsored .story {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
}

.sponsored .story:hover { transform: none; box-shadow: none; }

.sponsored .story-media { aspect-ratio: 16 / 9; }

.sponsored .story-title { font-size: 21px; }

.sponsored .story-body { padding: 0; }

.sponsored .story-title { font-size: 16.5px; }

.sponsored .story-cat { color: var(--muted); }

.feed-note {
  padding: 40px 0;
  font-size: 14px;
  color: var(--muted);
}

.site-foot {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 40px 0 34px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.foot-brand {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.foot-note { margin: 0; font-size: 13.5px; color: var(--muted); }

.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; }

.foot-links a { color: var(--muted); text-decoration: none; }

.foot-links a:hover { color: var(--ink); }

.copyright {
  max-width: 1200px;
  margin: 30px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .head-inner { flex-wrap: wrap; gap: 10px; min-height: 0; padding-top: 14px; }
  .head-meta { flex-direction: row; gap: 10px; width: 100%; justify-content: space-between; }
  .nav-tabs { order: 3; flex-basis: 100%; }
  .hero .story { grid-template-columns: 1fr; }
  .hero .story-media { order: 0; min-height: 0; aspect-ratio: 16 / 9; }
  .hero .story-body { padding: 24px 22px 26px; }
  .feed { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .feed, .sponsored-list { grid-template-columns: 1fr; }
  .sponsored .story { grid-template-columns: 1fr; gap: 12px; }
  .sponsored .story-title { font-size: 19px; }
  .shell { padding: 0 16px; }
  .hero .story-title { font-size: 26px; }
}

/* document pages */
.page-doc { background: #fff; }

.doc-head { border-bottom: 1px solid var(--line); background: #fff; }

.doc-head-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.doc-brand { font-size: 18px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }

.doc-back { color: var(--muted); text-decoration: none; }

.doc-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 46px 24px 64px;
}

.doc-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.doc-title {
  margin: 0 0 24px;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.14;
  letter-spacing: -.025em;
}

.doc-body { font-size: 16.5px; line-height: 1.72; color: #303743; }

.doc-body h2 { margin: 34px 0 10px; font-size: 20px; color: var(--ink); }

.doc-body p { margin: 0 0 15px; }

.doc-body ul { margin: 0 0 16px; padding-left: 20px; }

.doc-body li { margin-bottom: 7px; }

.doc-body a { color: var(--accent); }

.doc-foot {
  max-width: 800px;
  margin: 0 auto;
  padding: 22px 24px 50px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.doc-foot a { color: var(--muted); }

.doc-foot p { margin: 0 0 8px; }

@media (max-width: 640px) {
  .tabs { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
}

.feed-more {
  margin: 30px 0 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feed-more[hidden] { display: none; }

.feed-more button {
  appearance: none;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, .28);
  padding: 11px 26px;
  font: inherit;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease;
}

.feed-more button:hover { border-color: currentColor; }
.feed-more button[hidden] { display: none; }

.feed-more p {
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(0, 0, 0, .5);
}

.feed-sentinel { height: 1px; width: 100%; }

.story-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero .story-desc { -webkit-line-clamp: 4; }

.sponsored .story-desc { -webkit-line-clamp: 2; }
