:root {
  color-scheme: light;
  --paper: #f4eee4;
  --ink: #201c17;
  --muted: #62584d;
  --coal: #171410;
  --brass: #e0b777;
  --bronze: #814b28;
  --rule: #cbb89f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", sans-serif;
  --sticky-height: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--sticky-height) + 24px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
img { display: block; width: 100%; height: auto; }
figure, dl, dd { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #a76736; outline-offset: 4px; }
.hero :focus-visible, .footer :focus-visible, .sticky-actions :focus-visible { outline-color: #f4d6a3; }
.site-width { width: min(100% - 104px, 1350px); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 5; top: 5px; left: 5px; color: var(--ink); background: var(--paper); padding: 8px 12px; }

.hero { position: relative; isolation: isolate; color: #fff8ec; background: var(--coal); }
.hero-image, .hero::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: 65% 48%; }
.hero::before { z-index: -1; content: ""; background: linear-gradient(90deg, #13100de8 0%, #13100da8 37%, #13100d32 65%, transparent 88%), linear-gradient(180deg, #13100d80 0%, transparent 28%, transparent 76%, #13100d20 100%); }
.topbar { color: #fff8ec; }
.nav-inner { min-height: 84px; border-bottom: 1px solid #fff8ec65; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-block; flex: 0 0 auto; padding-block: 3px; }
.brand img { width: 74px; }
.topbar nav, .footer nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 46px); font-size: 0.94rem; font-weight: 550; }
.topbar nav a, .footer nav a, .breadcrumb a { text-decoration: none; }
.topbar nav a:hover, .footer nav a:hover, .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-inner { padding-block: clamp(54px, 6.9vw, 106px) clamp(77px, 8.6vw, 125px); }
.breadcrumb { margin: 0 0 22px; font-size: 0.88rem; font-weight: 550; }
.hero h1, .collection h1 { margin: 0; max-width: 720px; font: bold clamp(3rem, 6.5vw, 6.15rem)/0.99 var(--serif); letter-spacing: -0.056em; text-wrap: balance; }
.hero h1 span { display: block; max-width: 630px; margin-top: 17px; color: #faefe0; font: normal clamp(1.48rem, 3.2vw, 2.95rem)/1.08 var(--serif); letter-spacing: -0.036em; text-wrap: initial; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { margin-top: 38px; }
.action { display: inline-flex; min-height: 46px; justify-content: center; align-items: center; padding: 10px 17px; border: 1px solid var(--brass); border-radius: 2px; background: var(--brass); color: #20170d; text-decoration: none; text-align: center; font: 680 0.875rem/1.25 var(--sans); transition: background .16s ease, color .16s ease; }
.action:hover { background: #efd09d; color: #20170d; }
.action-outline { color: #f4d39d; background: #1a1610a3; }
.action-outline:hover { background: #3a2b1d; color: #fff6e4; }
.article .action-outline, .collection-content .action-outline { border-color: #93633b; color: #6a3c21; background: transparent; }
.article .action-outline:hover, .collection-content .action-outline:hover { background: #ebdcc7; color: #422b1b; }
.sticky-actions { position: sticky; top: 0; z-index: 3; height: 0; overflow: visible; }
.sticky-actions-inner { width: 100%; height: var(--sticky-height); padding-inline: max(22px, calc((100vw - 1350px) / 2)); background: #1d1813; border-bottom: 1px solid #ac7948; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.sticky-actions-inner .action { min-height: 40px; padding-block: 6px; }
.sticky-toc { display: none; }

.reading-layout { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 970px); gap: clamp(36px, 5vw, 78px); padding-block: 62px 87px; align-items: start; }
.toc { position: sticky; top: calc(var(--sticky-height) + 24px); font-size: 0.9rem; }
.toc summary { cursor: default; list-style: none; font-size: 1.08rem; font-weight: 750; padding-block: 0 13px; border-bottom: 1px solid var(--rule); margin-bottom: 13px; }
.toc summary::-webkit-details-marker { display: none; }
.toc nav { display: grid; border-left: 1px solid var(--rule); max-height: calc(100dvh - 160px); overflow: auto; }
.toc nav a { color: #40362a; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; line-height: 1.35; }
.toc nav a:hover, .toc nav a[aria-current] { color: #6b3818; border-color: #ad6e3e; background: #e8dbca; }
.article { min-width: 0; }
.article p, .article ol, .article ul { margin: 0 0 1rem; }
.article-intro { font-size: clamp(1.04rem, 1.43vw, 1.22rem); line-height: 1.59; }
.article-section { margin-top: 3.5rem; padding-top: 1.65rem; border-top: 1px solid var(--rule); min-width: 0; }
.article h2 { font: bold clamp(1.76rem, 3.07vw, 2.88rem)/1.085 var(--serif); letter-spacing: -.036em; margin: 0 0 1.05rem; text-wrap: pretty; }
.article h3 { font: bold clamp(1.13rem, 1.67vw, 1.4rem)/1.37 var(--serif); margin: 1.65rem 0 0.45rem; }
.article h2 code, .article h3 code { font-family: inherit; }
.article :is(p, h3, th, li) a, .collection-content p a { color: #784222; text-decoration-color: #aa784e; text-underline-offset: 3px; }
.article :is(p, h3, th, li) a:hover, .collection-content p a:hover { color: #482511; }
.article :is(ol, ul) { padding-left: 1.45rem; }
.article li + li { margin-top: 0.48rem; }
code { font-size: .91em; overflow-wrap: anywhere; }
.section-photo { margin: 0 0 1.3rem; }
.section-photo img { aspect-ratio: 2; object-fit: cover; background: #cec0ae; }
.section-photo figcaption { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.data-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--rule); background: #eee3d2; padding: 0; margin: 0 0 1.3rem; }
.data-strip div { display: flex; flex-direction: column-reverse; justify-content: start; gap: 7px; padding: 16px 20px; }
.data-strip div + div { border-left: 1px solid var(--rule); }
.data-strip dd { font: bold clamp(1.48rem, 3.1vw, 2.45rem)/1 var(--serif); color: #764222; letter-spacing: -.04em; }
.data-strip dt { font-size: .91rem; color: #47382a; line-height: 1.3; }

.table-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-top: 1.35rem; padding: 12px 15px; background: #e7d9c6; border: 1px solid var(--rule); border-bottom: 0; }
.table-tools strong { font-size: .94rem; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filters button { min-height: 39px; padding: 5px 9px; border: 1px solid #ad9275; border-radius: 2px; background: #f8f2e8; color: var(--ink); font-size: .875rem; }
.filters button[aria-pressed="true"] { background: #382b20; border-color: #382b20; color: #fff6e8; }
.scroll-hint { font-size: .875rem; color: var(--muted); margin: 0 !important; padding: 6px 15px; border: 1px solid var(--rule); border-bottom: 0; }
.material-scroll { overflow: auto; max-height: 39rem; border: 1px solid var(--rule); background: #fbf6ed; overscroll-behavior-x: contain; }
.material-scroll table { min-width: 780px; width: 100%; border-spacing: 0; text-align: left; font-size: .91rem; line-height: 1.46; }
.material-scroll :is(th, td) { padding: 12px; vertical-align: top; border-bottom: 1px solid #d9c8b3; }
.material-scroll thead th { position: sticky; top: 0; z-index: 1; background: #35291f; color: #fff5e5; border-bottom: 0; }
.material-scroll tbody th { width: 19%; background: #eee3d2; }
.material-scroll tbody tr:nth-child(even) td { background: #f3e9dc; }
.material-scroll th:nth-child(2) { width: 16%; }
.material-scroll th:nth-child(3) { width: 23%; }
.material-scroll th:nth-child(4) { width: 17%; }
.equation { border: 1px solid var(--rule); background: #eee3d2; font-size: 1.33rem; padding: 18px; margin: 1.25rem 0; }

.pathways { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1.5rem; }
.pathway { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(14px, 2.4vw, 26px); border: 1px solid var(--rule); border-top: 3px solid #9c683f; background: #f9f2e9; }
.pathway-name { font: bold 1.4rem/1.2 var(--serif); }
.pathway .action { margin-top: auto; }
.article-section:is(#manufacturing, #measurements) ol { list-style: none; padding: 0; counter-reset: steps; }
.article-section:is(#manufacturing, #measurements) ol li { position: relative; margin: 0; padding: 14px 0 14px 42px; border-bottom: 1px solid #d8c9b6; counter-increment: steps; }
.article-section:is(#manufacturing, #measurements) li::before { content: counter(steps); position: absolute; left: 0; top: 16px; display: grid; place-items: center; border: 1px solid #ba9570; color: #764222; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; font-weight: 700; }
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { position: relative; list-style: none; padding: 14px 34px 14px 0; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; content: "+"; font: 1.6rem/1 var(--sans); color: var(--bronze); right: 4px; top: 50%; transform: translateY(-50%); }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { margin: 0; font-family: var(--sans); font-size: 1rem; }
.faq-item summary h3 span { color: #865330; }
.faq-answer { padding-right: 1.3rem; }
#start-designing { background: #e9dac5; padding: clamp(20px, 3.3vw, 40px); border: 0; }

.footer { background: var(--coal); color: #fff4e7; padding: 22px 0; }
.footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-inner p { margin: 0 auto 0 0; font-size: .9rem; }
.collection .topbar, .collection-banner { background: #211a14; color: #fff4e7; }
.collection-banner { padding: 54px 0 58px; }
.collection h1 { max-width: none; font-size: clamp(2.8rem, 6vw, 5.1rem); }
.collection-content { width: min(100% - 42px, 810px); margin: 44px auto 58px; }

dialog { position: fixed; width: min(570px, 100% - 30px); max-height: calc(100% - 30px); border: 1px solid #9e764f; border-radius: 3px; padding: 0; background: var(--paper); color: var(--ink); overflow: auto; }
dialog::backdrop { background: #16110cba; }
.dialog-inner { padding: clamp(20px, 5vw, 34px); }
.dialog-close { position: absolute; right: 13px; top: 10px; }
.dialog-close button { min-width: 36px; min-height: 36px; background: transparent; color: var(--ink); border: 0; font-size: 1.6rem; }
.dialog-title { padding-right: 23px; margin: 0 0 8px; font: bold 1.72rem/1.12 var(--serif); }
#inquiry-intro { margin: 0 0 15px; font-size: .96rem; color: var(--muted); }
.inquiry-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.inquiry-form label { display: block; font-size: .9rem; font-weight: 620; }
.inquiry-form label span { color: var(--bronze); }
.inquiry-form :is(input, textarea):not([type="hidden"]) { width: 100%; margin-top: 3px; padding: 7px 9px; background: #fbf7ef; color: var(--ink); border: 1px solid #ac9378; border-radius: 2px; font-size: 1rem; }
.inquiry-form textarea { resize: vertical; }
.form-wide { grid-column: 1 / -1; }
.form-note { margin: 0; color: var(--muted); font-size: .85rem; }

@media (max-width: 960px) {
  .site-width { width: calc(100% - 64px); }
  .reading-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; }
  .sticky-actions-inner { width: 100%; }
  .hero h1 { max-width: 600px; }
}

@media (max-width: 680px) {
  :root { --sticky-height: 72px; }
  .site-width { width: calc(100% - 36px); }
  .brand img { width: 54px; }
  .nav-inner { min-height: 64px; gap: 10px; }
  .topbar nav, .footer nav { gap: 13px; font-size: .84rem; }
  .hero-image { object-position: 69% 50%; }
  .hero::before { background: linear-gradient(90deg, #16110ce0 0%, #16110c65 100%), linear-gradient(0deg, #16110ccc, transparent 65%); }
  .hero-inner { padding-block: 68px 58px; }
  .hero h1 { font-size: clamp(2.9rem, 11.2vw, 4.7rem); text-wrap: initial; }
  .hero h1 span { max-width: 430px; }
  .hero .actions { display: grid; margin-top: 26px; }
  .hero .actions > a { min-height: 46px; }
  .sticky-actions-inner { width: 100%; justify-content: space-between; padding-inline: 10px; gap: 7px; }
  .sticky-actions-inner .action { flex: 1; min-height: 48px; font-size: .79rem; padding-inline: 6px; }
  .sticky-toc { display: block; color: #f4d39d; }
  .sticky-toc summary { display: grid; list-style: none; place-items: center; width: 39px; min-height: 48px; border: 1px solid #a47d50; border-radius: 2px; cursor: pointer; }
  .sticky-toc summary::-webkit-details-marker { display: none; }
  .sticky-toc nav { position: absolute; top: var(--sticky-height); right: 10px; display: grid; grid-template-columns: 1fr 1fr; background: #f9f0e2; color: var(--ink); border: 1px solid #af895d; width: min(330px, calc(100% - 20px)); padding: 8px; box-shadow: 0 10px 24px #17141044; }
  .sticky-toc nav a { padding: 8px 6px; text-decoration: none; font-size: .875rem; }
  .sticky-toc nav a[aria-current] { color: #6b3818; background: #ecddc8; }
  .reading-layout { display: block; padding-block: 26px 48px; }
  .toc { position: static; margin-bottom: 20px; border: 1px solid var(--rule); }
  .toc summary { cursor: pointer; position: relative; margin: 0; padding: 9px 12px; border-bottom: 0; }
  .toc summary::after { position: absolute; content: "+"; right: 12px; top: 7px; color: var(--bronze); }
  .toc details[open] summary::after { content: "−"; }
  .toc nav { border-left: 0; border-top: 1px solid var(--rule); max-height: none; grid-template-columns: 1fr 1fr; padding: 5px 0; }
  .toc nav a { padding-block: 8px; }
  .article-section { margin-top: 2.5rem; padding-top: 1.15rem; }
  .data-strip div { padding: 13px 9px; }
  .data-strip dt { font-size: .79rem; }
  .pathways { grid-template-columns: 1fr; }
  .footer-inner { gap: 9px 13px; }
  .footer-inner nav { flex-basis: 100%; }
}

@media (max-width: 400px) {
  .inquiry-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
