/* Site 03 — Finance Editorial design system
   Palette: White #FFFFFF · Navy #142B45 · Deep Navy #0B1C30 · Emerald #168568
   Light BG #F4F7F8 · Border #DDE5E8
   Independent visual system — does not share layout, type or component patterns
   with Site 01 (Fintech Minimal) or Site 02 (Offer Grid). */

:root {
  --white: #FFFFFF;
  --navy: #142B45;
  --navy-deep: #0B1C30;
  --emerald: #168568;
  --emerald-dark: #116b54;
  --bg: #F4F7F8;
  --border: #DDE5E8;
  --text: #1C2B38;
  --text-muted: #5B6B78;
  --text-on-navy: #E8EDF1;
  --danger: #B3261E;
  --radius-sm: 4px;
  --radius-md: 6px;
  --container: 1240px;
  --font-serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 1px 2px rgba(11, 28, 48, 0.06), 0 1px 1px rgba(11, 28, 48, 0.04);
  --shadow-card-hover: 0 4px 14px rgba(11, 28, 48, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--navy-deep); color: var(--white); padding: 10px 16px;
  border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 14px;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

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

/* ---------- header: compact masthead ---------- */
.masthead {
  background: var(--navy-deep);
  color: var(--text-on-navy);
  border-bottom: 3px solid var(--emerald);
}
.masthead__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  min-height: 48px;
}
.masthead__brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--white);
}
.masthead__mark {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: var(--emerald); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 15px; flex: none;
}
.masthead__name {
  font-family: var(--font-serif); font-weight: 700; font-size: 17px; letter-spacing: .01em;
}
.masthead__strap {
  display: none;
  font-size: 12px; color: #B9C6CE; border-left: 1px solid #2A3F54; padding-left: 12px; margin-left: 4px;
}
@media (min-width: 560px) { .masthead__strap { display: inline; } }

.masthead__toggle {
  background: transparent; border: 1px solid #2A3F54; color: var(--white);
  border-radius: var(--radius-sm); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.masthead__nav { display: none; }
.masthead__nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--navy-deep); border-top: 1px solid #2A3F54;
  box-shadow: 0 8px 18px rgba(0,0,0,.18); z-index: 50;
}
.masthead__nav ul { list-style: none; margin: 0; padding: 8px 0; }
.masthead__nav a {
  display: block; padding: 11px 16px; color: var(--text-on-navy); text-decoration: none; font-size: 14px;
}
.masthead__nav a:hover { background: rgba(255,255,255,.06); }
.masthead { position: relative; }

@media (min-width: 900px) {
  .masthead__toggle { display: none; }
  .masthead__nav {
    display: flex !important; position: static; background: none; border: 0; box-shadow: none;
  }
  .masthead__nav ul { display: flex; gap: 4px; padding: 0; }
  .masthead__nav a { padding: 8px 12px; font-size: 13.5px; border-radius: var(--radius-sm); }
  .masthead__nav a:hover { background: rgba(255,255,255,.08); }
}

