/* Brand site styles. Colors come from /tokens/tokens.css. */
:root {
  --ink: var(--trpl-dark-gray);
  --paper: var(--trpl-white);
  --rule: #D9DEE5;
  --soft: #F3F5F8;
  --link: var(--trpl-night-sky);
  --measure: 72ch;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--trpl-font-body); font-size: 18px; line-height: 1.6;
  hyphens: none; -webkit-hyphens: none;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--soft); padding: .1em .3em; border-radius: 3px; }
pre { background: var(--soft); padding: 1rem; overflow-x: auto; border-radius: 4px; }
pre code { background: none; padding: 0; }
.skip { position: absolute; left: -999px; } .skip:focus { left: var(--gutter); top: 8px; background: #fff; padding: 8px; z-index: 10; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 24px; border-bottom: 1px solid var(--rule); background: #fff; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 200px; height: auto; display: block; }
.brand-label { font-family: var(--trpl-font-display); text-transform: uppercase; font-size: 1.6rem; line-height: 1; letter-spacing: .02em; padding-left: 14px; border-left: 1px solid var(--ink); }
.top-links { display: flex; gap: 1.2rem; align-items: center; font-family: var(--trpl-font-caption); font-size: .95rem; }
.top-links a { text-decoration: none; color: var(--ink); }
.top-links a.cta, .button { background: var(--trpl-deep-orange); color: var(--trpl-dark-gray); padding: .5em 1em; border-radius: 3px; font-family: var(--trpl-font-display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.15rem; line-height: 1.1; text-decoration: none; display: inline-block; }
.button.ghost { background: transparent; color: #fff; outline: 1px solid rgba(255,255,255,.7); }

/* Layout */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1280px; margin: 0 auto; }
.side { border-right: 1px solid var(--rule); padding: 24px 20px; position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 72px); overflow: auto; }
.side summary { display: none; }
.nav-group { margin-bottom: 1.4rem; }
.nav-label { font-family: var(--trpl-font-caption); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #5c6168; margin: 0 0 .4rem; font-weight: 700; }
.side ul { list-style: none; margin: 0; padding: 0; font-family: var(--trpl-font-caption); font-size: .95rem; }
.side li a { display: block; padding: .3rem .5rem; text-decoration: none; color: var(--ink); border-radius: 3px; }
.side li a:hover { background: var(--soft); }
.side li a[aria-current] { background: var(--trpl-night-sky); color: #fff; }
main { padding: 32px 40px 64px; min-width: 0; }

/* Prose */
.prose { max-width: var(--measure); }
.prose h1, .hero h1, .cards h2, .palette h2, .split h2 { font-family: var(--trpl-font-display); text-transform: uppercase; font-weight: 700; letter-spacing: .01em; line-height: .85; }
.prose h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: .2em 0 .5em; color: var(--trpl-night-sky); }
.prose h2 { font-family: var(--trpl-font-display); text-transform: uppercase; font-weight: 700; font-size: 2.1rem; line-height: .9; margin: 2.2em 0 .6em; padding-top: .6em; border-top: 3px solid var(--trpl-night-sky); color: var(--trpl-night-sky); }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 .4em; }
.prose h4 { font-size: 1rem; margin: 1.4em 0 .3em; }
.prose p, .prose li { max-width: var(--measure); }
.prose blockquote { margin: 1.2em 0; padding: .6em 1.2em; border-left: 4px solid var(--trpl-gray-sky); background: var(--soft); }
.prose blockquote p { margin: .4em 0; }
.prose del { color: #8a3b2a; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-family: var(--trpl-font-caption); font-size: .92rem; line-height: 1.45; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .55em .7em; border-bottom: 1px solid var(--rule); }
.prose th { background: var(--trpl-night-sky); color: #fff; font-weight: 700; }
.prose tr:nth-child(even) td { background: #FAFBFC; }
.edit { font-family: var(--trpl-font-caption); font-size: .85rem; color: #5c6168; margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1rem; max-width: var(--measure); }
.small { font-family: var(--trpl-font-caption); font-size: .88rem; color: #4a4f55; }

/* Swatches */
.swatch { display: inline-flex; align-items: center; gap: .4em; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.swatch .chip { width: 1.1em; height: 1.1em; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); display: inline-block; }
.copied::after { content: "Copied"; font-family: var(--trpl-font-caption); font-size: .75rem; margin-left: .4em; color: var(--trpl-dark-forest); }

/* Editorial filter */
.filter { position: sticky; top: 72px; background: #fff; padding: .6rem 0; z-index: 2; max-width: var(--measure); }
.filter input { width: 100%; font: inherit; font-family: var(--trpl-font-caption); padding: .6em .8em; border: 2px solid var(--trpl-night-sky); border-radius: 3px; }
.entry[hidden] { display: none; }

/* Home */
.page-home main { padding-top: 0; }
.hero { background: var(--trpl-night-sky); color: #fff; margin: 0 -40px 40px; padding: 64px 40px 56px; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); margin: .1em 0 .3em; max-width: 12ch; }
.eyebrow { font-family: var(--trpl-font-caption); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--trpl-gray-sky); margin: 0; }
.lede { font-size: 1.25rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; padding: 20px; border: 1px solid var(--rule); border-top: 4px solid var(--trpl-night-sky); text-decoration: none; color: var(--ink); background: #fff; }
.card:hover { border-top-color: var(--trpl-deep-orange); }
.card h2 { font-size: 1.7rem; margin: 0 0 .3em; color: var(--trpl-night-sky); }
.card p { margin: 0; font-size: 1rem; }
.palette { margin: 48px 0; }
.palette h2, .split h2 { font-size: 2.2rem; color: var(--trpl-night-sky); margin: 0 0 .5em; }
.swatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.big-swatch { background: var(--c); color: var(--t); border: 1px solid rgba(0,0,0,.08); min-height: 110px; padding: 12px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; font-family: var(--trpl-font-caption); font-size: .9rem; border-radius: 2px; }
.big-swatch code { background: none; padding: 0; color: inherit; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; border-top: 1px solid var(--rule); padding-top: 32px; }

/* Assets */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 1em 0 2em; max-width: none; }
.page-assets .prose { max-width: 1000px; }
.asset { margin: 0; border: 1px solid var(--rule); background: #fff; display: flex; flex-direction: column; }
.asset-preview { height: 160px; display: flex; align-items: center; justify-content: center; padding: 18px; background: #fff; border-bottom: 1px solid var(--rule); }
.asset.on-dark .asset-preview { background: var(--trpl-dark-gray); }
.asset-preview img { max-height: 124px; max-width: 100%; }
.asset figcaption { padding: 10px 12px; font-family: var(--trpl-font-caption); font-size: .85rem; display: flex; flex-direction: column; gap: 4px; }
.asset-name { font-weight: 700; text-transform: capitalize; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 20px 24px 32px; font-family: var(--trpl-font-caption); font-size: .85rem; color: #4a4f55; text-align: left; }
.site-footer p { margin: .3em auto; max-width: 1280px; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .site-header { padding: 10px var(--gutter); }
  .brand img { width: 150px; }
  .brand-label { font-size: 1.25rem; padding-left: 10px; }
  .top-links a:not(.cta) { display: none; }
  .top-links a.cta { font-size: 1rem; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; border-right: 0; border-bottom: 1px solid var(--rule); padding: 10px var(--gutter); max-height: none; }
  .side summary { display: block; font-family: var(--trpl-font-caption); font-weight: 700; cursor: pointer; padding: 6px 0; }
  main { padding: 20px var(--gutter) 48px; }
  .hero { margin: 0 calc(-1 * var(--gutter)) 28px; padding: 40px var(--gutter); }
  .split { grid-template-columns: 1fr; }
  .filter { top: 58px; }
}
