/* Structured Solutions — TypeUI pragmatic design system.
   White surface, brand yellow #FFE202, near-black #141414, Gothic A1,
   0px corners, borderless/shadow-free components, 1px dividers. */

@font-face{font-family:"Gothic A1";src:url("/assets/gothic-a1-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Gothic A1";src:url("/assets/gothic-a1-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Gothic A1";src:url("/assets/gothic-a1-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{
  --surface:#ffffff;
  --heading:#141414;
  --body:#4b4b47;
  --body-subtle:#6e6e69;
  --brand:#ffe202;
  --brand-strong:#e5cb00;
  --brand-softer:#fffbdb;
  --brand-soft:#fff3a8;
  --brand-medium:#ffeb5c;
  --fg-brand:#8a7400;
  --fg-brand-strong:#5c4e00;
  --dark:#141414;
  --dark-strong:#2e2e2e;
  --neutral-medium:#f5f5f4;
  --neutral-tertiary:#e7e7e5;
  --divider:#e2e2df;
  --divider-medium:#dbdbd8;
  --divider-strong:#d3d3d0;
  --font:"Gothic A1","Helvetica Neue",Arial,sans-serif;
  --spring-snappy:linear(0,0.009,0.035 2.1%,0.141 4.4%,0.723 12.9%,0.938 16.7%,1.017 19.4%,1.067 22.5%,1.089 26%,1.079 30.3%,1.049 36%,1.024 42.6%,1.011 50.3%,1.004 59.2%,1.001 69.3%,1);
  --ease-snap:cubic-bezier(.22,1,.36,1);
}

*{box-sizing:border-box}
html{background:var(--surface);scroll-padding-top:1rem}
body{margin:0;min-width:320px;background:var(--surface);color:var(--body);font:400 16px/1.7 var(--font);overflow-wrap:break-word}
img{display:block;max-width:100%;height:auto}
a{color:var(--fg-brand);text-decoration:underline;text-underline-offset:.15em}
a:hover{text-decoration:none}
:focus-visible{outline:2px solid var(--dark);outline-offset:2px;box-shadow:0 0 0 5px var(--brand-medium)}
::selection{background:var(--brand);color:var(--dark)}

h1,h2,h3,h4,h5,h6{margin:0 0 .75em;color:var(--heading);font-weight:700;text-wrap:balance}
h1{font-size:2rem;line-height:1.1;letter-spacing:-.02em}
h2{font-size:1.75rem;line-height:1.15}
h3{font-size:1.5rem;line-height:1.2}
h4{font-size:1.375rem;line-height:1.25}
h5{font-size:1.25rem;line-height:1.5}
h6{font-size:1.125rem;line-height:1.25}
@media(min-width:768px){
  h1{font-size:2.5rem}
  h2{font-size:2.25rem}
  h3{font-size:1.875rem}
  h4{font-size:1.625rem}
  h5{font-size:1.375rem}
}
@media(min-width:1024px){
  h1{font-size:3.75rem;letter-spacing:-.8px}
  h2{font-size:2.75rem}
  h3{font-size:2.25rem}
  h4{font-size:1.875rem}
  h5{font-size:1.5rem}
  h6{font-size:1.25rem}
}
p,ul,ol,figure,table{margin-block:0 1.5em}

/* Skip link — first keyboard target */
.skip{position:fixed;z-index:20;top:.75rem;left:.75rem;transform:translateY(-220%);padding:.75rem 1rem;background:var(--dark);color:#fff;font-size:.875rem;font-weight:500;text-decoration:none}
.skip:focus{transform:none}

/* Masthead */
.mast{display:grid;grid-template-columns:minmax(250px,1fr) auto;align-items:center;gap:1rem 2rem;padding:1rem max(24px,calc((100% - 1152px)/2));background:var(--surface);border-bottom:1px solid var(--divider)}
.identity{display:flex;align-items:center;gap:.75rem;color:var(--heading);text-decoration:none}
.identity img{width:32px;height:44px;object-fit:contain}
.identity span{display:grid}
.identity strong{font-size:1.125rem;font-weight:700;line-height:1.3}
.identity small{font-size:.75rem;font-weight:400;color:var(--body-subtle)}
.mast nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem}
.mast nav a{display:inline-flex;align-items:center;min-height:44px;padding:.5rem 1rem;color:var(--body);font-size:.875rem;font-weight:500;text-decoration:none;border-bottom:2px solid transparent;transition:color .15s,border-color .15s}
.mast nav a:hover{color:var(--heading);border-color:var(--divider-strong)}
.mast nav a[aria-current]{color:var(--heading);border-color:var(--brand)}

/* Home hero — an asymmetric typographic poster in the existing TypeUI language */
.worktable{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,.45fr);align-items:end;gap:clamp(2rem,6vw,6rem);min-height:calc(100dvh - 77px);padding:clamp(3.5rem,8vh,7rem) max(24px,calc((100% - 1280px)/2));overflow:hidden;background:var(--brand)}
.worktable::before{content:"";position:absolute;z-index:-1;inset:0;background:radial-gradient(ellipse 55% 65% at 84% 35%,rgba(255,255,255,.46),transparent 72%);pointer-events:none}
.hero-copy{max-width:1000px}
.hero-copy h1{max-width:9ch;margin:0 0 clamp(1.5rem,3vw,2.5rem);color:var(--dark);font-size:clamp(3.75rem,9.1vw,8.25rem);font-weight:700;letter-spacing:-.065em;line-height:.82;text-wrap:balance}
.hero-copy h1 span{font-weight:400}
.folio{margin:0 0 1rem;font-size:.75rem;font-weight:500;letter-spacing:.4px;text-transform:uppercase}
.worktable .folio{color:var(--dark)}
.lede{max-width:52ch;font-size:clamp(1rem,1.35vw,1.25rem);line-height:1.6}
.worktable .lede{color:var(--dark);margin-bottom:0}
.hero-links{display:flex;flex-wrap:wrap;align-items:center;gap:1.5rem;margin-top:clamp(1.75rem,3vw,2.5rem)}
.button{display:inline-flex;align-items:center;min-height:48px;padding:.875rem 1.5rem;background:var(--brand);color:var(--dark);border:0;border-radius:0;font-size:1rem;font-weight:500;text-decoration:none;transition:background .15s,color .15s}
.button:hover{background:var(--brand-strong)}
.worktable .button{background:var(--dark);color:#fff;transition:transform .55s var(--spring-snappy),box-shadow .4s var(--ease-snap),background-color .3s var(--ease-snap)}
.worktable .button:hover{background:var(--dark-strong);transform:translateY(-2px);box-shadow:0 14px 36px rgba(20,20,20,.18)}
.worktable .button:active{transform:translateY(0) scale(.97);box-shadow:none;transition-duration:.1s}
.hero-note-link{position:relative;color:var(--dark);font-weight:500;text-decoration:none}
.hero-note-link::after{content:"";position:absolute;right:0;bottom:-.15em;left:0;height:1px;background:currentColor;transform:scaleX(1);transform-origin:left;transition:transform .45s var(--ease-snap)}
.hero-note-link:hover::after{transform:scaleX(.25);transform-origin:right}
.hero-sheet{align-self:center;width:min(100%,270px);margin-inline:auto;padding:clamp(1.25rem,3vw,2.25rem);background:var(--surface);box-shadow:18px 18px 0 rgba(20,20,20,.1);transform:rotate(2deg)}
.hero-sheet img{width:100%;max-height:340px;object-fit:contain}
.hero-enter{animation:hero-enter .62s var(--spring-snappy) both}
.hero-enter--folio{animation-delay:0ms}
.hero-enter--title{animation-delay:80ms}
.hero-enter--lede{animation-delay:160ms}
.hero-enter--links{animation-delay:240ms}
.hero-enter--sheet{animation-delay:120ms}
@keyframes hero-enter{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@supports(animation-timeline:scroll()){
  .hero-sheet img{animation:hero-sheet-scroll linear both;animation-timeline:scroll(root);animation-range:0 85vh}
  @keyframes hero-sheet-scroll{from{transform:translateY(0)}to{transform:translateY(20px)}}
}

/* Sections — one shared white surface, equal rhythm, 1px dividers */
.paper-section,.reference-strip{padding:6rem max(24px,calc((100% - 1152px)/2));background:var(--surface);border-top:1px solid var(--divider)}
.worktable{border-top:0}
.archive-head{padding:6rem max(24px,calc((100% - 1152px)/2)) 0;background:var(--surface)}
.pattern-mail{max-width:1152px;margin:auto;padding:6rem 24px}
.archive-head p:last-child{margin-bottom:0}
.archive-page .paper-section{padding-top:3rem}
.section-heading{margin-bottom:3rem}
.section-heading p{margin:0 0 .5rem;color:var(--fg-brand);font-size:.75rem;font-weight:500;letter-spacing:.4px;text-transform:uppercase}
.section-heading h2{margin:0}

/* Entry cards — flat, borderless, shadow-free */
.pattern-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem;margin:0;padding:0;list-style:none}
.pattern-card{min-width:0}
.pattern-card>a{display:grid;height:100%;grid-template-rows:210px 1fr;background:var(--surface);color:var(--body);text-decoration:none;transition:background .15s}
.pattern-card>a:hover{background:var(--neutral-medium)}
.pattern-card img{width:100%;height:210px;object-fit:cover}
.card-copy{display:grid;gap:.625rem;align-content:start;padding:1.25rem;border-top:1px solid var(--divider)}
.card-copy small{justify-self:start;width:fit-content;padding:.125rem .375rem;background:var(--brand);color:var(--dark);font-size:.75rem;font-weight:500;letter-spacing:.4px;text-transform:uppercase;line-height:1.5}
.card-copy strong{color:var(--heading);font-size:1.25rem;font-weight:500;line-height:1.3}
.card-copy span:last-child{font-size:.875rem;line-height:1.6}

/* Guide band — pale brand cards on the shared white surface */
.reference-strip{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:3rem}
.reference-strip h2{margin-bottom:1rem}
.guide-stack{display:grid;gap:1rem;align-content:start}
.guide-stack a{display:grid;gap:.5rem;padding:1.5rem;background:var(--brand-softer);color:var(--body);text-decoration:none;transition:background .15s}
.guide-stack a:hover{background:var(--brand-soft)}
.guide-stack small{color:var(--fg-brand-strong);font-size:.75rem;font-weight:500;letter-spacing:.4px;text-transform:uppercase}
.guide-stack strong{color:var(--heading);font-size:1.25rem;font-weight:500;line-height:1.3}
.guide-stack span{font-size:.875rem;line-height:1.6}

/* Numbered article directory */
.article-index{margin:0;padding:0;list-style:none;columns:2;column-gap:3rem;border-top:1px solid var(--divider)}
.article-index li{break-inside:avoid;border-bottom:1px solid var(--divider)}
.article-index a{display:grid;grid-template-columns:3rem 1fr;gap:1rem;padding:.75rem .5rem;color:var(--heading);text-decoration:none;transition:background .15s}
.article-index a:hover{background:var(--neutral-medium)}
.article-index span{color:var(--fg-brand);font-size:.875rem;font-weight:500;line-height:1.6}
.article-index strong{font-weight:500;line-height:1.5}

/* Article pages — centered 768px reading container */
.reading-sheet{max-width:768px;margin:0 auto;padding:0 24px;background:var(--surface)}
.reading-sheet>header{padding:6rem 0 3rem;border-bottom:1px solid var(--divider)}
.back{display:inline-flex;align-items:center;min-height:44px;margin-bottom:2rem;font-size:.875rem;font-weight:500}
.reading-sheet .folio{color:var(--fg-brand)}
.reading-sheet h1{margin-bottom:1.5rem}
.reading-sheet .lede{color:var(--body);margin-bottom:0}
.lead-image{width:100%;max-height:520px;margin-top:2rem;object-fit:cover}
.article-body{padding:4rem 0}
.article-body>*{max-width:680px;margin-inline:auto}
.article-body h2,.article-body h3,.article-body h4{margin-top:1.5em}
.article-body ul,.article-body ol{padding-left:1.5rem}
.article-body li+li{margin-top:.5rem}
.article-body img{width:auto;max-width:100%;max-height:680px;margin-block:2rem;object-fit:contain}
.article-body figure{margin-block:2rem}
.article-body figcaption{max-width:680px;margin-top:.5rem;color:var(--body-subtle);font-size:.875rem;line-height:1.6}
.article-body table{display:block;max-width:100%;margin-block:2rem;overflow-x:auto;border-collapse:collapse;font-size:.875rem}
.article-body th,.article-body td{padding:.75rem 1.5rem .75rem 0;border-bottom:1px solid var(--divider);text-align:left;vertical-align:top}
.article-body th{font-weight:500;color:var(--body)}
.article-body tr:last-child td{border-bottom:0}
.article-body code{padding:.125rem .375rem;background:var(--neutral-medium);font-family:inherit;font-size:.875em}
.article-body iframe,.article-body script,.article-body form{display:none}
.embed-exception{padding:1rem;background:var(--neutral-medium);border:1px solid var(--divider);font-size:.875rem}
.embed-exception a{color:var(--fg-brand-strong)}
.screen-reader-response{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Brand alert notes */
.next-note,.source-note{display:grid;gap:.5rem;max-width:720px;margin:0 auto 4rem;padding:1rem 1.25rem;background:var(--brand-softer);border:1px solid var(--brand-soft);color:var(--fg-brand-strong);font-size:.875rem;line-height:1.6}
.next-note strong,.source-note strong{font-size:1rem;font-weight:500;color:var(--heading)}
.next-note a,.source-note a{color:var(--fg-brand-strong);font-weight:500;text-decoration:underline}
.next-note a:hover,.source-note a:hover{text-decoration:none}
.source-note ul{margin:0;padding-left:1.5rem}
.source-note li+li{margin-top:.25rem}

/* Expansion guide steps */
.guide-steps{padding:3rem 0 4rem}
.guide-steps section{display:grid;grid-template-columns:3rem 1fr;gap:1rem;padding:2rem 0;border-bottom:1px solid var(--divider)}
.guide-steps>section>span{color:var(--fg-brand);font-size:.875rem;font-weight:500}
.guide-steps h2{margin-bottom:.5rem}
.guide-steps p{margin-bottom:.5rem}

/* Footer */
footer{display:grid;grid-template-columns:1fr auto;gap:2rem;padding:3rem max(24px,calc((100% - 1152px)/2));background:var(--surface);border-top:1px solid var(--divider)}
footer strong{color:var(--heading);font-size:1rem;font-weight:700}
footer p{max-width:55ch;margin:.5rem 0 0;color:var(--body-subtle);font-size:.875rem;line-height:1.6}
footer nav{display:grid;align-content:start;gap:.5rem}
footer nav a{color:var(--body);font-size:.875rem;font-weight:500;text-decoration:none}
footer nav a:hover{color:var(--heading);text-decoration:underline}

@media(max-width:1023px){
  .paper-section,.reference-strip{padding-block:3rem}
  .archive-head{padding-top:3rem}
  .reading-sheet>header{padding-top:3rem}
}
@media(max-width:860px){
  .mast{grid-template-columns:1fr}
  .mast nav{justify-content:flex-start}
  .worktable,.reference-strip{grid-template-columns:1fr;gap:2rem}
  .worktable{align-items:center;min-height:auto;padding-block:4rem}
  .hero-copy h1{max-width:10ch;font-size:clamp(3.25rem,12vw,6rem)}
  .hero-sheet{justify-self:end;width:210px;margin:0}
  .pattern-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  footer{grid-template-columns:1fr}
}
@media(max-width:767px){
  .paper-section,.reference-strip{padding-block:2rem}
  .article-body{padding:2.5rem 0}
  .article-index{columns:1}
}
@media(max-width:640px){
  .worktable{padding-block:3rem}
  .hero-copy h1{font-size:clamp(3rem,16vw,4.75rem);line-height:.86}
  .hero-links{align-items:flex-start;flex-direction:column}
  .hero-sheet{justify-self:end;width:155px;padding:1rem;box-shadow:10px 10px 0 rgba(20,20,20,.1)}
  .pattern-grid{grid-template-columns:1fr}
  .pattern-card>a{grid-template-rows:180px 1fr}
  .pattern-card img{height:180px}
  .guide-steps section{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important}
  .hero-enter{animation:hero-fade .2s linear both!important;animation-delay:0ms!important}
  .hero-sheet{transform:rotate(2deg)!important}
  .hero-sheet img{animation:none!important;transform:none!important}
  @keyframes hero-fade{from{opacity:0}to{opacity:1}}
}
