:root {
  color-scheme: light;
  --bg: #e3d8c7;
  --panel: #f4ebdd;
  --paper: #efe6d7;
  --paper-soft: #f7efe2;
  --ink: #28251f;
  --muted: #746c60;
  --line: #26241f;
  --hair: #d4c7b5;
  --red: #a92a27;
  --red-dark: #7d1c1b;
  --gold: #b98537;
  --black: #181715;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --shadow: 0 24px 70px rgba(57, 43, 25, .2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .48), transparent 30%),
    radial-gradient(circle at 78% 8%, rgba(141, 104, 58, .14), transparent 28%),
    linear-gradient(135deg, #d8cbb8, #efe5d6 52%, #d0bfa7);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--black);
  color: #f8eddd;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(38, 36, 31, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: #3e382f;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.calendar-panel {
  position: sticky;
  top: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(38, 36, 31, .13);
  border-radius: 10px;
  background: rgba(246, 237, 224, .78);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-head h1 {
  margin: 6px 0 7px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.05;
}

.calendar-head p,
.issue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.type-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.type-switcher button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: rgba(255, 255, 255, .36);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.type-switcher button.active {
  border-color: var(--line);
  background: var(--black);
  color: #fff7e8;
}

.month-switcher {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.month-switcher button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: rgba(255, 255, 255, .45);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}

.month-switcher strong {
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-row {
  margin-top: 16px;
  color: #8b8275;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.calendar-grid {
  margin-top: 8px;
}

.day-button {
  min-width: 0;
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(38, 36, 31, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .34);
  color: #8d8375;
  cursor: default;
  font-size: 13px;
  font-weight: 800;
}

.day-button.available {
  background: #fff8eb;
  color: var(--ink);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(169, 42, 39, .18);
}

.day-button.available::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  transform: translateX(-50%);
}

.day-button.active {
  background: var(--black);
  color: #fff7e8;
}

.day-button.active::after {
  background: #fff7e8;
}

.day-button.outside {
  opacity: .32;
}

.issue-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: rgba(255, 255, 255, .32);
}

.issue-card > span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.issue-card h2 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.1;
}

.issue-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.issue-stats div {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  text-align: center;
}

.issue-stats b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1;
}

.issue-stats small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.reader {
  min-width: 0;
}

.newspaper {
  width: min(100%, 940px);
  min-height: 1380px;
  margin: 0 auto;
  padding: 38px 42px 34px;
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .052'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(7deg, rgba(88, 70, 42, .014) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(112, 92, 58, .045));
  border: 1px solid rgba(38, 36, 31, .13);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(78, 67, 50, .08),
    inset 0 0 72px rgba(72, 55, 32, .07);
  font-family: var(--serif);
}

.masthead {
  display: grid;
  grid-template-columns: 210px 1fr 210px;
  align-items: center;
  gap: 18px;
  border-top: 6px solid var(--line);
  border-bottom: 4px solid var(--line);
  padding: 16px 0 12px;
}

.mast-note,
.mast-date {
  color: #7b7469;
  font-size: 13px;
  line-height: 1.45;
}

.mast-note span,
.mast-date span,
.mast-date strong {
  display: block;
}

.mast-note {
  font-style: italic;
}

.mast-date {
  text-align: right;
  font-weight: 700;
}

.mast-brand {
  text-align: center;
}

.mast-brand h2 {
  margin: 0;
  font-family: Georgia, var(--serif);
  font-size: 56px;
  line-height: .9;
  font-weight: 900;
}

.mast-brand p {
  margin: 9px 0 0;
  color: #7d756b;
  font-size: 15px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--line);
  margin-top: 14px;
  padding-bottom: 6px;
}

.section-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
}

.section-title span {
  color: #9e968b;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 900;
}

.section-title-mid {
  margin-top: 20px;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1.92fr 1fr;
  gap: 26px;
  padding-top: 18px;
}

.lead-main h1 {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 33px;
  line-height: 1.14;
  font-weight: 900;
}

.lead-main p,
.secondary-story p,
.paper-story p,
.rank-item p,
.rail-item p {
  color: #534e46;
  font-size: 15.5px;
  line-height: 1.68;
}

.repo-link {
  color: inherit;
  text-decoration: none;
}

.repo-link:hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.repo-meta {
  color: var(--red);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 900;
}

.secondary-story {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--hair);
}

.secondary-story h2 {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 25px;
  line-height: 1.16;
}

.side-rail {
  border-left: 1px solid var(--hair);
  padding-left: 16px;
}

.rail-item {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--hair);
}

.rail-item h4 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.16;
}

.rail-item b {
  display: block;
  color: var(--red);
  font-family: var(--sans);
  font-size: 12px;
}

.rail-item p {
  margin: 5px 0;
  font-size: 12.8px;
  line-height: 1.48;
}

