@import url("../downloads/tokens/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: only light; }
:root[data-theme="dark"] { color-scheme: dark; }
html { scroll-padding-top: 24px; font-synthesis: none; }
body { margin: 0; font: 400 var(--size-body)/1.55 var(--font-body); background: var(--ground); color: var(--fg); }
:is(h1,h2,h3,p,figure,ul,ol,dl,dd) { margin: 0; }
:is(h1,h2,h3) { font: 600 var(--size-section)/1.05 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: var(--size-hero); }
h3 { font-size: clamp(22px, 2.1vw, 30px); letter-spacing: -.02em; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
code, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
code { overflow-wrap: anywhere; font-size: .88em; }
strong, b { font-weight: 500; }
section, figure { min-width: 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.lead { max-width: 36em; color: var(--soft-fg); text-wrap: pretty; }
.note, figcaption { color: var(--muted-fg); font-size: var(--size-small); }
figcaption { margin-top: 12px; }
.skip { position: absolute; top: 8px; left: var(--gutter); z-index: 10; transform: translateY(-160%); }
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 56px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--fg); color: var(--ground); font: 500 17px/1.2 var(--font-body); text-align: center; text-decoration: none; transition: background-color var(--hover-out) var(--ease-out), border-color var(--hover-out) var(--ease-out), transform var(--press) var(--ease-out); }
.btn.small { min-height: 44px; padding-inline: 16px; font-size: 15px; }
.btn.outline { background: transparent; border-color: var(--muted-fg); color: var(--fg); }
.btn:hover, .btn.is-hover { background: var(--button-hover); border-color: var(--button-hover); }
.btn.outline:hover, .btn.outline.is-hover { background: transparent; border-color: var(--fg); }
.btn:active, .btn.is-pressed { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled=true] { background: transparent; border-color: var(--line-fg); color: var(--muted-fg); cursor: default; transform: none; }
.link { padding-bottom: 2px; text-decoration: none; background: linear-gradient(currentColor,currentColor) left bottom / 0 1px no-repeat; transition: background-size 340ms var(--ease-out); }
.link:is(:hover,:focus-visible,.is-hover), .link.underlined { background-size: 100% 1px; }
.link.underlined:hover { background-position: right bottom; background-size: 0 1px; }

.site-header { background: var(--ground); color: var(--fg); border-bottom: 1px solid var(--line-fg); position: relative; z-index: 2; }
.head-row { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.home-link { display: inline-flex; align-items: center; gap: clamp(12px,2vw,24px); min-height: 44px; text-decoration: none; }
.lockup, .mark { display: block; flex: none; background: currentColor; mask: url("/assets/img/abyss-lockup.svg") center / contain no-repeat; }
.lockup { width: 120px; aspect-ratio: 207 / 44; }
.mark { width: 64px; aspect-ratio: 1; mask-image: url("/assets/img/abyss-mark.svg"); }
.home-link span + span { border-inline-start: 1px solid var(--line-fg); padding-inline-start: clamp(12px,2vw,24px); font-size: 15px; }
.head-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
.site-nav { border-top: 1px solid var(--line-fg); }
.nav-list { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 15px; list-style: none; }
.nav-list a { display: flex; align-items: center; min-height: 48px; padding-block: 4px; font-size: 14px; font-weight: 500; color: var(--muted-fg); text-decoration: none; }
.nav-list a:is(:hover,[aria-current]) { color: var(--fg); text-decoration: underline; text-underline-offset: .42em; }
.nav-list a[aria-current] { border-bottom: 2px solid var(--fg); text-decoration: none; }
.nav-studio { display: none; }
.public-nav { justify-content: start; gap: 0 32px; }

.kit-hero .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 48px; padding-block: clamp(58px, 8vw, 126px) clamp(30px, 5vw, 70px); }
.kit-hero .lead { margin-top: 20px; }
.kit-hero .actions { margin-top: 28px; }
.hero-index .hero-inner { align-items: center; padding-block: clamp(62px, 8vw, 124px) clamp(28px, 4vw, 64px); }
.hero-index .mark { width: clamp(76px, 10vw, 156px); margin-right: clamp(0px, 4vw, 60px); }
.hero-plate { display: block; width: 100%; height: clamp(106px, 16vw, 282px); object-fit: cover; object-position: center var(--art-y,50%); image-rendering: pixelated; }
.hero-index .hero-plate { object-position: center bottom; height: clamp(186px, 22vw, 455px); }
.hero-plate.night { display: none; }
[data-theme=dark] .hero-plate.day { display: none; }
[data-theme=dark] .hero-plate.night { display: block; }

.band { background: var(--ground); color: var(--fg); padding-block: clamp(64px, 7.6vw, 126px); }
.band + .band { border-top: 1px solid var(--line-fg); }
.band-head { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 20px clamp(24px, 7vw, 108px); margin-bottom: clamp(26px, 4vw, 56px); }
.band-head p { max-width: 36em; color: var(--soft-fg); }
.band-head h2:only-child { grid-column: 1 / -1; }
.two, .three { display: grid; gap: clamp(16px, 3vw, 42px); align-items: start; }
.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.tide { height: clamp(44px, 8.1vw, 144px); background: var(--tide) center / auto 100% repeat-x; image-rendering: pixelated; }
[data-theme=dark] .tide.theme-changing { display: none; }
.tide.paper-navy { --tide: url("/assets/art/tide-paper-navy.png"); }
.tide.navy-paper { --tide: url("/assets/art/tide-navy-paper.png"); }
.tide.paper-blue { --tide: url("/assets/art/tide-paper-blue.png"); }
.tide.blue-navy { --tide: url("/assets/art/tide-blue-navy.png"); }

.swatches { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.swatch { background: var(--ground); color: var(--fg); min-height: clamp(108px, 13vw, 206px); padding: clamp(12px, 3vw, 40px); display: flex; flex-direction: column; justify-content: end; }
.swatch button { display: block; text-align: left; border: 0; background: transparent; padding: 2px 0; text-decoration: underline; text-underline-offset: .22em; }
.swatches .swatch { border: 1px solid var(--line-fg); }
.swatch .mono { font-size: var(--size-small); }
.rule-list, .guide-index { list-style: none; padding: 0; }
.rule-list li, .guide-index li { border-top: 1px solid var(--line-fg); }
.rule-list li { padding-block: 15px; }
.guide-index { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 48px; }
.guide-index a { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding-block: 18px; text-decoration: none; }
.guide-index a:hover h3 { text-decoration: underline; text-underline-offset: .18em; }
.guide-index small { color: var(--muted-fg); font-size: var(--size-small); }
.guide-index .arrow { grid-column: 2; grid-row: 1 / span 2; }
.type-preview li { display: grid; gap: 4px; }
.spec-line { display: grid; grid-template-columns: minmax(156px, .8fr) minmax(0, 2fr); align-items: baseline; gap: 10px 32px; border-top: 1px solid var(--line-fg); padding-block: clamp(18px,2.7vw,34px); }
.type-display { font: 600 var(--size-hero)/1 var(--font-display); letter-spacing: -.035em; }
.type-section { font: 600 var(--size-section)/1 var(--font-display); letter-spacing: -.035em; }
.type-body { font: 400 var(--size-body)/1.55 var(--font-body); }
.type-note { font: 400 var(--size-note)/1.55 var(--font-body); }
.type-small { font: 400 var(--size-small)/1.55 var(--font-body); }
.type-amount { font: 500 clamp(27px, 5vw, 66px)/1.15 var(--font-mono); font-variant-numeric: tabular-nums; }
.type-amount small { font-size: .48em; font-weight: 400; }
.type-study h3 { font-size: clamp(32px,6vw,92px); }
.type-study .inter { font-family: var(--font-body); }
.type-study .mono { font-family: var(--font-mono); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: var(--size-small); }
:is(th,td) { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line-fg); vertical-align: top; }
th { font-weight: 500; }
td:first-child { font-weight: 500; }
.table-wrap:focus:not(:focus-visible) { outline: none; }
.rules-grid { margin-top: 24px; }
.rules-grid h3 { margin-bottom: 12px; }
.specimen { background: var(--ground); color: var(--fg); border: 1px solid var(--line-fg); padding: clamp(14px, 3vw, 42px); }
.logo-plate { min-height: clamp(148px, 21vw, 310px); display: grid; align-content: center; justify-items: center; gap: 20px; }
.logo-plate img:first-child { width: clamp(35px,5vw,64px); }
.logo-plate img:last-child { width: clamp(120px, 18vw, 207px); }
.logo-plan { width: min(100%, 440px); margin-inline: auto; }
.logo-files { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 34px clamp(14px, 2vw, 28px); }
.logo-files + .actions { margin-top: 44px; }
.logo-file { height: 168px; display: grid; place-items: center; padding: 20px; }
.logo-file img { width: auto; max-width: 100%; height: 30px; }
.logo-file.of-mark img { height: 56px; }
.logo-file.of-avatar img { height: 104px; }
.logo-files figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; color: var(--fg); }
.logo-file-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.logo-file-links a { padding-block: 6px; }
.avatar-row { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 12px; }
.avatar-row img { width: clamp(66px, 9vw, 124px); }
.logo-misuse { min-height: 100px; display: grid; place-content: center; }
.logo-misuse .mark { width: 38px; }
.mis-tilt { transform: rotate(-22deg); }
.mis-stretch { transform: scaleX(1.65); }
.mis-texture { background: var(--fg) url("/assets/art/blue-noise.png") 0 0 / 128px; background-blend-mode: multiply; image-rendering: pixelated; }
.built { display: inline-flex; align-items: center; gap: 8px; }
.built-icon { width: 18px; height: 18px; background: currentColor; mask: url("/assets/img/sommetlabs.svg") center / contain no-repeat; }
.ramp { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 0 8px; }
.ramp canvas { display: block; width: 100%; height: clamp(42px, 8vw, 96px); image-rendering: pixelated; border: 1px solid var(--line-fg); }
.ramp figcaption { font: 400 clamp(11px,1.4vw,15px)/1 var(--font-mono); }
.layout-wrap { border: 1px solid var(--line-fg); padding: 18px clamp(12px,5vw,72px); }
.layout-wrap div { border-inline: 1px dashed var(--muted-fg); padding: 18px; }
.status { margin-top: 20px; color: var(--muted-fg); font-size: 15px; }
.state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; min-height: 74px; padding-block: 8px; border-top: 1px solid var(--line-fg); }
.state-row > span:first-child { width: 7em; }
.is-focus { outline: 2px solid var(--focus); outline-offset: 4px; }
.transition-plate { background: var(--ground); color: var(--fg); padding: 16px 24px; }
.plate-grid, .post-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 34px clamp(14px, 4vw, 52px); }
.plate-grid > figure { border-top: 1px solid var(--line-fg); padding-top: 16px; }
.plate-grid .plate-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.plate-frame { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; }
.plate-frame img { width: auto; max-height: 400px; object-fit: contain; image-rendering: pixelated; }
.quiet { position: absolute; border: 1px dashed var(--quiet-edge); outline: 1px solid var(--quiet-shadow); background: color-mix(in srgb, var(--quiet-fill) 12%, transparent); pointer-events: none; }
[data-quiet-off] .quiet { visibility: hidden; }
.plate-grid figcaption { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 32px; }
#file-search::placeholder { color: var(--muted-fg); opacity: 1; }
.filters select, .filters input { min-height: 44px; padding: 8px 12px; border-radius: 4px; border: 1px solid var(--muted-fg); background: var(--ground); }

