:root{color-scheme:light}
/* Aeru — tech media. Light editorial design system.
   Single stylesheet for the whole site. No external assets, no web fonts. */

:root {
  --bg: #fff;
  --bg-soft: #f5f7fb;
  --line: #e2e7f0;
  --ink: #151a23;
  --ink-soft: #454e60;
  --muted: #6b7488;
  --accent: #1a4fd6;
  --accent-soft: #eef3ff;
  --warm: #b4460f;
  --radius: 10px;
  --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.22; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* ---------- Top line ---------- */

.topline {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.topline-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.topline-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--accent);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2.5px solid #fff;
  border-radius: 50%;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 20px; letter-spacing: 0.2px; }
.brand-text small { margin-top: 3px; font-size: 11px; color: var(--muted); letter-spacing: 0.01em; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}
.main-nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.main-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.search-form {
  display: flex;
  flex: none;
  width: 252px;
  max-width: 100%;
}
.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
}
.search-form input:focus { border-color: var(--accent); outline-offset: -1px; }
.search-form button {
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.search-form button:hover { background: #163fae; border-color: #163fae; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Layout ---------- */

.layout-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding-top: 30px;
  padding-bottom: 44px;
  align-items: start;
}
.main-col { min-width: 0; }
.side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.section { margin-bottom: 38px; }
.section:last-child { margin-bottom: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: 22px; }
.section-link {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 24px;
}
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.card:hover .card-media img { transform: scale(1.02); }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding-top: 12px;
}
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}
.card-meta time { white-space: nowrap; }
.kicker {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.kicker:hover { text-decoration: underline; }
.card-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.32;
  font-weight: 600;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-excerpt {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}
.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}
.tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Lead story ---------- */

.lead-story {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 38px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.lead-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.lead-media img { width: 100%; height: 100%; object-fit: cover; }
.lead-body { min-width: 0; }
.lead-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.5vw, 29px);
  line-height: 1.18;
}
.lead-title a { color: var(--ink); }
.lead-title a:hover { color: var(--accent); text-decoration: none; }
.lead-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Feed rows ---------- */

