:root {
  --hj-paper: #f5efe6;
  --hj-card: #fbf8f2;
  --hj-ink: #201c18;
  --hj-muted: #6d6259;
  --hj-rule: #d9ccba;
  --hj-accent: #a4482c;
  --hj-accent-ink: #ffffff;
  --hj-sage: #55654c;
  --hj-soft: #ece3d5;
  --hj-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --hj-sans: "Avenir Next", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  --hj-radius: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hj-paper: #16130f;
    --hj-card: #1e1914;
    --hj-ink: #efe7dc;
    --hj-muted: #a99d8f;
    --hj-rule: #3b3129;
    --hj-accent: #e38b66;
    --hj-accent-ink: #16130f;
    --hj-sage: #a3b796;
    --hj-soft: #26201a;
  }
}
:root[data-theme="dark"] {
  --hj-paper: #16130f;
  --hj-card: #1e1914;
  --hj-ink: #efe7dc;
  --hj-muted: #a99d8f;
  --hj-rule: #3b3129;
  --hj-accent: #e38b66;
  --hj-accent-ink: #16130f;
  --hj-sage: #a3b796;
  --hj-soft: #26201a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hj-paper);
  color: var(--hj-ink);
  font: 400 17px/1.72 var(--hj-sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hj-ink); text-decoration-color: var(--hj-accent); text-underline-offset: 3px; }
a:hover { color: var(--hj-accent); }
:focus-visible { outline: 2px solid var(--hj-accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--hj-serif); font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); margin-top: 2.2em; padding-top: .6em; border-top: 1px solid var(--hj-rule); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); margin-top: 1.6em; }
p { margin: 0 0 1.1em; }
.hj-wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.hj-skip { position: absolute; left: -9999px; }
.hj-skip:focus { left: 16px; top: 8px; background: var(--hj-card); padding: 8px 12px; z-index: 9; }

/* masthead */
.hj-mast { border-top: 3px double var(--hj-ink); border-bottom: 1px solid var(--hj-rule); padding: 22px 0 0; text-align: center; }
.hj-logo { font-family: var(--hj-serif); font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 600; text-decoration: none; letter-spacing: -0.02em; line-height: 1; color: var(--hj-ink); display: inline-block; }
.hj-logo em { font-style: italic; color: var(--hj-accent); font-weight: 500; }
.hj-tag { margin: 8px 0 14px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--hj-muted); }
.hj-nav { display: flex; justify-content: center; gap: 4px 22px; flex-wrap: wrap; border-top: 1px solid var(--hj-rule); padding: 12px 0; }
.hj-nav a { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 4px 0; }
.hj-nav a[aria-current="page"] { color: var(--hj-accent); }

/* type helpers */
.hj-kicker { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hj-accent); font-weight: 700; margin: 0 0 10px; }
.hj-small, .hj-byline, figcaption { font-size: .86rem; color: var(--hj-muted); }
.hj-crumbs { font-size: .84rem; color: var(--hj-muted); margin: 26px auto 0; max-width: 760px; }
.hj-crumbs a { color: var(--hj-muted); }

/* article */
.hj-head { max-width: 760px; margin: 22px auto 0; }
.hj-lead { font-family: var(--hj-serif); font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.55; color: var(--hj-ink); margin: 18px 0 14px; }
.hj-cover { margin: 26px 0 8px; }
.hj-cover img { width: 100%; border-radius: var(--hj-radius); aspect-ratio: 3 / 2; object-fit: cover; }
.hj-layout { display: block; max-width: 760px; margin: 0 auto; }
.hj-toc { border: 1px solid var(--hj-rule); background: var(--hj-card); padding: 14px 18px; margin: 22px 0 28px; border-radius: var(--hj-radius); }
.hj-toc p { margin: 0 0 6px; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hj-muted); }
.hj-toc ol { margin: 0; padding-left: 1.2em; }
.hj-toc li { margin: 4px 0; font-size: .95rem; }
.hj-body { min-width: 0; }
.hj-body img, .hj-body figure { margin: 1.6em 0; }
.hj-body figure img { border-radius: var(--hj-radius); width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hj-body figure.hj-wide img { aspect-ratio: 3 / 2; }
.hj-body ul, .hj-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.hj-body li { margin-bottom: .4em; }
.hj-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--hj-accent); font-family: var(--hj-serif); font-size: 1.15rem; font-style: italic; }
.hj-body .hj-answer { background: var(--hj-soft); padding: 16px 20px; border-radius: var(--hj-radius); }
.hj-body a { font-weight: 500; }
.hj-table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--hj-rule); border-radius: var(--hj-radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--hj-card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hj-rule); vertical-align: top; }
th { font-family: var(--hj-serif); font-size: 1rem; }
.hj-sources { font-size: .9rem; color: var(--hj-muted); border-top: 1px solid var(--hj-rule); padding-top: 14px; }
.hj-faq details { border-bottom: 1px solid var(--hj-rule); padding: 14px 0; }
.hj-faq summary { cursor: pointer; font-family: var(--hj-serif); font-size: 1.15rem; font-weight: 600; list-style: none; }
.hj-faq summary::-webkit-details-marker { display: none; }
.hj-faq summary::after { content: "+"; float: right; color: var(--hj-accent); font-size: 1.3rem; line-height: 1; }
.hj-faq details[open] summary::after { content: "–"; }
.hj-faq details p { margin: 10px 0 0; }

