:root {
  --bg: #f4f4f4;
  --paper: #ffffff;
  --ink: #151515;
  --muted: #666666;
  --line: #d8d8d8;
  --dark: #121212;
  --dark-2: #222222;
  --accent: #e54b24;
  --accent-dark: #b9361a;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #dddddd;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 12px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--dark);
  color: #ffffff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr minmax(180px, 260px) auto;
  gap: 18px;
  align-items: center;
  padding: 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  isolation: isolate;
  background: linear-gradient(135deg, #e54b24 0%, #b9361a 58%, #7f2619 100%);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(0, 0, 0, 0.28);
  transform: rotate(-6deg);
}

.brand-mark::before,
.brand-mark::after,
.brand-rose {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.58);
  pointer-events: none;
}

.brand-mark::before {
  inset: 6px;
}

.brand-mark::after {
  right: 6px;
  bottom: 6px;
  width: 9px;
  height: 9px;
  border-left: 0;
  border-top: 0;
}

.brand-rose {
  top: 6px;
  left: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(38deg);
}

.brand-initial {
  position: relative;
  z-index: 1;
  font-size: 27px;
  line-height: 1;
  font-family: Georgia, serif;
  font-weight: 800;
  transform: rotate(6deg);
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.brand-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-amp {
  color: #ffb59f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  padding: 22px 12px;
  color: #e8e8e8;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--dark-2);
}

.section-nav {
  border-top: 1px solid #2d2d2d;
  background: linear-gradient(180deg, #202020 0%, #181818 100%);
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 18px;
  overflow-x: auto;
}

.section-nav a {
  position: relative;
  min-width: max-content;
  padding: 11px 16px 12px;
  color: #d8d8d8;
  font-size: 13px;
  font-weight: 800;
}

.section-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.section-nav a.active::after {
  background: var(--accent);
}

.site-search input {
  width: 100%;
  height: 34px;
  border: 1px solid #3a3a3a;
  background: #080808;
  color: #ffffff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.site-search input:focus {
  border-color: var(--accent);
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.auth-links .join {
  border: 1px solid #555555;
  padding: 7px 10px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: #ffffff;
}

main {
  max-width: var(--max);
  margin: 22px auto 0;
  padding: 0 18px 42px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--dark);
  margin-bottom: 12px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  padding: 0 0 7px;
  font-size: 22px;
  line-height: 1.15;
}

.section-heading a {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 24px;
  align-items: start;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 238px 238px;
  gap: 12px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  background: #111111;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.86));
}

.feature-card img {
  transition: transform 260ms ease;
}

.feature-card:hover img {
  transform: scale(1.035);
}

.feature-card span,
.feature-card h2 {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
}

.feature-card span {
  bottom: 76px;
  display: inline-block;
  width: max-content;
  max-width: calc(100% - 32px);
  background: var(--accent);
  color: #ffffff;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
}

.feature-card h2 {
  bottom: 12px;
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.12;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}

.feature-1 {
  grid-row: 1 / span 2;
}

.feature-1 h2 {
  font-size: 31px;
}

.community-panel,
.side-block,
.contest-card {
  background: var(--paper);
  border: 1px solid var(--line);
}

.community-panel {
  padding: 14px;
}

.community-tabs,
.feed-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.community-tabs button,
.feed-tabs button,
.load-more {
  border: 1px solid var(--line);
  background: #eeeeee;
  color: #222222;
  height: 34px;
  padding: 0 11px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.community-tabs button.active,
.feed-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.photo-list {
  display: grid;
  gap: 10px;
}

.photo-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 28px;
  grid-template-areas:
    "image date votes"
    "image author votes"
    "image title votes";
  gap: 1px 10px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 10px;
}

.photo-row img {
  grid-area: image;
  aspect-ratio: 1;
}

.photo-date {
  grid-area: date;
  color: var(--muted);
  font-size: 12px;
}

.photo-row strong {
  grid-area: author;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-row span:last-of-type {
  grid-area: title;
  min-width: 0;
  color: #333333;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-row em {
  grid-area: votes;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f0f0;
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.load-more {
  width: 100%;
  margin-top: 14px;
  background: #222222;
  color: #ffffff;
  border-color: #222222;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  margin-top: 28px;
}

.feed-tabs {
  border-bottom: 3px solid var(--dark);
  padding-bottom: 8px;
}

.story-list {
  display: grid;
  gap: 18px;
}

.story-card {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px;
}

.story-card.is-hidden {
  display: none;
}

.story-image {
  position: relative;
  min-height: 168px;
  overflow: hidden;
}

.story-image span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
}

.story-copy time {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.story-copy h2 {
  margin: 0 0 7px;
  font-size: 24px;
  line-height: 1.14;
}

.story-copy h2 a:hover,
.side-block a:hover,
.exclusives a:hover {
  color: var(--accent-dark);
}

.story-copy p {
  margin: 0 0 12px;
  color: #333333;
  font-size: 15px;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.side-block {
  padding: 14px;
}

.side-block h2,
.contest-card h2 {
  margin: 0 0 12px;
  border-bottom: 3px solid var(--dark);
  padding-bottom: 7px;
  font-size: 20px;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-list a {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 10px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
}

.review-list img {
  aspect-ratio: 4 / 3;
}

.contest-card {
  overflow: hidden;
}

.contest-card img {
  height: 188px;
}

.contest-card div {
  padding: 14px;
}

.contest-stats {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.contest-card p {
  margin: 0 0 12px;
  color: #333333;
  font-size: 14px;
}

.contest-card a {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.contest-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.exclusives {
  display: grid;
  gap: 9px;
}

.exclusives a {
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.pagination span,
.pagination a {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.pagination a {
  color: var(--accent-dark);
}

.page-main {
  display: grid;
  gap: 24px;
}

.page-hero {
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 24px;
}

.page-hero span {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 5px 0 8px;
  font-size: 36px;
  line-height: 1.08;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #333333;
  font-size: 16px;
}

.category-layout,
.info-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.category-menu {
  display: grid;
  gap: 8px;
}

.category-menu a {
  border-bottom: 1px solid #eeeeee;
  padding: 8px 0;
  color: #222222;
  font-size: 14px;
  font-weight: 800;
}

.category-menu a.active,
.category-menu a:hover {
  color: var(--accent-dark);
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 24px;
}

.info-card p {
  max-width: 780px;
  margin: 0 0 15px;
  color: #303030;
  font-size: 16px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.article-page {
  display: grid;
  gap: 24px;
}

.article-hero {
  background: #ffffff;
  border: 1px solid var(--line);
}

.article-hero > a,
.article-hero h1,
.article-hero p,
.article-byline {
  margin-left: 24px;
  margin-right: 24px;
}

.article-hero > a {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 900px;
  margin-top: 8px;
  margin-bottom: 10px;
  font-size: 42px;
  line-height: 1.06;
}

.article-hero p {
  max-width: 820px;
  margin-top: 0;
  color: #333333;
  font-size: 18px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-hero img {
  height: 430px;
}

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

.article-body {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 28px;
}

.article-body h2 {
  margin: 30px 0 10px;
  font-size: 25px;
  line-height: 1.18;
}

.article-body h3 {
  margin: 22px 0 8px;
  font-size: 20px;
}

.article-body p,
.article-body li {
  color: #242424;
  font-size: 17px;
  line-height: 1.72;
}

.article-body p {
  margin: 0 0 17px;
}

.article-image {
  margin: 28px 0;
}

.article-image img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.article-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.article-body ul {
  margin: 0 0 18px 22px;
  padding: 0;
}

.site-footer {
  background: #181818;
  color: #e8e8e8;
  padding: 34px 18px 22px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 330px;
  margin: 0;
  color: #bfbfbf;
  font-size: 14px;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 7px;
}

.site-footer h2 {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: 15px;
}

.site-footer a {
  color: #cfcfcf;
  font-size: 13px;
}

.copyright {
  max-width: var(--max);
  margin: 26px auto 0;
  border-top: 1px solid #2c2c2c;
  padding-top: 16px;
  color: #9a9a9a;
  font-size: 12px;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    padding: 0 0 12px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 10px 12px;
    background: #202020;
  }

  .site-search {
    justify-self: stretch;
  }

  .auth-links {
    display: none;
  }

  .top-grid,
  .content-grid,
  .category-layout,
  .info-page,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .community-panel {
    order: 2;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exclusives {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: auto auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-wordmark {
    gap: 5px;
  }

  .brand-amp {
    font-size: 15px;
  }

  .site-search {
    grid-column: 1 / -1;
  }

  main {
    margin-top: 14px;
    padding: 0 12px 30px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .feature-card,
  .feature-1 {
    grid-row: auto;
    height: 245px;
  }

  .feature-1 h2,
  .feature-card h2 {
    font-size: 22px;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-image {
    min-height: 218px;
  }

  .story-copy h2 {
    font-size: 21px;
  }

  .page-hero {
    padding: 18px;
  }

  .page-hero h1 {
    font-size: 29px;
  }

  .article-hero > a,
  .article-hero h1,
  .article-hero p,
  .article-byline {
    margin-left: 18px;
    margin-right: 18px;
  }

  .article-hero h1 {
    font-size: 31px;
  }

  .article-hero p {
    font-size: 16px;
  }

  .article-hero img {
    height: 260px;
  }

  .article-body {
    padding: 20px;
  }

  .sidebar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .contest-card img {
    height: 220px;
  }
}

@media (max-width: 430px) {
  .photo-row {
    grid-template-columns: 58px minmax(0, 1fr) 26px;
    min-height: 58px;
  }

  .story-image {
    min-height: 190px;
  }
}
