/*
 * xbrl.lu — the comparison guide. Deliberately not the product's look: a
 * printed buyer's guide (paper, ink, serif headlines, ruled tables) rather
 * than an app. System fonts only, so there is nothing to load but this file.
 */

:root {
  --paper: #f7f2e8;
  --paper-deep: #efe7d6;
  --card: #fffdf8;
  --ink: #1b2a33;
  --ink-soft: #46555d;
  --ink-faint: #7a8388;
  --rule: #d8cfbb;
  --green: #1d6b52;
  --green-deep: #124a39;
  --green-wash: #e3efe7;
  --amber: #b8660f;
  --amber-wash: #fbefd5;
  --serif:
    "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    serif;
  --sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 68ch;
  --wide: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--green-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}

.prose {
  max-width: var(--measure);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--card);
  padding: 0.5rem 0.9rem;
}

/* ── Masthead ───────────────────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--green);
}

.masthead nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.95rem;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.lang {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 3px double var(--rule);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.hero .lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 60ch;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.2rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.facts strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-right: 0.35rem;
}

/* The disclosure sits in the hero, not the footer: who publishes this is the
   first thing a reader is owed. */
.disclosure {
  margin-top: 2.2rem;
  max-width: var(--measure);
  background: var(--amber-wash);
  border-left: 4px solid var(--amber);
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.disclosure strong {
  color: var(--amber);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

section {
  padding: clamp(2.8rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.section-head {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2rem;
  max-width: var(--measure);
}

.section-head p {
  color: var(--ink-soft);
  margin: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ── Paths (which kind of buyer are you) ────────────────────────────────── */

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

.paths a {
  display: block;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.2rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.paths a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--paper-deep);
}

.paths .if {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.paths .who {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0.4rem 0 0.5rem;
}

.paths .then {
  font-size: 0.93rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ── The table ──────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filters button {
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 62rem;
  font-size: 0.93rem;
  line-height: 1.45;
}

caption {
  caption-side: bottom;
  text-align: left;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
}

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

thead th {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--paper-deep);
  white-space: nowrap;
}

tbody th {
  position: sticky;
  left: 0;
  background: var(--card);
  min-width: 12.5rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  border-right: 1px solid var(--rule);
}

tbody th small {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 0.15rem;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tr.ours th,
tr.ours td {
  background: var(--green-wash);
}

.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  border: 1px solid var(--green);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-bottom: 0.3rem;
}

.none {
  color: var(--ink-faint);
}

.yes {
  color: var(--green-deep);
  font-weight: 600;
}

/* The attribute alone loses to the display rules above, so name them. */
.filters[hidden],
tr[hidden],
.profile[hidden] {
  display: none;
}

/* ── Profiles ───────────────────────────────────────────────────────────── */

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
  gap: 1.1rem;
}

.profile {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.4rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.profile.ours {
  border-color: var(--green);
  box-shadow: inset 0 4px 0 var(--green);
}

.profile .cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.profile h3 {
  margin: 0.35rem 0 0.15rem;
}

.profile .by {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}

.profile p {
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.profile dl {
  margin: 0.2rem 0 1rem;
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.9rem;
}

.profile dt {
  color: var(--ink-faint);
}

.profile dd {
  margin: 0;
}

.profile .sources {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.83rem;
  color: var(--ink-faint);
}

/* ── Checklist, notes, FAQ ──────────────────────────────────────────────── */

.checklist {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.6rem 2.4rem;
}

.checklist li {
  counter-increment: step;
  position: relative;
  padding-left: 3.1rem;
}

.checklist li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--green);
}

.checklist h3 {
  font-size: 1.12rem;
  margin-bottom: 0.3rem;
}

.checklist p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2.5rem;
}

.note {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.3rem 1.4rem;
}

.note h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.note ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.note li + li {
  margin-top: 0.45rem;
}

.faq details {
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 2rem 1.05rem 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.85rem;
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--green);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  color: var(--ink-soft);
  padding-right: 2rem;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  padding: 2.5rem 0 3.5rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

footer .wrap {
  display: grid;
  gap: 0.6rem;
}

footer p {
  margin: 0;
  max-width: var(--measure);
}

/* ── Small screens ──────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .masthead nav {
    display: none;
  }

  .lang {
    margin-left: auto;
  }

  tbody th {
    min-width: 9.5rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .paths a {
    transition: none;
  }
}

@media print {
  .masthead,
  .filters {
    display: none;
  }

  body {
    background: #fff;
  }
}