.list { display: flex; flex-direction: column; }
.list-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:first-child { padding-top: 0; }
.list-item:last-child { border-bottom: 0; }
.list-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-body { min-width: 0; }
.list-body .card-meta { margin-bottom: 5px; }
.list-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}
.list-title a { color: var(--ink); }
.list-title a:hover { color: var(--accent); text-decoration: none; }
.list-excerpt {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------- Sidebar ---------- */

.side-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.side-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.popular-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.popular-item {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.4;
}
.popular-item:last-child { padding-bottom: 0; border-bottom: 0; }
.popular-num {
  flex: none;
  width: 15px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.popular-item a { color: var(--ink); font-weight: 500; }
.popular-item a:hover { color: var(--accent); }

.side-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.ad-slot { background: var(--bg-soft); }
.ad-label {
  display: inline-block;
  margin-bottom: 9px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ad-body { color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.ad-body b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }
.ad-body p { margin: 0 0 8px; }
.ad-body .ad-link { font-size: 12.5px; font-weight: 600; }

.ad-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 16px;
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.ad-inline .ad-label { margin-bottom: 0; background: #fff; }
.ad-inline .ad-body { flex: 1 1 260px; }

.subscribe-box p { margin: 0 0 4px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.subscribe-box .side-title { color: var(--ink); }
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.form-inline input {
  flex: 1 1 150px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.form-inline input:focus { border-color: var(--accent); }
.form-inline button {
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.form-inline button:hover { background: #163fae; border-color: #163fae; }
.form-inline .form-note { flex: 1 1 100%; }
.form-note {
  display: none;
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.45;
}
.form-note.is-visible { display: block; }

/* ---------- Buttons / notice ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--ink-soft); text-decoration: none; }
.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #163fae; border-color: #163fae; color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.more-row { display: flex; justify-content: center; margin-top: 26px; }

.is-hidden { display: none !important; }
[hidden] { display: none !important; }

.notice {
  margin: 0 0 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
}
.notice b { color: var(--ink); }

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 28px;
}
.pagination a,
.pagination span {
  display: inline-block;
  min-width: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13.5px;
  text-align: center;
  text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination .is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.pagination .is-disabled { color: #a2a9b8; }
.pagination .pagination-gap { border: 0; background: transparent; min-width: 18px; padding: 7px 2px; }

/* ---------- Page intro ---------- */

.page-head { padding-top: 30px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 36px); }
.page-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.page-meta { margin-top: 10px; color: var(--muted); font-size: 12.5px; }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-hidden="true"] { color: #aab1bf; }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); }

/* ---------- Article ---------- */

.article { max-width: 820px; padding-top: 18px; }
.article-header { margin-bottom: 22px; }
.article-header h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}
.article-lead {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.article-meta b { color: var(--ink-soft); font-weight: 600; }

.article-cover { margin: 0 0 26px; }
.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.article-cover figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.article-body { font-size: 17px; line-height: 1.72; color: var(--ink); }
.article-body > p:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.15em; }
.article-body h2 {
  margin: 2em 0 .6em;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.article-body h3 {
  margin: 1.7em 0 .5em;
  font-size: 20px;
  line-height: 1.3;
}
.article-body ul,
.article-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.article-body li { margin-bottom: .45em; }
.article-body li::marker { color: var(--accent); }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }
.article-body blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body figure { margin: 1.7em 0; }
.article-body figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.article-body figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}
.article-body table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14px;
}
.table-scroll {
  overflow-x: auto;
  margin: 1.6em 0;
}
.table-scroll table { min-width: 560px; margin: 0; }
.article-body caption {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
}
.article-body th,
.article-body td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.article-body th { background: var(--bg-soft); font-weight: 600; }
.article-body code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}
.article-body pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 13.5px;
  line-height: 1.55;
}
.article-body pre code { padding: 0; border: 0; background: none; }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.article-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.article-foot a { font-weight: 600; }

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 26px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.author-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.author-card h3 { margin: 0 0 4px; font-size: 16px; }
.author-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }

.comments { margin-top: 34px; }
.comments > h2 { margin-bottom: 16px; font-size: 21px; }
.comment {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}
.comment-head b { color: var(--ink); font-size: 13.5px; }
.comment-body { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.comment-body p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink-soft);
}
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent); }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.15fr;
  gap: 28px 34px;
  padding-top: 36px;
  padding-bottom: 30px;
}
.footer-col b { display: block; margin-bottom: 11px; color: var(--ink); font-size: 14px; }
.footer-col p { margin: 0 0 7px; font-size: 13px; line-height: 1.6; }
.footer-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.footer-col ul a { text-decoration: none; }
.social-links { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 15px;
  padding-bottom: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .header-inner { gap: 12px 18px; }
  .main-nav { gap: 16px; }
  .search-form { width: 216px; }
  .layout-2col { gap: 30px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
    border-top: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 11px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .main-nav a.is-active { border-bottom-color: var(--line); }
  .search-form { order: 5; width: 100%; margin-top: 12px; }

  .layout-2col { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .side-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .lead-story { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col:last-child { grid-column: auto; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-inner { gap: 10px 12px; }
  .brand-text small { display: none; }
  .topline { font-size: 11.5px; }
  .topline-inner { gap: 2px 12px; }

  .card-grid { gap: 22px; }
  .section-head h2 { font-size: 20px; }
  .section { margin-bottom: 30px; }

  .list-item { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 15px 0; }
  .list-title { font-size: 15.5px; }
  .list-excerpt { display: none; }

  .lead-title { font-size: 23px; }
  .lead-lead { font-size: 14px; }
  .page-head { padding-top: 22px; }
  .page-head h1 { font-size: 26px; }
  .article-body { font-size: 16px; }
  .article-header h1 { font-size: 28px; }
  .article-lead { font-size: 16px; }
  .article-body h2 { font-size: 22px; }

  .footer-bottom { flex-direction: column; gap: 5px; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .side-col { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 28px; }
  .footer-col:last-child { grid-column: auto; }
  .article-body table { font-size: 12.5px; }
  .article-body th, .article-body td { padding: 6px 7px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark::before { inset: 6px; }
  .brand-mark::after { left: 12px; top: 12px; }
  .brand-text b { font-size: 18px; }
  .nav-toggle { width: 38px; padding: 0 9px; }
  .topline-date { display: block; }
  .card-foot { gap: 4px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
