/* Black plates with small white capitals on one gradient. The gradient is drawn by js/start.js on #mist. */
:root {
  color-scheme: dark;
  --fg: #fff; --fg2: #a6a6a6; --key: #1d1d1d; --key2: #303030; --line: #444; --hot: #ff5a40;
  --text: "Host Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { font: 500 11px/1.4 var(--text); letter-spacing: .015em; text-transform: uppercase; color: var(--fg); background: #05050c; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#mist { position: fixed; inset: 0; width: 100%; height: 100%; }
h2 { font-size: 11px; font-weight: 700; }
.hint { color: var(--fg2); text-wrap: pretty; }
.plate { background: #000; border-radius: 14px; padding: 16px; }

/* ── controls ── */
button, select, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
button { border: 0; background: var(--key); cursor: pointer; height: 28px; padding: 0 10px; border-radius: 8px; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
button:hover:not(:disabled) { background: var(--key2); }
button:disabled { opacity: .35; cursor: default; }
[aria-pressed=true], .solid { background: var(--fg); color: #000; font-weight: 700; }
.solid:hover:not(:disabled), button[aria-pressed=true]:hover { background: #e2e2e2; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ic { width: 28px; padding: 0; display: grid; place-items: center; flex: none; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.live { display: block; width: 100%; height: 100%; }
.solid { height: 36px; padding: 0 16px; }

input[type=range] { appearance: none; -webkit-appearance: none; width: 100%; height: 14px; background: none; cursor: pointer; margin: 0; --at: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--fg), var(--fg)) 0 / calc(5px + (100% - 10px) * var(--at)) 100% no-repeat, var(--line); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--fg); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; margin-top: -4px; border-radius: 50%; background: var(--fg); }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--fg); }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--fg2); cursor: pointer; flex: none; margin: 0; }
input[type=checkbox]:checked { background: var(--fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.500 9.300 3 3L13.500 6'/%3E%3C/svg%3E"); box-shadow: none; }
input[type=text], input[type=email], input[type=number], select { height: 28px; border: 0; border-radius: 8px; padding: 0 9px; background: var(--key); min-width: 0; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; } input::-webkit-inner-spin-button { display: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; background: var(--key) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='1.600' stroke-linecap='round'%3E%3Cpath d='m2.500 4.500 3.500 3.500 3.500-3.500'/%3E%3C/svg%3E") no-repeat right 9px center; }
select option { background: #111; } input[type=text] { flex: 1; }
.blend { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 8px; } .blend select { width: 100%; }
.sl { display: grid; grid-template-columns: 1fr auto; row-gap: 1px; }
.sl output { color: var(--fg2); font-variant-numeric: tabular-nums; }
.sl input { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }

.papers { display: flex; gap: 5px; flex-wrap: wrap; }
.papers button, .own { position: relative; width: 22px; height: 22px; padding: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.papers [aria-pressed=true], .own.on { outline: 1.5px solid var(--fg); outline-offset: 2px; }
.own { display: grid; place-items: center; } .own svg { width: 13px; } .own.on span { display: none; }
.own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.own:focus-within { outline: 2px solid var(--hot); outline-offset: 2px; }

/* ── start: the name and the gradient fill the screen, the two ways in are black plates ── */
body:not([data-screen=start]) #start, body:not([data-screen=plans]) #plans, body:not([data-screen=login]) #login, body:not([data-screen=edit]) #editor { display: none; }
#start { position: relative; min-height: 100%; display: flex; align-items: flex-end; padding: 24px; pointer-events: none; }
#start .plate { pointer-events: auto; }
.ways { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; max-width: 50vw; animation: come .6s .2s both; }
@keyframes come { from { opacity: 0; } }
.ways > .plate { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; } .ways > .draw { width: 176px; }
.ways .solid { margin-top: auto; }
#formats { display: flex; gap: 2px; margin-left: -8px; }
#formats button { height: 42px; padding: 0 8px; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--fg2); background: none; font-weight: 500; }
#formats button:hover, #formats [aria-pressed=true] { color: var(--fg); } #formats svg { width: 20px; height: 20px; } #formats [aria-pressed=true] rect { fill: var(--fg); }
.pair { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; } #size { display: flex; gap: 6px; align-items: center; color: var(--fg2); } #size input { width: 52px; text-align: center; color: var(--fg); font-variant-numeric: tabular-nums; }
.credit { position: absolute; right: 24px; bottom: 20px; display: flex; gap: 16px; font-size: 9px; line-height: 1; color: #8f8f8f; mix-blend-mode: difference; pointer-events: auto; animation: come .6s .3s both; }
.credit > * { white-space: nowrap; } .credit a { color: inherit; text-decoration: none; } .credit a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.once { align-self: flex-start; background: #000; padding: 11px 16px; border-radius: 10px; font-size: 11px; text-wrap: pretty; }
.back { width: 100%; display: flex; gap: 8px; pointer-events: none; } .back button { pointer-events: auto; background: #000; height: 36px; padding: 0 16px; border-radius: 10px; } .back button:hover { background: var(--key2); }

/* ── subscription: the heavy words are drawn by the same shader as the name ── */
#plans, #login { position: relative; min-height: 100vh; min-height: 100dvh; padding: 24px; display: flex; flex-direction: column; gap: 24px; font-size: 14px; animation: come .4s both; }
[data-ink] { color: transparent; font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
#plansTitle, #loginTitle { font-size: clamp(30px, 6vw, 108px); line-height: 1; margin-bottom: auto; }
#pWho { display: flex; gap: 16px; align-items: center; background: #000; height: 36px; padding: 0 16px; border-radius: 10px; font-size: 11px; white-space: nowrap; } #pWho span:last-child { color: var(--fg2); } #pWho[hidden] { display: none; }
#pCode { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 12px 12px 20px; margin-bottom: -8px; max-width: 100%; } #pCode input { width: 150px; height: 36px; font-size: 14px; text-transform: uppercase; } #pCode .solid { height: 36px; } #pNote:empty { display: none; }
#lForm { width: min(100%, 440px); padding: 20px; display: grid; gap: 12px; text-wrap: pretty; } #lForm input { height: 44px; font-size: 16px; text-transform: none; } #lForm .solid { height: 44px; font-size: 14px; } #lForm p { color: var(--fg2); font-size: 12px; } #lForm #lNote { color: var(--fg); } #lNote:empty, #cNote:empty { display: none; } #lForm:not(.sent) .second, #lForm.sent .first { display: none; } #lForm #otp { letter-spacing: .3em; } #lAgain { background: none; color: var(--fg2); padding: 0; height: auto; text-align: left; font-size: 12px; } #lAgain:hover { color: var(--fg); }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.offer { display: flex; flex-direction: column; gap: 16px; padding: 20px; text-wrap: pretty; } .offer h2 { display: flex; justify-content: space-between; gap: 12px; font-size: clamp(24px, 2.9vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.offer .solid { margin-top: auto; height: 44px; font-size: 14px; width: 100%; } .offer .now, .offer .solid:disabled { opacity: 1; background: var(--key); color: var(--fg); }
body.drop::after { content: 'Drop to open'; position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgb(0 0 0 / .85); pointer-events: none; }

/* ── editor ── */
#editor { position: relative; height: 100vh; height: 100dvh; display: grid; grid-template: 36px minmax(0, 1fr) / 244px minmax(0, 1fr) 244px; gap: 8px; padding: 8px; overflow: hidden; animation: come .5s .15s both; }
header { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; }
header button { background: #000; height: 36px; border-radius: 10px; padding: 0 14px; } header .ic { width: 36px; padding: 0; } header button:disabled { opacity: 1; color: #666; }
#home { font-weight: 800; font-size: 15px; letter-spacing: -.03em; width: 244px; text-align: left; margin-right: 4px; } #home img { height: 18px; display: block; }
header .lab { display: flex; align-items: center; gap: 7px; padding: 0 13px 0 10px; } .grow { flex: 1; } .thin { display: none; } #bExport { font-weight: 700; } #bOrig[aria-pressed=true] { background: var(--fg); }
aside { background: #000; border-radius: 14px; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 28px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; } aside::-webkit-scrollbar { display: none; }
aside > * { flex: none; }
aside > h2 { margin-top: 14px; }
#stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; } #over { touch-action: none; }
.dock { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: #000; } .dock button { background: #000; } .dock button:hover { background: var(--key2); }
#lowq { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 16px); display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 14px; min-height: 36px; border-radius: 10px; background: #000; text-wrap: balance; } #lowq button { flex: none; background: var(--key2); } #lowq button:hover { background: #444; } /* above the work, which is shown small until full access */
.loop { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; } .loop input { width: 80px; } .loop output { min-width: 4ch; color: var(--fg2); font-variant-numeric: tabular-nums; }
#busy { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-variant-numeric: tabular-nums; } #busy > div { background: #000; border-radius: 14px; padding: 20px 28px; }
#busy button { margin-top: 12px; }

.modes, .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.tools button { height: 34px; padding: 0 6px; display: flex; gap: 7px; align-items: center; }
.tools svg { width: 20px; height: 20px; color: var(--hot); stroke-width: 1.7; } .f { fill: currentColor; stroke: none; }
.preview { height: 48px; border-radius: 8px; background: var(--key); padding: 2px; }
.shapes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.shapes button { height: 27px; padding: 0; display: grid; place-items: center; background: none; } .shapes canvas { width: 18px; height: 18px; }
.shapes [aria-pressed=true] { box-shadow: inset 0 0 0 1.5px var(--fg); }
details { display: grid; } details[open] > *:not(summary) { margin-top: 10px; } summary { cursor: pointer; color: var(--fg2); }
textarea { width: 100%; border: 0; border-radius: 8px; background: var(--key); padding: 10px; font-size: 18px; line-height: 1.2; letter-spacing: 0; text-transform: none; resize: vertical; display: block; min-height: 62px; } textarea::placeholder { font: 500 11px/1.9 var(--text); text-transform: uppercase; color: var(--fg2); }
.fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; } .fonts button { height: 32px; padding: 0; display: grid; place-items: center; } .fonts .live { width: 46px; height: 28px; } .fonts [aria-pressed=true] { background: var(--key); box-shadow: inset 0 0 0 1.5px var(--fg); }
.layer { display: flex; align-items: center; margin: -3px 0; }
.layer .nm { flex: 1; min-width: 0; height: 34px; text-align: left; padding: 0; display: flex; gap: 9px; align-items: center; background: none !important; color: var(--fg); font-weight: 500; } .layer .nm span { overflow: hidden; text-overflow: ellipsis; }
.layer .live { width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--key); } .layer.on .live { box-shadow: 0 0 0 1.5px var(--fg); } .layer.on .nm { font-weight: 700; }
.layer.off .nm { opacity: .4; }
.layer .ic { width: 21px; height: 26px; color: var(--fg2); background: none; } .layer .ic:hover { color: var(--fg); } .layer .ic svg { width: 14px; height: 14px; }
.acts { display: flex; } @media (hover: hover) { .layer:not(.on):not(:hover):not(:focus-within) .acts { opacity: 0; width: 0; overflow: hidden; } }

.head { display: flex; align-items: center; gap: 4px; min-height: 28px; } .head h2 { margin-right: auto; } .head .ic { width: 24px; padding: 0; background: none; } .head .ic:hover:not(:disabled) { background: var(--key2); } .head button:not(.ic) { display: flex; align-items: center; gap: 4px; padding-left: 7px; } .head svg { width: 13px; }
.styles .row { flex-wrap: nowrap; height: 48px; font-size: 11px; } .styles .row > * { height: 100%; } .styles .row > :first-child { flex: 1; width: 100%; }
.styles, .flows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 6px; font-size: 10px; letter-spacing: 0; }
.styles > div { position: relative; }
.styles > div:not(.row) > button:first-child, .flows button { width: 100%; height: auto; padding: 0; background: none; border-radius: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; justify-items: center; color: var(--fg2); font-weight: 500; }
.styles .live, .flows .live { aspect-ratio: 1; height: auto; border-radius: 8px; }
.flows { grid-template-columns: repeat(3, minmax(0, 1fr)); } .flows .live { aspect-ratio: 2; }
.styles [aria-pressed=true], .flows [aria-pressed=true] { color: var(--fg) !important; } .styles [aria-pressed=true] .live, .flows [aria-pressed=true] .live { box-shadow: 0 0 0 1.5px #000, 0 0 0 3px var(--fg); }
.styles button:hover, .flows button:hover { color: var(--fg); }
.styles span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.styles .x { position: absolute; right: -4px; top: -4px; width: 17px; height: 17px; padding: 0; display: grid; place-items: center; background: #000 !important; border-radius: 50%; } .styles .x svg { width: 11px; }
.grad { position: relative; margin: 0 8px; cursor: copy; touch-action: none; user-select: none; -webkit-user-select: none; }
.bar { display: block; width: calc(100% + 16px); height: 24px; margin: 0 -8px; border-radius: 6px; }
.mids, .stops { position: relative; height: 13px; } .stops { height: 25px; }
.mids span { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); background: #8d8d8d; cursor: ew-resize; } .mids span:hover { background: #fff; } .mids span::after { content: ''; position: absolute; inset: -5px; }
.stops button { position: absolute; top: 6px; width: 18px; height: 18px; margin-left: -9px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px #000, 0 0 0 2.5px #8d8d8d; cursor: ew-resize; } .stops [aria-pressed=true] { box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff; z-index: 1; } .stops button:focus-visible { outline-offset: 5px; }
.mixer { display: grid; gap: 5px; } .one { display: flex; gap: 5px; margin-bottom: 3px; } .one input { height: 28px; padding: 0 8px; } .one [type=text] { flex: 2; width: 0; font-variant-numeric: tabular-nums; } .one .pos { flex: 1; text-align: center; padding: 0; }
.one [type=color] { appearance: none; -webkit-appearance: none; width: 28px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; flex: none; background: none; } input::-webkit-color-swatch-wrapper { padding: 0; } input::-webkit-color-swatch { border: 0; border-radius: 0; } input::-moz-color-swatch { border: 0; }
.mixer label { display: grid; grid-template-columns: 9px 1fr 32px; gap: 8px; align-items: center; } .mixer output { text-align: right; color: var(--fg2); font-variant-numeric: tabular-nums; }
.mixer input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--track); } .mixer input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--track); } .mixer input[type=range]::-moz-range-progress { background: none; }
.mixer input[type=range]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -3px; background: #fff; border: 3px solid #000; box-shadow: 0 0 0 1.5px #fff; }
.pals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; } .pals button { height: 14px; padding: 0; border-radius: 7px; } .pals [aria-pressed=true] { outline: 1.5px solid var(--fg); outline-offset: 1.5px; }
#tabs { display: none; }

#status { z-index: 5; position: fixed; left: 50%; bottom: 56px; transform: translate(-50%, 8px); padding: 9px 14px; border-radius: 10px; background: #000; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); z-index: 8; }
#status.on { opacity: 1; transform: translate(-50%, 0); }
#nogl { display: none; } .no-gl #nogl { display: grid; place-items: center; position: fixed; inset: 0; background: #000; text-align: center; padding: 24px; z-index: 9; }

dialog { margin: auto; border: 0; padding: 18px; width: min(340px, calc(100vw - 32px)); color: inherit; background: #000; border-radius: 14px; }
dialog::backdrop { background: rgb(0 0 0 / .5); }
#cList { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; max-height: 38vh; overflow: auto; } #cList li { display: grid; grid-template-columns: 1fr 28px; align-items: center; column-gap: 12px; } #cList b { overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; font-size: 13px; } #cList span { grid-row: 2; color: var(--fg2); } #cList button { grid-area: 1 / 2 / 3; } #cNote { margin: 12px 0 0; font-size: 13px; user-select: text; -webkit-user-select: text; } #cForm label input { width: 100%; }
dialog h2 { margin-bottom: 14px; } dialog label { display: grid; grid-template-columns: 1fr 176px; align-items: center; margin-bottom: 6px; } dialog .hint { margin: 12px 0 14px; } #xPlan { margin: -4px 0 14px; text-wrap: balance; } dialog .solid { height: 28px; padding: 0 10px; }

/* ── smaller screens ── */
@media (max-width: 1180px) and (min-width: 961px) { .ways { max-width: 46vw; } }
@media (max-width: 960px) {
  .offers { gap: 10px; } .offer { padding: 14px; }
  .ways { max-width: none; }
  #start { flex-wrap: wrap; align-content: flex-end; gap: 8px; } .credit { position: static; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  #editor { grid-template: 36px minmax(0, 1fr) 36px 40dvh / minmax(0, 1fr); gap: 6px; padding: 6px; }
  #home { width: auto; font-size: 13px; } header button { padding: 0 10px; } .grow { min-width: 0; }
  #tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; grid-row: 3; } #tabs button { height: 36px; background: #000; } #tabs [aria-pressed=true] { background: var(--fg); }
  #stage { grid-row: 2; } aside { grid-row: 4; grid-column: 1; }
  body[data-tab=where] #style, body[data-tab=style] #where { display: none; }
  .wide { display: none; } .thin { display: inline; }
  .tools { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } .styles { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); } .pals { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); } .fonts { grid-template-columns: repeat(6, minmax(0, 1fr)); } .loop span, #bFit { display: none; }
  #status { bottom: calc(40dvh + 100px); }
}
@media (max-width: 620px) {
  #home, header .lab span { display: none; } header .lab { padding: 0 10px; }
  #plans, #login { padding: 12px; gap: 18px; } #plansTitle, #loginTitle { font-size: 10vw; } #plans .back { flex-wrap: wrap; } #pCode { margin: 0; padding: 12px; width: 100%; } #pCode input { flex: 1; width: 0; } #pNote { width: 100%; } #pWho { order: 1; width: 100%; justify-content: space-between; } .offers { grid-template-columns: 1fr; gap: 8px; } .offer { gap: 12px; } .offer h2 { font-size: 30px; }
  #start { padding: calc(var(--name) + 20px) 12px 12px; } .ways { width: 100%; } .ways > .plate { width: 100% !important; } .draw .hint { display: none; } .ways .solid { width: 100%; height: 42px; } #formats { justify-content: space-between; width: calc(100% + 16px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