/* ---------- minimal intro strip (not a hero) ---------- */
.intro {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.intro__row {
  display: flex; flex-direction: column; gap: 6px;
}
.intro__title {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.25; margin: 0;
  color: var(--navy-deep);
}
.intro__title .count {
  font-family: var(--font-sans); font-weight: 700; color: var(--emerald-dark);
  background: #E7F3EF; border-radius: 999px; padding: 1px 9px; font-size: 14px; margin-left: 6px;
}
.intro__meta {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap;
}
.intro__disclosure {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 12.5px; color: var(--text-muted); margin: 0;
}
.intro__disclosure svg { flex: none; margin-top: 2px; color: var(--emerald-dark); }
.intro__disclosure strong { color: var(--navy); }
@media (min-width: 900px) {
  .intro { padding: 20px 0; }
  .intro__row { flex-direction: row; align-items: center; justify-content: space-between; }
  .intro__title { font-size: 24px; }
}

/* ---------- filters ---------- */
.filters { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.filters__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.filters__toggle {
  display: inline-flex; align-items: center; gap: 6px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13.5px; color: var(--navy); font-weight: 600;
}
.filters__badge {
  background: var(--emerald); color: var(--white); border-radius: 999px;
  font-size: 11px; line-height: 1; padding: 3px 6px; font-weight: 700;
}
.sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.sort select {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 8px;
  font-size: 13px; color: var(--navy); background: var(--white);
}
.filters__panel { display: none; padding: 12px 0 16px; border-top: 1px solid var(--border); }
.filters__panel.is-open { display: block; }
.filters__off {
  font-size: 12.5px; color: var(--text-muted); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 12px;
}
.filters__group { border: 0; padding: 0; margin: 0 0 12px; }
.filters__group legend { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; color: var(--text); background: var(--white);
}
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--emerald); outline-offset: 2px; }
.filters__group[disabled] .chip span, .switch.is-disabled { opacity: .55; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.switch__track {
  width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; flex: none;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--white); transition: transform .15s ease;
}
.switch input { position: absolute; opacity: 0; }
.switch input:checked + .switch__track { background: var(--emerald); }
.switch input:checked + .switch__track::after { transform: translateX(14px); }

.status-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0 4px; font-size: 12.5px; color: var(--text-muted);
}

