* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --surface: #fbf8f1;
  --ink: #161616;
  --subtle: #5f5a52;
  --rule: #d3cbbe;
  --rule-strong: #a79c8a;
  --accent: #2d4d79;
  --tool: #6f6252;
}

body {
  font-family: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif SC', serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

a,
button {
  color: inherit;
}

.masthead,
.frontpage,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.masthead {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--rule-strong);
}

.masthead-inner {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.masthead-kicker {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}

.masthead-title {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.96;
  font-weight: 700;
}

.masthead-meta {
  display: grid;
  gap: 6px;
  justify-items: center;
  max-width: 760px;
}

.masthead-summary,
.meta-info,
.story-meta,
.section-original-title,
.article-link,
.tool-link,
.story-label-row {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}

.masthead-summary {
  color: var(--subtle);
  font-size: 0.96rem;
  line-height: 1.7;
  text-align: center;
}

.meta-info {
  color: var(--subtle);
  font-size: 0.88rem;
}

.frontpage {
  padding: 24px 0 56px;
}

.frontpage-layout {
  display: grid;
  gap: 28px;
}

.lead-story-shell {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule-strong);
}

.story-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.story-section {
  letter-spacing: 0.08em;
}

.lead-headline {
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 1.04;
  margin-bottom: 16px;
}

.lead-summary {
  max-width: 780px;
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 22px;
  white-space: pre-line;
}

.lead-summary::first-letter {
  float: left;
  font-size: 3.2rem;
  line-height: 0.86;
  padding-right: 8px;
  margin-top: 4px;
}

.lead-secondary {
  padding-top: 18px;
  margin-bottom: 16px;
  border-top: 1px solid var(--rule);
}

.english-kicker {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 8px;
}

.lead-original-title {
  font-size: 1.2rem;
  line-height: 1.6;
  font-variant: small-caps;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--subtle);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.story-tools,
.section-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.article-link,
.tool-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  text-decoration: none;
}

.article-link-primary {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.tool-link {
  color: var(--tool);
}

.article-link:hover,
.tool-link:hover {
  opacity: 0.72;
}

.tool-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.section-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.section-story {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.section-headline {
  font-size: 1.45rem;
  line-height: 1.25;
}

.section-summary,
.story-summary {
  color: #2a2926;
  font-size: 0.98rem;
  line-height: 1.85;
  white-space: pre-line;
}

.section-original-title {
  color: var(--subtle);
  font-size: 0.84rem;
  line-height: 1.6;
}

.story-empty {
  padding: 8px 0;
}

.frontpage-loading,
.loading,
.empty {
  border-top: 1px solid var(--rule);
}

.loading,
.empty {
  padding: 48px 0;
  color: var(--subtle);
  text-align: center;
}

.footer {
  padding: 0 0 40px;
  color: var(--subtle);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 980px) {
  .section-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .masthead,
  .frontpage,
  .footer {
    width: min(100%, calc(100% - 24px));
  }

  .masthead-title {
    font-size: 2.9rem;
  }

  .lead-headline {
    font-size: 2.2rem;
  }

  .lead-summary::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    padding-right: 0;
    margin-top: 0;
  }

  .section-columns {
    grid-template-columns: 1fr;
  }

  .story-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
