/* Lucent Works — single stylesheet. No external resources, no web fonts. */

:root {
  --paper: #faf7f0;
  --panel: #ffffff;
  --tint: #f1ece0;
  --tint-deep: #e6dfcd;
  --ink: #15211c;
  --body: #2b3a33;
  --muted: #55645c;
  --line: #d8cfbb;
  --line-soft: #e8e1d2;
  --accent: #a8461a;
  --accent-deep: #7e3413;
  --forest: #22463c;
  --radius: 4px;
  --measure: 40rem;
  --gap: 1.15rem;
  --step: 1.9rem;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.68;
  overflow-wrap: break-word;
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main { display: block; }

.page {
  padding: 2rem 0 3rem;
}

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

section { margin: 0 0 var(--step); }

/* ---------- Header and navigation ---------- */

.masthead {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  max-width: 62rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.brand .mark {
  display: inline-block;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 auto;
}

.brand strong { font-weight: 700; }
.brand span.light { font-weight: 400; color: var(--muted); }

.brand-tag {
  display: block;
  width: 100%;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 1rem 0.75rem;
  max-width: 62rem;
  margin: -0.35rem auto 0;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.95rem;
  background: var(--tint);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.mainnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mainnav a {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: 0.925rem;
  color: var(--body);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.mainnav a:hover { color: var(--accent-deep); border-bottom-color: var(--line); }
.mainnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.6rem;
  font-weight: 700;
}

h1 { font-size: 2.1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 2.2rem; }
h3 { font-size: 1.16rem; margin-top: 1.6rem; }
h4 { font-size: 1.02rem; margin-top: 1.2rem; font-family: var(--sans); }

h2::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 0.7rem;
}

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

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

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

ul, ol { max-width: var(--measure); padding-left: 1.2rem; }
li { margin-bottom: 0.45rem; }

dl { max-width: var(--measure); }
dt { font-weight: 600; color: var(--ink); margin-top: 0.9rem; }
dd { margin: 0.2rem 0 0; }

small { font-size: 0.875rem; }

.lede {
  font-size: 1.16rem;
  color: var(--ink);
  line-height: 1.6;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  padding: 2.4rem 0 2.2rem;
}

.hero h1 { font-size: 2.35rem; max-width: 24ch; }
.hero .lede { max-width: 46rem; }

/* ---------- Panels and boxes ---------- */

.disclosure {
  background: #fff5ea;
  border: 1px solid #e0b491;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.6rem 0;
  max-width: 46rem;
}

.disclosure h2, .disclosure h3 {
  margin-top: 0;
  font-size: 1.08rem;
  font-family: var(--sans);
}
.disclosure h2::before { display: none; }
.disclosure p:last-child { margin-bottom: 0; }

.callout, .watch, .method, .quick {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  margin: 1.5rem 0;
  max-width: 46rem;
  background: var(--panel);
}

.callout { background: var(--tint); }
.watch { border-left: 5px solid var(--forest); background: #f2f6f3; }
.method { background: var(--panel); border-style: dashed; }
.quick { background: var(--panel); border-left: 5px solid var(--accent); }

.callout h3, .watch h3, .method h3, .quick h3 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.callout p:last-child, .watch p:last-child,
.method p:last-child, .quick p:last-child,
.callout ul:last-child, .watch ul:last-child,
.method ul:last-child, .quick ul:last-child { margin-bottom: 0; }

/* ---------- Affiliate link and buttons ---------- */

.aff-note {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
  max-width: 44rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-deep);
}

.btn:hover { background: var(--accent-deep); color: #fff; }

.btn-quiet {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--forest);
}
.btn-quiet:hover { background: var(--forest); color: #fff; }

.aff-block { margin: 1.3rem 0 1.8rem; }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
  padding: 0;
  list-style: none;
  max-width: none;
}

.cards li { margin: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  height: 100%;
}

.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { font-size: 0.97rem; margin-bottom: 0.5rem; }
.card a { font-weight: 600; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.3rem 0; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.97rem;
  background: var(--panel);
}

caption {
  text-align: left;
  font-size: 0.92rem;
  color: var(--muted);
  padding-bottom: 0.5rem;
}

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

thead th { background: var(--tint-deep); color: var(--ink); }
tbody th { background: var(--tint); font-weight: 600; }

/* ---------- Checklist ---------- */

.checklist { list-style: none; padding-left: 0; }

.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--forest);
  border-radius: 2px;
}

/* ---------- Numbered procedure ---------- */

.steps { counter-reset: step; list-style: none; padding-left: 0; }

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.1rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  background: var(--forest);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---------- Accordion (native details) ---------- */

.qa {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 0.7rem;
  max-width: 46rem;
}

.qa > summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  list-style-position: inside;
}

.qa > summary:hover { color: var(--accent-deep); }
.qa[open] > summary { border-bottom: 1px solid var(--line-soft); }
.qa .qa-body { padding: 0.9rem 1rem 0.3rem; }

.qa-controls {
  margin: 0 0 1rem;
}

.qa-controls button {
  font: inherit;
  font-size: 0.92rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  color: var(--ink);
}

.qa-controls button:hover { background: var(--tint-deep); }

/* ---------- In-page contents ---------- */

.toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.5rem 0 2rem;
  max-width: 30rem;
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.toc h2::before { display: none; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.97rem; }

/* ---------- Related reading ---------- */

.related {
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
  margin-top: 2.4rem;
}

.related h2 { margin-top: 0; }

/* ---------- Illustration ---------- */

.figure {
  margin: 1.6rem 0;
  max-width: 46rem;
}

.figure svg { width: 100%; height: auto; display: block; }

.figure figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ---------- Footer ---------- */

.sitefoot {
  background: var(--forest);
  color: #e7efe9;
  margin-top: 3rem;
  padding: 2.2rem 0 2.6rem;
  font-size: 0.95rem;
}

.sitefoot a { color: #ffd9b8; }
.sitefoot a:hover { color: #fff; }

.sitefoot .publisher { margin-bottom: 1rem; max-width: 40rem; }
.sitefoot .publisher span { display: block; }
.sitefoot .publisher .name {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.sitefoot .footlinks { margin: 0 0 1rem; }
.sitefoot .footlinks a { margin-right: 0.35rem; }

.sitefoot .trademark, .sitefoot .reviewed {
  max-width: 44rem;
  font-size: 0.9rem;
  color: #cfdfd5;
}

.sitefoot :focus-visible { outline-color: #ffd9b8; }

/* ---------- Responsive ---------- */

@media (max-width: 46rem) {
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 1.85rem; }
  h2 { font-size: 1.3rem; }
  body { font-size: 1.02rem; }

  /* The collapsed menu only applies when scripting is available to reopen
     it; without JavaScript the navigation stays visible and usable. */
  .js .nav-toggle { display: inline-block; }

  .mainnav { flex-basis: 100%; }

  .js .mainnav { display: none; }

  .js .mainnav.is-open { display: block; }

  .mainnav ul { flex-direction: column; gap: 0; }

  .mainnav li { border-top: 1px solid var(--line-soft); margin: 0; }
  .mainnav a { padding: 0.6rem 0; display: block; }

  table { min-width: 28rem; }
}

@media print {
  .masthead, .nav-toggle { display: none; }
  body { background: #fff; }
}
