:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --panel: #fffdf7;
  --ink: #20291f;
  --muted: #51564b;
  --green: #263c2e;
  --mint: #e7ebde;
  --line: #d8d6c6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
main { min-height: 55vh; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .21em; }
button, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #87552e; outline-offset: 3px; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.08; text-wrap: balance; overflow-wrap: anywhere; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.shell { width: min(1216px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; top: 1rem; left: 1rem; transform: translateY(-160%); z-index: 20; background: white; padding: .7rem 1rem; }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: baseline; gap: .37em; font: 700 1.34rem/1 var(--serif); letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.wordmark span { font-size: .74em; letter-spacing: -.025em; font-weight: 400; }
.navigation, .header-end, .languages { display: flex; align-items: center; }
.navigation { gap: clamp(.85rem, 2.2vw, 1.9rem); }
.navigation a, .site-footer nav a { font-size: .91rem; color: var(--muted); text-decoration: none; }
.navigation a:hover, .navigation a[aria-current], .site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.header-end { gap: .85rem; }
.languages { border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.languages a { display: grid; place-items: center; min-width: 37px; min-height: 37px; border-radius: 99px; font-weight: 700; font-size: .82rem; text-decoration: none; }
.languages a[aria-current] { background: var(--mint); }

.button { display: inline-flex; justify-content: center; align-items: center; text-align: center; min-height: 49px; padding: .66rem 1.05rem; border: 1px solid transparent; border-radius: 7px; font-weight: 650; text-decoration: none; cursor: pointer; }
.compact { min-height: 44px; font-size: .89rem; }
.dark { color: #fffdf5; background: var(--green); }
.dark:hover { background: #3b5241; }
.outline { border-color: #777f6b; color: var(--green); background: transparent; }
.outline:hover { background: var(--mint); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.hero { display: grid; grid-template-columns: 1fr 1.02fr; align-items: center; gap: clamp(2rem, 5.5vw, 5.2rem); padding-block: 3.25rem 3rem; }
.hero h1 { font-size: clamp(3.7rem, 7vw, 7rem); line-height: .89; letter-spacing: -.082em; color: var(--green); }
.hero-line { margin-top: 1.4rem; color: #725238; font: italic clamp(1.25rem, 2.5vw, 2.05rem)/1.2 var(--serif); }
.hero-intro { margin-block: .96rem 1.35rem; max-width: 31rem; color: var(--muted); }
.hero-picture { border-radius: 16px; background: #e3d6bf; overflow: hidden; }
.hero-picture img { width: 100%; aspect-ratio: 1.27; object-fit: cover; }

.section { border-top: 1px solid var(--line); padding-block: 2.25rem 3rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.3rem; }
.section-heading p, .interior-heading p { color: var(--muted); margin-top: .5rem; max-width: 43rem; }
.category-section { scroll-margin-top: 1rem; }
.category-picker label { display: block; font-size: .88rem; margin-bottom: .25rem; font-weight: 650; }
.picker-controls { display: flex; align-items: stretch; gap: .5rem; }
.category-picker select {
  color: var(--ink); appearance: none; min-width: 155px; min-height: 44px; border-radius: 7px; border: 1px solid #777f6b;
  padding: .43rem 2rem .43rem .66rem; background-color: var(--panel);
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.category-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
.category-grid a { background: var(--mint); min-height: 51px; padding: .55rem .6rem; height: 100%; display: grid; place-items: center; border: 1px solid #d4dacb; border-radius: 7px; text-align: center; text-decoration: none; font-size: .91rem; font-weight: 650; line-height: 1.23; overflow-wrap: anywhere; }
.category-grid a:hover { background: #d8e0d0; }
.category-grid-full { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.category-grid-full a { place-items: start; text-align: left; padding: 1.1rem; align-content: start; gap: .45rem; }
.category-grid-full small { font-weight: 400; font-size: .9rem; color: var(--muted); line-height: 1.4; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.article-card { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; }
.article-card a { display: block; height: 100%; text-decoration: none; border-radius: inherit; }
.article-card a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.article-card img { width: 100%; aspect-ratio: 1.63; object-fit: cover; border-radius: 10px 10px 0 0; background: #e9e1d4; }
.article-card-copy { padding: 1.05rem 1.12rem 1.3rem; }
.kicker { display: inline-block; color: #6e4b36; font-size: .83rem; font-weight: 700; letter-spacing: .025em; }
.article-card h3 { font: 400 clamp(1.27rem, 2.1vw, 1.7rem)/1.15 var(--serif); margin-block: .45rem .38rem; text-wrap: pretty; }
.article-card p { color: var(--muted); font-size: .93rem; }
.topic-grid, .guide-list { display: grid; gap: .72rem; }
.topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-grid a, .guide-list a { height: 100%; display: block; text-decoration: none; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 1.05rem 1.15rem; }
.topic-grid a:hover, .guide-list a:hover { border-color: #8c987f; background: var(--mint); }
.topic-grid strong, .guide-list span { display: block; font: 400 1.38rem/1.2 var(--serif); }
.topic-grid span, .guide-list small { display: block; margin-top: .36rem; color: var(--muted); font-size: .93rem; }

.interior, .detail-shell { padding-block: 1.35rem 4rem; }
.breadcrumbs { margin-bottom: 2rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .2rem .48rem; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li { color: var(--muted); font-size: .86rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .48rem; color: #795a41; }
.interior-heading { margin-bottom: 2rem; }
.interior-heading h1 { font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: .55rem; }
.interior-heading p { font-size: 1.13rem; }
.interior-heading .kicker { margin-bottom: .65rem; }
.interior-heading .category-picker { margin-top: 1rem; width: fit-content; }
.list-section { margin-bottom: 2.6rem; }
.list-section h2 { margin-bottom: 1rem; }
.detail-shell { max-width: 790px; }
.detail .interior-heading h1 { font-size: clamp(2.5rem, 5.6vw, 4.7rem); }
.detail-image { width: 100%; aspect-ratio: 1.62; object-fit: cover; border-radius: 11px; background: #e9e1d4; }
.prose { margin-block: 2rem; }
.prose section + section { margin-top: 1.55rem; }
.prose h2, .worksheet h2, .related h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); margin-bottom: .55rem; }
.prose p { color: #323b30; font-size: 1.06rem; white-space: pre-line; }
.worksheet { margin-block: 2.25rem; padding: clamp(1rem, 4vw, 2rem); background: var(--mint); border: 1px solid var(--line); border-radius: 11px; }
.worksheet-example { margin-block: 1rem; padding: .9rem; background: var(--panel); border-radius: 7px; border: 1px solid var(--line); }
.worksheet-example h3 { font-size: 1rem; margin-bottom: .35rem; }
.worksheet-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.worksheet-fields label { display: block; font-size: .95rem; font-weight: 650; margin-bottom: .2rem; }
.worksheet-fields textarea { display: block; width: 100%; resize: vertical; padding: .55rem; border: 1px solid #777f6b; border-radius: 5px; background: var(--panel); color: var(--ink); }
.worksheet-fields .actions, .worksheet-status { grid-column: 1 / -1; }
.worksheet-status:empty { display: none; }
.related { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.related li + li { margin-top: .36rem; }
.related .button { margin-top: 1.05rem; }

.site-footer { background: var(--mint); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; padding-block: 1.6rem; }
.footer-inner p { margin-top: .5rem; color: var(--muted); font-size: .91rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.05rem; align-content: center; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 52px); }
  .header-shop { display: none; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; gap: .3rem 1rem; padding-block: .5rem; }
  .header-end { margin-left: auto; }
  .navigation { order: 3; justify-content: space-between; width: 100%; gap: .35rem; }
  .navigation a { padding-block: .5rem; }
  .hero { grid-template-columns: 1fr; gap: 1.3rem; padding-block: 2rem; }
  .hero h1 { font-size: clamp(3.25rem, 11.8vw, 5.4rem); }
  .hero-picture img { aspect-ratio: 1.5; }
  .section { padding-block: 1.55rem 2rem; }
  .section-heading, .footer-inner { align-items: start; flex-direction: column; }
  .article-grid, .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-grid { grid-template-columns: 1fr; }
  .article-card-copy { padding: .85rem; }
}

@media (max-width: 430px) {
  .guide-list, .worksheet-fields { grid-template-columns: 1fr; }
  .category-picker, .category-picker select { width: 100%; min-width: 0; }
  .picker-controls button { flex: 0 0 auto; }
  .article-card-copy { padding: .67rem; }
  .article-card h3 { font-size: 1.22rem; }
  .article-card p { font-size: .88rem; }
}
