:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5fb;
  --ink: #172033;
  --muted: #657083;
  --line: #dce5f1;
  --line-strong: #bfccdb;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --amber: #f59e0b;
  --amber-soft: #fff4db;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --red: #dc2626;
  --shadow: 0 18px 48px rgba(23, 32, 51, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .04) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(0deg, rgba(23, 32, 51, .035) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(180deg, #ffffff 0%, var(--bg) 320px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 52%, rgba(245, 158, 11, .08) 52% 55%, transparent 55%),
    linear-gradient(70deg, transparent 0 64%, rgba(37, 99, 235, .06) 64% 66%, transparent 66%);
}

a {
  color: var(--blue);
}

a:hover {
  color: #1747b5;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 3.4rem;
  line-height: .96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.25;
}

p {
  line-height: 1.62;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

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

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 310px;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-logo,
.footer-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(23, 32, 51, .12));
}

.brand-copy {
  min-width: 0;
}

.mark {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--blue), #5b7cfa);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand span span,
.brand > span > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.25;
}

.nav,
.pill-row,
.footer-links,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav {
  justify-content: flex-end;
}

.nav a,
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn {
  width: 100%;
}

.nav a:hover,
.btn:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.soft {
  background: var(--blue-soft);
  border-color: #cddcff;
  color: #1747b5;
}

.btn.hot {
  border-color: var(--amber);
  background: var(--amber);
  color: #251707;
}

.btn.danger {
  border-color: #f1a7a7;
  background: #fff1f1;
  color: var(--red);
}

.btn.inline {
  width: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: stretch;
}

.hero-main,
.panel,
.card,
.score-tile,
.category-tile,
.method-grid,
.callout,
.footer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.hero-main {
  min-height: 430px;
  display: grid;
  align-content: center;
  gap: 18px;
  overflow: hidden;
  position: relative;
  padding: 48px;
}

.hero-main::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -56px;
  width: 320px;
  height: 210px;
  border: 1px solid rgba(37, 99, 235, .18);
  transform: rotate(-9deg);
  background:
    linear-gradient(135deg, transparent 0 47%, rgba(37, 99, 235, .16) 47% 52%, transparent 52%),
    linear-gradient(45deg, transparent 0 48%, rgba(245, 158, 11, .2) 48% 52%, transparent 52%),
    #f8fbff;
}

.hero-main > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  max-width: 14ch;
  font-size: 4rem;
}

.lede {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid #cddcff;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pill.warm {
  border-color: #f6d69a;
  background: var(--amber-soft);
  color: #9a5f03;
}

.pill.lime {
  border-color: #bce6ca;
  background: var(--green-soft);
  color: var(--green);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.score-tile {
  display: grid;
  align-content: center;
  min-height: 128px;
  padding: 20px;
}

.score-tile strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 2.6rem;
  line-height: 1;
}

.score-tile span {
  color: var(--muted);
  line-height: 1.45;
}

.section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-tile {
  display: grid;
  gap: 8px;
  min-height: 130px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.category-tile span {
  color: var(--blue);
  font-weight: 900;
}

.category-tile strong {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.5;
}

.category-tile:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.signal-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(245, 158, 11, .08)),
    rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  display: grid;
  gap: 9px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .84);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.signal-card:hover {
  border-color: var(--blue);
  box-shadow: 0 18px 34px rgba(37, 99, 235, .13);
  transform: translateY(-1px);
}

.signal-card span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .78rem;
  font-weight: 900;
}

.signal-card strong {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.15;
}

.signal-card em {
  color: var(--muted);
  font-size: .94rem;
  font-style: normal;
  line-height: 1.5;
}

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

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

.card,
.panel {
  padding: 18px;
}

.deal-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  align-content: start;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.deal-card:hover {
  border-color: var(--blue);
  box-shadow: 0 22px 42px rgba(23, 32, 51, .12);
  transform: translateY(-2px);
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f9fbff, #eef4ff);
  color: var(--muted);
  text-decoration: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.detail-thumb {
  aspect-ratio: 16 / 9;
  margin: 16px 0 18px;
  background: #fff;
}

.detail-thumb img {
  object-fit: contain;
  padding: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .86rem;
}

.meta span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.summary,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.score {
  display: grid;
  gap: 7px;
}

.score-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .92rem;
}

.score-head strong {
  color: var(--ink);
}

.track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
}

.disclosure {
  padding: 10px 12px;
  border: 1px solid #f6d69a;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #74500f;
  font-size: .9rem;
  line-height: 1.45;
}

.article-body {
  color: #2f3b4f;
  line-height: 1.75;
}

.article-body p {
  margin-bottom: 1rem;
}

.deal-note {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fbfdff;
  color: #2f3b4f;
  font-size: 1.03rem;
  line-height: 1.76;
}

.deal-note p {
  max-width: 74ch;
  margin: 0;
}

.deal-note p + p {
  margin-top: 14px;
}

.deal-note strong {
  color: var(--ink);
  font-weight: 900;
}

.method-grid,
.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.method-grid p,
.callout p {
  margin-bottom: 0;
  color: var(--muted);
}

.split-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 99, 235, .18);
  border-color: var(--blue);
}

input[type="checkbox"] {
  width: auto;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #cddcff;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #1747b5;
}

.notice.bad {
  border-color: #f1a7a7;
  background: #fff1f1;
  color: var(--red);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .8fr);
  gap: 18px;
  margin-top: 22px;
  padding: 20px;
  color: var(--muted);
  font-size: .9rem;
}

.footer p {
  margin: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 64px;
  height: 64px;
}

.footer-brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.footer-brand div > span {
  display: block;
  max-width: 48ch;
  line-height: 1.5;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--blue);
}

@media (max-width: 980px) {
  h1 {
    font-size: 2.65rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .topbar,
  .hero,
  .two-grid,
  .method-grid,
  .callout,
  .footer {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .nav,
  .footer-links {
    justify-content: flex-start;
  }

  .grid,
  .category-grid,
  .signal-grid,
  .footer-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  h1,
  .hero-title {
    font-size: 2.25rem;
    line-height: 1;
  }

  .hero-main {
    min-height: auto;
    padding: 28px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-copy strong {
    font-size: .98rem;
  }

  .brand-copy span {
    font-size: .78rem;
  }

  .nav a,
  .btn {
    min-height: 40px;
    padding: 9px 11px;
  }

  .grid,
  .category-grid,
  .signal-grid,
  .split-list,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

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

  .detail-thumb {
    aspect-ratio: 4 / 3;
  }
}