.trend-section {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
  padding-top: 14px;
}

.featured-repo {
  min-height: 142px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px 14px;
  border: 1px solid var(--hair);
  border-left: 5px solid var(--red);
  background: rgba(246, 240, 229, .52);
}

.rank-box {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 900;
}

.featured-repo h4 {
  margin: -2px 0 8px;
  font-size: 24px;
  line-height: 1.12;
}

.featured-repo p {
  grid-column: 2 / 4;
  margin: 0;
  color: #534e46;
  font-size: 14px;
  line-height: 1.62;
}

.rank-list {
  margin-top: 10px;
}

.rank-item,
.watch-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 9px 0 8px;
  border-bottom: 1px solid var(--hair);
}

.rank-num {
  color: var(--red);
  font-family: var(--sans);
  font-weight: 900;
}

.rank-item h4,
.watch-item h4,
.paper-story h4 {
  margin: 0 0 3px;
  font-size: 17px;
  line-height: 1.22;
}

.rank-item p {
  margin: 0 0 3px;
  font-size: 12.6px;
  line-height: 1.42;
}

.insight-box {
  min-height: 486px;
  padding: 18px 20px;
  background: var(--black);
  color: #ede7dc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045);
}

.insight-box h3 {
  margin: 0 0 12px;
  color: #f7f1e8;
  font-size: 22px;
}

.insight-box p {
  margin: 0 0 11px;
  color: #d6ccbd;
  font-size: 13.4px;
  line-height: 1.68;
}

.insight-box strong {
  color: #dfb56a;
}

.dark-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.dark-metrics div {
  padding: 9px 6px;
  border: 1px solid #393733;
  text-align: center;
}

.dark-metrics b {
  display: block;
  color: white;
  font-size: 23px;
  line-height: 1;
}

.dark-metrics span {
  color: #9d9588;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 900;
}

.watch-grid {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 22px;
  padding-top: 14px;
}

.paper-story {
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--hair);
}

.paper-story p {
  margin: 0 0 7px;
  font-size: 13.5px;
  line-height: 1.55;
}

#tradingWatch {
  border-left: 1px solid var(--hair);
  padding-left: 18px;
}

.watch-item p {
  margin: 0;
}

.paper-footer {
  margin-top: 38px;
  padding: 12px 0 8px;
  border-top: 6px solid #7d766e;
  border-bottom: 2px solid var(--line);
  color: #9e968b;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 1180px) {
  .newspaper {
    padding: 32px 28px 32px;
  }

  .masthead {
    grid-template-columns: 150px 1fr 150px;
    gap: 12px;
  }

  .mast-note,
  .mast-date {
    font-size: 11px;
  }

  .mast-brand h2 {
    font-size: 46px;
  }

  .mast-brand p {
    font-size: 13px;
  }

  .section-title h3 {
    font-size: 29px;
  }

  .section-title span {
    font-size: 10.5px;
  }

  .lead-grid {
    grid-template-columns: 1.62fr .92fr;
    gap: 18px;
  }

  .lead-main h1 {
    font-size: 28px;
  }

  .lead-main p,
  .secondary-story p {
    font-size: 14px;
  }

  .rail-item h4 {
    font-size: 15.5px;
  }

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

  .insight-box {
    min-height: 0;
  }

  #tradingWatch {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .calendar-panel {
    position: static;
  }

  .calendar-panel {
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(320px, 1fr);
    gap: 18px;
  }

  .calendar-head,
  .type-switcher,
  .issue-card {
    grid-column: 1;
  }

  .month-switcher,
  .weekday-row,
  .calendar-grid {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding: 12px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calendar-panel {
    display: block;
  }

  .newspaper {
    padding: 24px 18px 28px;
  }

  .masthead,
  .lead-grid,
  .trend-section,
  .watch-grid {
    grid-template-columns: 1fr;
  }

  .mast-note,
  .mast-date,
  .mast-brand {
    text-align: left;
  }

  .mast-brand h2 {
    font-size: 48px;
  }

  .side-rail,
  #tradingWatch {
    border-left: 0;
    padding-left: 0;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-shell,
  .layout,
  .calendar-panel,
  .reader,
  .newspaper {
    width: 100%;
    min-width: 0;
  }

  .calendar-panel,
  .reader,
  .newspaper {
    max-width: 342px;
    margin-left: 0;
    margin-right: 0;
  }

  .calendar-panel {
    padding: 16px 14px;
  }

  .header-nav {
    grid-template-columns: 1fr;
  }

  .calendar-grid,
  .weekday-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .day-button {
    border-radius: 6px;
    font-size: 12px;
  }

  .issue-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .issue-stats b {
    font-size: 20px;
  }

  .issue-stats small {
    font-size: 9px;
  }

  .lead-main h1 {
    font-size: 28px;
  }

  .section-title h3 {
    font-size: 27px;
  }
}