/* ---------- offer grid: dense, editorial comparison cards ---------- */
.offers {
  list-style: none; margin: 0; padding: 16px 0 28px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 640px) { .offers { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1200px) { .offers { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.offer {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); display: flex;
}
.offer__body { display: flex; flex-direction: column; width: 100%; padding: 10px 10px 12px; gap: 8px; }
@media (min-width: 640px) { .offer__body { padding: 14px 14px 16px; gap: 10px; } }

.offer__rank {
  font-size: 10.5px; font-weight: 700; color: var(--emerald-dark); letter-spacing: .04em;
  text-transform: uppercase;
}
.offer__head { display: flex; flex-direction: column; gap: 6px; }
.offer__logo {
  height: 32px; display: flex; align-items: center; justify-content: flex-start;
}
.offer__logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.offer__logo--plate {
  background: var(--plate, var(--navy)); border-radius: var(--radius-sm);
  padding: 4px 8px; height: 32px; display: inline-flex; width: fit-content;
}
.offer__name { font-family: var(--font-serif); font-size: 14.5px; margin: 0; color: var(--navy-deep); line-height: 1.2; }
.offer__site { font-size: 11px; color: var(--text-muted); margin: 0; }

.offer__terms {
  margin: 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  padding: 7px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; row-gap: 2px;
}
.offer__terms > div { display: flex; flex-direction: column; gap: 1px; }
.offer__terms dt { font-size: 9.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin: 0; }
.offer__terms dd { font-size: 12px; font-weight: 700; color: var(--navy-deep); margin: 0; line-height: 1.2; }
.offer__terms dd.pending { font-weight: 600; color: var(--text-muted); font-style: italic; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; text-decoration: none;
  padding: 10px 12px; border: 1px solid transparent; cursor: pointer; min-height: 40px;
}
.btn--primary { background: var(--emerald); color: var(--white); }
.btn--primary:hover { background: var(--emerald-dark); }
.btn--secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
.offer__cta { width: 100%; }
.offer__cta-full, .offer__cta-xs { display: none; }
.offer__cta-xxs { display: inline; }
@media (min-width: 640px) {
  .offer__cta-xxs, .offer__cta-xs { display: none; }
  .offer__cta-full { display: inline; }
}

.offer__details { border-top: 1px solid var(--border); padding-top: 6px; }
.offer__details summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--navy); font-weight: 600; cursor: pointer; padding: 4px 0;
}
.offer__details summary::-webkit-details-marker { display: none; }
.offer__details[open] summary .offer__chev { transform: rotate(180deg); }
.offer__chev { transition: transform .15s ease; flex: none; }
.offer__more { margin: 8px 0 0; font-size: 12px; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.offer__more dt { font-weight: 700; color: var(--navy-deep); font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.offer__more dd { margin: 2px 0 0; color: var(--text); }
.offer__more dd.pending { color: var(--text-muted); font-style: italic; }
.text-link { color: var(--emerald-dark); font-weight: 600; }

.offers--hidden-note { display: none; }

.empty-state {
  text-align: center; padding: 40px 16px; color: var(--text-muted); font-size: 14px;
}

/* ---------- info sections ---------- */
.section { padding: 28px 0; }
.section--alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__title {
  font-family: var(--font-serif); font-size: 21px; color: var(--navy-deep); margin: 0 0 14px;
}
@media (min-width: 900px) { .section__title { font-size: 26px; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.step__num {
  display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white);
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-bottom: 8px;
}
.step h3 { font-family: var(--font-serif); font-size: 15px; margin: 0 0 6px; color: var(--navy-deep); }
.step p { font-size: 13px; color: var(--text-muted); margin: 0; }

.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--border); padding: 12px 0;
}
.faq summary {
  list-style: none; display: flex; justify-content: space-between; gap: 10px; cursor: pointer;
  font-weight: 700; color: var(--navy-deep); font-size: 14.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { font-size: 13.5px; color: var(--text); margin: 8px 0 0; }

.notice-page { max-width: 760px; }
.notice-page h1 { font-family: var(--font-serif); color: var(--navy-deep); font-size: 24px; }
.notice-page h2 { font-family: var(--font-serif); color: var(--navy-deep); font-size: 17px; margin-top: 26px; }
.notice-page p, .notice-page li { font-size: 14px; color: var(--text); line-height: 1.6; }
.callout {
  background: #FFF7E6; border: 1px solid #F0D9A6; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; color: #7A5A12; margin: 16px 0;
}
.callout--pending { background: #EAF3F0; border-color: #BFDCD2; color: var(--emerald-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #B9C6CE; padding: 24px 0 18px; margin-top: 20px; }
.site-footer a { color: #D7E1E7; }
.site-footer__grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: #7E93A3; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.site-footer__bottom {
  border-top: 1px solid #22384A; margin-top: 18px; padding-top: 14px;
  font-size: 11.5px; color: #7E93A3; display: flex; flex-direction: column; gap: 6px;
}

/* ---------- idle dialog ---------- */
dialog#idle-dialog {
  border: 0; border-radius: var(--radius-md); padding: 0; max-width: 420px; width: calc(100% - 32px);
  box-shadow: 0 20px 50px rgba(11,28,48,.3);
}
dialog#idle-dialog::backdrop { background: rgba(11,28,48,.55); }
.idle-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.idle-dialog__head h2 { font-family: var(--font-serif); font-size: 16px; margin: 0; color: var(--navy-deep); }
.idle-dialog__close { background: none; border: 0; color: var(--text-muted); width: 32px; height: 32px; }
.idle-offers { list-style: none; margin: 0; padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.idle-offer { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; }
.idle-offer__logo { width: 52px; height: 32px; display: flex; align-items: center; justify-content: center; flex: none; }
.idle-offer__logo img { max-width: 100%; max-height: 100%; }
.idle-offer__logo--text { font-size: 10px; font-weight: 700; color: var(--navy); text-align: center; }
.idle-offer__info { flex: 1; min-width: 0; }
.idle-offer__name { font-size: 12.5px; font-weight: 700; margin: 0; color: var(--navy-deep); }
.idle-offer__meta { font-size: 11px; color: var(--text-muted); margin: 1px 0 0; }
.idle-offer__rate { color: var(--emerald-dark); font-weight: 600; }
.idle-dialog .btn { padding: 8px 10px; font-size: 12px; min-height: 34px; }

.no-js .nav-js-only { display: none; }
.icon { display: inline-block; vertical-align: middle; }