/* interactive modules */
.hj-mod { background: var(--hj-card); border: 1px solid var(--hj-rule); border-left: 4px solid var(--hj-accent); border-radius: var(--hj-radius); padding: 20px; margin: 2em 0; }
.hj-mod h3 { margin-top: 0; }
.hj-mod .hj-q { margin: 16px 0 8px; font-weight: 600; font-size: .95rem; }
.hj-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.hj-opt { font: inherit; font-size: .92rem; color: var(--hj-ink); background: transparent; border: 1px solid var(--hj-ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; min-height: 40px; }
.hj-opt[aria-pressed="true"] { background: var(--hj-ink); color: var(--hj-paper); }
.hj-check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; font-size: .97rem; }
.hj-check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--hj-accent); flex: none; }
.hj-result { margin-top: 18px; padding: 14px 16px; background: var(--hj-paper); border-radius: var(--hj-radius); min-height: 3em; }
.hj-result strong { font-family: var(--hj-serif); font-size: 1.1rem; }
.hj-meter { height: 8px; background: var(--hj-soft); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.hj-meter span { display: block; height: 100%; background: var(--hj-sage); width: 0; transition: width .3s ease; }
.hj-field { display: grid; gap: 4px; margin: 10px 0; }
.hj-field label { font-size: .9rem; color: var(--hj-muted); }
.hj-field input, .hj-field select { font: inherit; padding: 10px 12px; border: 1px solid var(--hj-rule); background: var(--hj-paper); color: var(--hj-ink); border-radius: var(--hj-radius); min-height: 44px; max-width: 320px; }
.hj-btn { font: inherit; font-weight: 600; background: var(--hj-accent); color: var(--hj-accent-ink); border: 0; border-radius: var(--hj-radius); padding: 11px 18px; cursor: pointer; min-height: 44px; margin-top: 8px; }
.hj-cards-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hj-tabpanel[hidden] { display: none; }
.hj-flash { min-height: 150px; display: grid; align-content: center; gap: 10px; }
.hj-flash .hj-term { font-family: var(--hj-serif); font-size: 1.45rem; }

/* related + listing */
.hj-related { margin: 56px 0 24px; padding-top: 10px; border-top: 3px double var(--hj-ink); }
.hj-cards { display: grid; gap: 22px; grid-template-columns: 1fr; }
.hj-card { text-decoration: none; display: block; }
.hj-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--hj-radius); margin-bottom: 12px; }
.hj-card h3 { margin: 4px 0 6px; font-size: 1.22rem; }
.hj-card p { color: var(--hj-muted); font-size: .95rem; margin: 0; }
.hj-card:hover h3 { color: var(--hj-accent); }
.hj-hero { display: grid; gap: 24px; align-items: center; padding: 34px 0 10px; }
.hj-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--hj-radius); }
.hj-hero h2 { border: 0; padding: 0; margin-top: 0; font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.hj-hero p { color: var(--hj-muted); font-size: 1.05rem; }
.hj-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 3px double var(--hj-ink); padding-top: 12px; margin: 44px 0 20px; }
.hj-section-title h2 { margin: 0; border: 0; padding: 0; font-size: 1.6rem; }
.hj-page { max-width: 760px; margin: 0 auto; padding: 30px 0 10px; }
.hj-page h1 { margin-bottom: .3em; }
.hj-page h2 { margin-top: 1.8em; }
.hj-sitemap ul { columns: 1; padding-left: 18px; }
.hj-foot { margin-top: 64px; border-top: 3px double var(--hj-ink); padding: 26px 0 40px; text-align: center; font-size: .92rem; color: var(--hj-muted); }
.hj-foot .hj-logo { font-size: 1.8rem; }
.hj-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0; }
.hj-foot nav a { color: var(--hj-muted); }

@media (min-width: 720px) {
  .hj-cards { grid-template-columns: 1fr 1fr; }
  .hj-hero { grid-template-columns: 1.1fr 1fr; }
}
@media (min-width: 1040px) {
  .hj-cards { grid-template-columns: 1fr 1fr 1fr; }
  .hj-layout { display: grid; grid-template-columns: 220px minmax(0, 680px); gap: 56px; max-width: 980px; justify-content: center; }
  .hj-layout .hj-toc { position: sticky; top: 24px; align-self: start; margin: 40px 0 0; }
  .hj-head, .hj-cover, .hj-crumbs { max-width: 980px; margin-left: auto; margin-right: auto; }
  .hj-cover { max-width: 980px; }
  .hj-related { max-width: 980px; margin-left: auto; margin-right: auto; }
  .hj-body .hj-answer { margin-top: 0; }
}
@media (max-width: 719px) {
  .hj-nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; }
  .hj-nav a { white-space: nowrap; }
  .hj-body table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .hj-mast, .hj-foot, .hj-toc, .hj-related { display: none; }
}
