:root {
  --ink: #24323b;
  --muted: #5c6b73;
  --paper: #fffdf8;
  --panel: #f4efe4;
  --accent: #8a4f2b;
  --accent-dark: #66391f;
  --line: #d8cdbd;
  --max: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Garamond, Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.58;
}

a { color: var(--accent-dark); }
a:hover, a:focus { color: var(--accent); }
a:focus-visible { outline: 3px solid #e6b98d; outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: .7rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .97);
}

.header-inner, main, .footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  min-height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .04em;
}

.brand-text strong { display: block; font-size: 1.08rem; line-height: 1.1; }
.brand-text span { color: var(--muted); font-size: .78rem; }

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  display: inline-block;
  padding: .5rem .2rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }

main { padding: 3.2rem 0 4rem; }

.hero {
  padding: 2.5rem 0 2rem;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 .4rem;
  color: var(--accent-dark);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
}

h1, h2, h3 { line-height: 1.15; color: #1f2b31; }
h1 { margin: 0 0 1rem; font-size: clamp(2.25rem, 6vw, 4.4rem); font-weight: 600; letter-spacing: -.025em; }
h2 { margin-top: 2.6rem; font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { margin: 0 0 .55rem; font-size: 1.3rem; }
p { margin: .65rem 0 1rem; }
.lead { font-size: 1.3rem; color: #3d4b52; max-width: 760px; }

.button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.button {
  display: inline-block;
  padding: .72rem 1rem;
  border: 1px solid var(--accent-dark);
  border-radius: 4px;
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
}
.button.secondary { background: transparent; color: var(--accent-dark); }
.button:hover, .button:focus { background: var(--accent); color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1.25rem;
  background: #fff;
}
.card p { color: #4e5b61; }
.card-link { font-weight: 700; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.4rem 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: .2rem 0 1.35rem 3.2rem;
  border-left: 1px solid var(--line);
  margin-left: 1rem;
}
.steps li:last-child { border-left-color: transparent; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -1.05rem;
  top: 0;
  width: 2.05rem;
  height: 2.05rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-dark);
  color: white;
  font-weight: 700;
  font-size: .9rem;
}
.steps strong { display: block; font-size: 1.08rem; }
.overview-steps { max-width: 820px; }
.overview-steps li { padding-bottom: 1.7rem; }
.overview-steps .card-link { display: block; margin-top: .35rem; }

.note, .warning {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 5px solid var(--accent);
  background: var(--panel);
}
.warning { border-left-color: #9c6b16; background: #fff7dd; }

address {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  font-style: normal;
  width: fit-content;
}

.checklist { padding-left: 1.25rem; }
.checklist li { margin-bottom: .75rem; padding-left: .25rem; }

.domain-list {
  display: grid;
  gap: .7rem;
  margin: 1.2rem 0 1.5rem;
}
.domain-item {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 1.5fr;
  gap: .8rem 1.2rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.domain-item strong {
  overflow-wrap: anywhere;
  color: var(--accent-dark);
}
.domain-item span { color: #4e5b61; }

.small { color: var(--muted); font-size: .88rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #f7f2e9;
}
.footer-inner { padding: 1.7rem 0 2rem; }
.footer-inner p { margin: .25rem 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 1rem 0; }
  nav ul { gap: .1rem .7rem; }
  .grid { grid-template-columns: 1fr; }
  .domain-item { grid-template-columns: 1fr; }
  main { padding-top: 2rem; }
}

@media print {
  nav, .button-row, .site-footer, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main { width: 100%; padding: 0; }
  a { color: #000; text-decoration: none; }
  .card, .note, .warning, address { break-inside: avoid; }
}


/* v9: catalogue and two-purpose home page */
.objective-grid { margin-top: 2rem; }
.objective-card h2 { margin-top: .35rem; }
.objective-card .button { margin-top: .25rem; }
.book-card, .book-detail-layout { display:grid; grid-template-columns:minmax(190px,290px) minmax(0,1fr); gap:2rem; align-items:start; margin:1.5rem 0 2.5rem; }
.book-card { padding:1.4rem; border:1px solid var(--line); border-radius:8px; background:#fff; }
.book-cover-wrap { text-align:center; }
.book-cover { display:block; width:100%; max-width:290px; height:auto; margin-inline:auto; border-radius:3px; box-shadow:0 8px 24px rgba(36,50,59,.17); }
.detail-cover { max-width:330px; }
.book-details h1 { font-size:clamp(2.1rem,5vw,3.6rem); }
.book-details h2 { margin-top:.25rem; }
.book-author { margin-top:-.2rem; font-size:1.2rem; font-weight:700; color:var(--accent-dark); }
.book-meta { display:grid; gap:.55rem; margin:1.35rem 0; }
.book-meta div { display:grid; grid-template-columns:7rem 1fr; gap:.8rem; padding-bottom:.45rem; border-bottom:1px solid var(--line); }
.book-meta dt { font-weight:700; }
.book-meta dd { margin:0; }
.catalogue-future { max-width:760px; padding-top:.3rem; }
.back-link { font-weight:700; text-decoration:none; }
.site-version { margin-top:.55rem !important; font-weight:700; }
@media (max-width:700px) { .book-card,.book-detail-layout { grid-template-columns:1fr; } .book-cover { max-width:260px; } .book-meta div { grid-template-columns:6rem 1fr; } }