.poster { display: flex; flex-direction: column; justify-content: space-between; gap: .7em; padding: 6%; min-height: 0; position: relative; overflow: hidden; isolation: isolate; background: var(--ground); color: var(--fg); container-type: inline-size; }
.poster.landscape { aspect-ratio: 1200 / 675; }
.poster.square { aspect-ratio: 1; }
.poster.portrait { aspect-ratio: 1080 / 1350; }
.poster.banner { aspect-ratio: 3; }
.poster.banner img { height: 100%; }
.poster .poster-art { position: absolute; inset: auto 0 0; width: 100%; height: 49%; object-fit: cover; object-position: center var(--poster-y,52%); image-rendering: pixelated; z-index: -1; }
.poster .lockup { width: 21%; min-width: 55px; }
.poster-copy { margin-bottom: auto; display: grid; gap: .22em; padding-top: 1.2cqw; max-width: 83%; }
.poster h3 { font-size: 6.629cqw; text-wrap: balance; }
.poster p { font-size: 3.125cqw; line-height: 1.32; }
.poster .metric { font: 500 10.985cqw/.95 var(--font-mono); font-variant-numeric: tabular-nums; }
.poster.has-diagram .poster-art { height: 30%; }
.poster .poster-diagram { width: min(84%, 330px); display: flex; align-items: center; flex-wrap: wrap; gap: .5em; font-size: 3.5cqw; }
.poster .poster-diagram span { padding: .28em .58em; border: 1px solid var(--muted-fg); border-radius: 999px; }
.token-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.token-row img { width: clamp(26px,6cqw,46px); height: auto; }
.sheet-title { display: grid; gap: 12px; margin-bottom: 14px; }
.asset-sheet { display: grid; gap: 28px; }
.diagram-ground { background: var(--ground); color: var(--fg); }
.diagram-ground :is(.sn-board, .nc-map) { padding: 0; list-style: none; }
.diagram-ground figure { margin: 0; }
.diagram-guide img { width: 100%; border: 1px solid var(--line-fg); }
.sea-demo { position: relative; height: clamp(200px,32vw,520px); background: var(--paper); overflow: hidden; }
.sea-demo :is(img, canvas) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.sea-demo canvas, .sea-demo.is-live img { visibility: hidden; }
.sea-demo.is-live canvas { visibility: visible; }
.apps iframe { display: block; width: 100%; height: clamp(660px, 68vw, 815px); border: 1px solid var(--line-fg); background: var(--ground); }
.apps .actions { margin-block: 14px 25px; }
.inventory details { border-top: 1px solid var(--line-fg); padding-block: 13px; }
.inventory summary { padding-block: 6px; cursor: pointer; }
.file-list { list-style: none; padding: 8px 0 0; }
.file-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; border-top: 1px solid var(--line-fg); gap: 8px 18px; padding-block: 9px; align-items: baseline; }
.file-list a { overflow-wrap: anywhere; }
.site-footer { background: var(--ground); color: var(--fg); padding-block: 42px; }
.foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.foot-row .built { margin-left: auto; }
.flash { position: fixed; inset: auto var(--gutter) 20px auto; z-index: 4; background: var(--fg); color: var(--ground); padding: 9px 18px; border-radius: var(--radius-pill); font-size: 15px; }

