:root {
  --ink: #222;
  --ink-muted: #646464;
  --navy: #17324f;
  --navy-soft: #254d75;
  --paper: #f7f7f7;
  --surface: #fff;
  --line: #e5e5e5;
  --accent: #1e73be;
  --accent-dark: #155a94;
  --focus: #f0a500;
  --success: #187451;
  --danger: #a62929;
  --shadow: 0 18px 50px rgb(16 37 63 / 9%);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell {
  width: min(70rem, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--navy);
  font-weight: 750;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 4.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 8px rgb(0 0 0 / 4%);
  color: var(--ink);
}

.header-inner {
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 0.65rem 0.65rem 0.65rem 0.15rem;
  background: var(--navy);
  box-shadow: 0 6px 16px rgb(0 0 0 / 18%);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.database-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.database-control label {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.database-control select {
  max-width: 15rem;
  padding: 0.55rem 2.1rem 0.55rem 0.75rem;
  border: 1px solid #cfcfcf;
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.database-control select:disabled {
  cursor: wait;
  opacity: 0.65;
}

main {
  min-height: calc(100vh - 13rem);
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--surface);
}

.hero h1,
.article-header h1 {
  max-width: 18ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-copy {
  max-width: 37rem;
  margin: 1rem 0 0;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--navy);
  border-radius: 0.2rem;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.button:hover {
  background: var(--navy-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--navy);
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(15rem, 0.85fr);
  align-items: start;
  gap: 2rem;
}

.content-area,
.sidebar {
  min-width: 0;
}

.post-list,
.widget-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.post-list {
  display: grid;
  gap: 1.25rem;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 36%);
  min-height: 13.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--surface);
  box-shadow: 0 3px 14px rgb(0 0 0 / 4%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover,
.post-card:focus-within {
  border-color: rgb(30 115 190 / 45%);
  box-shadow: 0 9px 28px rgb(0 0 0 / 8%);
  transform: translateY(-2px);
}

.post-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.category-label {
  display: inline-flex;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  overflow: hidden;
  border-radius: 0.15rem;
  background: #eaf3fb;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.45;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.post-card-title {
  margin: 0.85rem 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  letter-spacing: -0.018em;
  line-height: 1.2;
}

.post-card-title a,
.widget-item a {
  color: var(--ink);
  text-decoration: none;
}

.post-card-title a:hover,
.widget-item a:hover {
  color: var(--accent-dark);
}

.post-meta {
  padding-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.post-thumbnail {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #e9edf1;
}

.post-thumbnail a {
  display: block;
  height: 100%;
}

.post-thumbnail img,
.featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumbnail img {
  transition: transform 220ms ease;
}

.post-card:hover .post-thumbnail img,
.post-card:focus-within .post-thumbnail img {
  transform: scale(1.025);
}

.post-thumbnail-placeholder {
  display: grid;
  min-height: 13.5rem;
  place-items: center;
  background: linear-gradient(145deg, #e7edf3, #f4f6f8);
  color: rgb(23 50 79 / 22%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5rem;
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 1rem;
}

.widget {
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem;
}

.widget > * {
  width: 100%;
}

.widget-title {
  padding-bottom: 0.7rem;
  margin: 0 0 0.3rem;
  border-bottom: 2px solid var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.widget-list {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.widget-item {
  display: grid;
  gap: 0.35rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.widget-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.widget-item a {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.28;
}

.widget-item time {
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.news-card {
  position: relative;
  display: flex;
  min-height: 15.5rem;
  flex-direction: column;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(16 37 63 / 4%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.news-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 4.5rem;
  height: 0.25rem;
  background: var(--accent);
  content: "";
}

.news-card:hover,
.news-card:focus-within {
  border-color: rgb(228 84 45 / 45%);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.news-card h2 {
  margin: 1.3rem 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.18;
}

.news-card h2 a {
  text-decoration: none;
}

.news-card h2 a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.card-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e6dc;
  color: #7f321e;
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  padding-top: 1.5rem;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.article-shell {
  width: min(52rem, 100%);
  margin-inline: auto;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 0.85fr);
  align-items: start;
  gap: 2rem;
}

.article-sidebar {
  position: sticky;
  top: 1rem;
  width: 100%;
  max-width: 100%;
}

.article-widget {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.inside-article {
  padding: clamp(1.25rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--surface);
  box-shadow: 0 4px 20px rgb(0 0 0 / 5%);
}

.injected-related {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.injected-related h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
}

.injected-related a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  background: #f9fafb;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  color: var(--navy-soft);
  font-weight: 750;
}

.article-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 5.5vw, 3.7rem);
  line-height: 1.08;
}

.article-meta {
  margin-top: 1.35rem;
}

.featured-image {
  aspect-ratio: 16 / 9;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  overflow: hidden;
  border-radius: 0.2rem;
  background: #e9edf1;
}

.article-body {
  padding-block: clamp(1.75rem, 5vw, 3.25rem);
  color: #253246;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  line-height: 1.85;
}

.article-body p {
  margin: 0 0 1.45em;
}

.article-body > p:first-child:not(.article-notice)::first-letter {
  float: left;
  padding: 0.1em 0.1em 0 0;
  color: var(--accent-dark);
  font-size: 3.35em;
  font-weight: 700;
  line-height: 0.75;
}

.article-notice {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: #fff8f1;
  color: var(--ink-muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.loading-card,
.state-card {
  display: grid;
  min-height: 16rem;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card p,
.state-card p {
  max-width: 34rem;
  margin: 0;
  color: var(--ink-muted);
}

.state-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #ddd6ca;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner nav {
  display: flex;
  gap: 1rem;
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 1rem;
  border-radius: 0.7rem;
  background: var(--danger);
  color: #fff;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 54rem) {
  .site-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

  .hero .button {
    width: fit-content;
  }
}

@media (max-width: 38rem) {
  .header-inner {
    min-height: 5.5rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding-block: 0.75rem;
  }

  .database-control {
    width: 100%;
    justify-content: space-between;
  }

  .database-control select {
    min-width: 0;
    flex: 1;
  }

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

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

  .post-card-copy {
    order: 2;
  }

  .post-thumbnail {
    min-height: 12rem;
    order: 1;
  }

  .inside-article {
    padding-inline: 1rem;
  }

  .news-card {
    min-height: 13rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

[data-newsgo-ad-slot] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  clear: both;
  text-align: center;
  contain: layout paint;
}

[data-newsgo-ad-slot] > iframe,
[data-newsgo-ad-slot] > script,
[data-newsgo-ad-slot] > a {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

[data-newsgo-ad-slot="header"] {
  padding-block: 0.4rem;
}

[data-newsgo-ad-slot="content-bottom"] {
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  [data-newsgo-ad-slot] {
    margin: 0.75rem auto;
  }

  [data-newsgo-ad-slot] > iframe {
    width: min(100%, 320px) !important;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .back-link,
  .button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main,
  .article-body {
    padding: 0;
  }
}