@media (max-width: 1080px) {
  .nav-list { justify-content: start; gap: 0 24px; }
}
@media (max-width: 760px) {
  .head-row { height: 64px; gap: 8px; }
  .home-link { gap: 0; }
  .home-link span + span { display: none; }
  .head-actions .studio-btn { display: none; }
  .menu-btn { display: inline-flex; }
  .site-nav { display: block; }
  html.js .site-nav:not([data-open]) { display: none; }
  .nav-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; padding-block: 10px 20px; max-height: calc(100dvh - 64px); overflow-y: auto; }
  .nav-list a { font-size: 15px; }
  .nav-studio { display: block; }
  .band-head { grid-template-columns: minmax(0,1fr); }
  .guide-index { grid-template-columns: 1fr; }
  .kit-hero .hero-inner { gap: 20px 12px; }
  .hero-index .mark { width: 45px; margin: 0; align-self: start; }
  .hero-index h1 { max-width: 8em; }
  .two, .post-grid, .plate-grid { grid-template-columns: minmax(0,1fr); }
  .three { gap: 12px; }
  .type-study.three, .diagram-guide.three { grid-template-columns: minmax(0,1fr); }
  .spec-line { grid-template-columns: minmax(0,1fr); }
  .foot-row .built { margin-left: 0; }
}
@media (max-width: 430px) {
  .logo-variants { grid-template-columns: minmax(0,1fr); }
  .logo-plate { min-height: 125px; }
  .avatar-row { flex-direction: column; }
  .file-list li { gap: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
}

[hidden] { display: none !important; }

/* Preserve the gallery's source aspect ratios before its lazy images load. */
.plate-frame img { width: 100%; }
.filters label:has(input) { display: inline-flex; align-items: center; gap: 8px; }
.filters input[type=checkbox] { min-height: 0; width: 16px; height: 16px; accent-color: var(--fg); }
:root { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
.apps select { min-height: 36px; padding-inline: 6px; border: 1px solid var(--muted-fg); border-radius: 4px; background: var(--ground); }
.apps + .actions, .table-wrap + .actions { margin-top: 20px; }
.app-toast { min-height: 144px; }
.toast-message[data-visible] { margin-top: 16px; padding: 12px; border: 1px solid var(--muted-fg); border-radius: 12px; background: var(--ground); color: var(--fg); font-size: 14px; }
.tide.dark-only, [data-theme=dark] .tide.light-only { display: none; }
[data-theme=dark] .tide.dark-only { display: block; }

@media (min-width: 3000px) {
  .hero-index .hero-images { background: var(--navy); }
  .hero-index .hero-plate.day { object-position: 50% 50%; mask-image: linear-gradient(black 74%, transparent); }
}

.poster:is(.square,.portrait) p { font-size: 3.051cqw; }
.poster:is(.square,.portrait) .metric { font-size: 11.048cqw; }
.type-table :is(th,td) { border: 0; padding-block: clamp(18px,2.7vw,34px); vertical-align: baseline; }
.type-table th { width: 30%; }
.type-table tr { border-top: 1px solid var(--line-fg); }
@media (max-width: 760px) {
  .theme-specimens.three { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .type-table tr { display: grid; gap: 10px; padding-block: 18px; }
  .type-table :is(th,td) { width: auto; padding: 0; }
}

.example-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }
.post-grid figure > img { display: block; width: 100%; height: auto; }
