/* Type — font pairing studio */
.main-col { min-width: 0; }
.stage-panel { overflow: hidden; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bar-r { gap: 10px; }
.themes { display: flex; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; }
.themes button { width: 22px; height: 22px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: transform .3s var(--ease); }
.themes button::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 2px var(--bg2); }
.themes button:hover { transform: scale(1.12); }
.themes button.on { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 3.5px var(--ink); }
#compareBtn[aria-pressed=true] { background: var(--ink); color: #141312; border-color: var(--ink); }

.stage { position: relative; padding: clamp(14px, 2.6vw, 40px); background: radial-gradient(120% 90% at 50% 0%, #161614 0%, #0b0b0a 70%); min-height: 300px; display: grid; place-items: center; }
.single { width: 100%; display: grid; place-items: center; }
.art-wrap { --ar: .8; container-type: inline-size; position: relative; width: min(100%, calc(min(66vh, 760px) * var(--ar))); aspect-ratio: var(--ar); border-radius: 4px; box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgba(0,0,0,.95); }
.art { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; background: var(--t-bg); color: var(--t-ink); transition: background .5s, color .5s; }
.loading { position: absolute; top: 14px; right: 16px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(20, 19, 18,.75); border: 1px solid var(--line); color: var(--soft); font-size: 10px; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; pointer-events: none; backdrop-filter: blur(8px); }
.loading.on { opacity: 1; transform: none; }
.loading i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--faint); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.compare { width: 100%; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 16px; align-items: start; }
.compare[hidden], .single[hidden] { display: none; }
.slot { display: grid; gap: 10px; min-width: 0; }
.slot .art-wrap { width: 100%; }
.slot-h { display: flex; gap: 6px; align-items: center; }
.slot-h select { flex: 1; min-width: 0; padding: 7px 28px 7px 12px; font-size: 12.5px; border-radius: 99px; }
.slot-h .btn { flex: none; }
.slot-why { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* the artboard internals: sizes are logical px × var(--u) */
.art .h { font-family: var(--hf); font-weight: var(--hw); font-style: var(--hst); letter-spacing: calc(var(--hls) * 1em); line-height: var(--hlh); font-size: calc(var(--hs) * var(--hk) * var(--u)); }
.art .b { font-family: var(--bf); font-weight: var(--bw); letter-spacing: calc(var(--bls) * 1em); line-height: var(--blh); font-size: calc(var(--bs) * var(--bk) * var(--u)); }
.art .b.sm { font-size: calc(var(--bs) * var(--bk) * .72 * var(--u)); }
.art .b.xs { font-size: calc(var(--bs) * var(--bk) * .6 * var(--u)); }
.art .up { text-transform: uppercase; letter-spacing: calc((var(--bls) + .16) * 1em); }
.art .acc { color: var(--t-acc); }
.art .mut { color: var(--t-mut); }
.art [data-k] { white-space: pre-line; outline: none; border-radius: 2px; transition: box-shadow .2s; overflow-wrap: break-word; }
.art [contenteditable]:hover { box-shadow: 0 0 0 1px var(--t-line); }
.art [contenteditable]:focus { box-shadow: 0 0 0 1px var(--t-acc); }
.art .rule { height: max(1px, calc(2 * var(--u))); background: var(--t-acc); }
.art .hair { height: 1px; background: var(--t-line); }

/* poster 1080 × 1350 */
.L-poster { --u: calc(100cqw / 1080); --hk: 2.1; --bk: 1.3; padding: calc(70 * var(--u)); display: flex; flex-direction: column; }
.L-poster .top { display: flex; justify-content: space-between; gap: calc(30 * var(--u)); }
.L-poster .hero { margin-top: auto; }
.L-poster .h { margin: calc(30 * var(--u)) 0 calc(40 * var(--u)); }
.L-poster .sub { max-width: 80%; }
.L-poster .rule { width: calc(120 * var(--u)); margin: calc(60 * var(--u)) 0 calc(40 * var(--u)); }
.L-poster .credits { text-align: center; padding-top: calc(36 * var(--u)); border-top: 1px solid var(--t-line); display: grid; gap: calc(14 * var(--u)); }
.L-poster .num { position: absolute; right: calc(60 * var(--u)); top: calc(130 * var(--u)); font-size: calc(var(--hs) * 5.4 * var(--u)); line-height: .8; letter-spacing: -.04em; color: var(--t-line); opacity: .6; }
.L-poster .vr { position: absolute; left: calc(70 * var(--u)); top: calc(150 * var(--u)); width: max(1px, calc(2 * var(--u))); height: calc(200 * var(--u)); background: var(--t-acc); }

/* title card 1920 × 1080 */
.L-title { --u: calc(100cqw / 1920); --hk: 2.2; --bk: 1.7; display: grid; place-items: center; text-align: center; padding: calc(150 * var(--u)) calc(160 * var(--u)); }
.L-title .bars { position: absolute; left: 0; right: 0; height: calc(110 * var(--u)); background: #000; }
.L-title .bars.t { top: 0; } .L-title .bars.b2 { bottom: 0; }
.L-title .inner { display: grid; justify-items: center; gap: calc(34 * var(--u)); }
.L-title .lab { display: flex; align-items: center; gap: calc(28 * var(--u)); }
.L-title .lab .rule { width: calc(90 * var(--u)); height: max(1px, calc(1.5 * var(--u))); }
.L-title .corner { position: absolute; bottom: calc(140 * var(--u)); display: flex; justify-content: space-between; left: calc(160 * var(--u)); right: calc(160 * var(--u)); }

/* web page 1440 × 900 */
.L-web { --u: calc(100cqw / 1440); --hk: 1.2; --bk: 1.05; display: flex; flex-direction: column; }
.L-web nav { display: flex; align-items: center; justify-content: space-between; padding: calc(36 * var(--u)) calc(80 * var(--u)); border-bottom: 1px solid var(--t-line); }
.L-web nav .logo { font-size: calc(var(--hs) * .42 * var(--u)); letter-spacing: 0; line-height: 1; }
.L-web nav .links { display: flex; gap: calc(40 * var(--u)); }
.L-web .pill { display: inline-block; padding: calc(16 * var(--u)) calc(30 * var(--u)); border-radius: calc(99 * var(--u)); background: var(--t-ink); color: var(--t-bg); line-height: 1.1; }
.L-web .pill.ghost { background: transparent; color: var(--t-ink); border: 1px solid var(--t-line); }
.L-web .pill.s { padding: calc(12 * var(--u)) calc(24 * var(--u)); }
.L-web main { flex: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: calc(70 * var(--u)); padding: calc(80 * var(--u)) calc(80 * var(--u)) calc(60 * var(--u)); align-items: center; }
.L-web .h { margin: calc(26 * var(--u)) 0 calc(34 * var(--u)); }
.L-web .p { max-width: 92%; }
.L-web .ctas { display: flex; gap: calc(14 * var(--u)); margin-top: calc(44 * var(--u)); }
.L-web .card { align-self: stretch; border-radius: calc(18 * var(--u)); background: var(--t-acc); color: var(--t-on); padding: calc(44 * var(--u)); display: flex; flex-direction: column; justify-content: space-between; }
.L-web .card .big { font-size: calc(var(--hs) * 2.6 * var(--u)); line-height: .9; }
.L-web .card .hair { background: currentColor; opacity: .25; margin: calc(20 * var(--u)) 0; }

/* social 1080 × 1080 */
.L-social { --u: calc(100cqw / 1080); --hk: 1.75; --bk: 1.5; padding: calc(80 * var(--u)); display: flex; flex-direction: column; }
.L-social .top { display: flex; justify-content: space-between; align-items: center; }
.L-social .dot { width: calc(18 * var(--u)); height: calc(18 * var(--u)); border-radius: 50%; background: var(--t-acc); }
.L-social .h { margin-top: auto; margin-bottom: calc(40 * var(--u)); }
.L-social .p { max-width: 80%; }
.L-social .bot { display: flex; justify-content: space-between; align-items: center; margin-top: calc(60 * var(--u)); }
.L-social .tag { padding: calc(16 * var(--u)) calc(28 * var(--u)); border-radius: calc(99 * var(--u)); background: var(--t-acc); color: var(--t-on); line-height: 1.1; }

/* business card 1050 × 600 */
.L-card { --u: calc(100cqw / 1050); --hk: .9; --bk: 1.05; padding: calc(64 * var(--u)) calc(70 * var(--u)); display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; }
.L-card .mark { width: calc(54 * var(--u)); height: calc(54 * var(--u)); border-radius: 50%; background: var(--t-acc); justify-self: end; }
.L-card .who { align-self: start; }
.L-card .h { margin-bottom: calc(14 * var(--u)); }
.L-card .contact { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: calc(10 * var(--u)) calc(40 * var(--u)); padding-top: calc(30 * var(--u)); border-top: 1px solid var(--t-line); }
.L-card .contact div:nth-child(even) { text-align: right; }

/* caption */
.caption { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 18px 20px; border-top: 1px solid var(--line); }
.cap-l { min-width: 0; flex: 1 1 320px; }
.cap-name { display: flex; align-items: center; gap: 10px; }
.cap-name .serif { font-size: 34px; line-height: 1.05; }
.cap-l p { font-size: 14px; margin: 4px 0 10px; max-width: 520px; }
.cap-fonts { display: flex; gap: 10px; flex-wrap: wrap; color: var(--soft); font-size: 10.5px; }
.cap-fonts .x { color: var(--accent); }
.cap-r { display: grid; gap: 10px; justify-items: end; }
.heart { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); transition: .3s; }
.heart svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.heart:hover { color: var(--ink); border-color: var(--muted); }
.heart[aria-pressed=true] { color: var(--accent); border-color: rgba(15,154,150,.5); }
.heart[aria-pressed=true] svg { fill: currentColor; }
.heart.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }

/* side */
.side .sec h3 output { color: var(--soft); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12.5px; }
.tagf { margin-bottom: 12px; }
.tagf .chip { padding: 5px 11px; font-size: 12px; }
.plist { display: grid; gap: 2px; max-height: 330px; overflow: auto; margin: 0 -8px; padding: 0 2px; scrollbar-width: thin; }
.pi { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 8px; border-radius: 10px; transition: background .25s; }
.pi:hover { background: var(--bg3); }
.pi.on { background: rgba(15,154,150,.09); box-shadow: inset 0 0 0 1px rgba(15,154,150,.35); }
.pi .aa { font-size: 28px; line-height: 1; color: var(--ink); white-space: nowrap; overflow: hidden; }
.pi .aa i { font-size: 15px; color: var(--muted); font-style: normal; margin-left: 2px; }
.pi b { display: block; font-weight: 400; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ctl h3 .lk { display: inline-flex; align-items: center; gap: 6px; }
.lock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; transition: .3s; }
.lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.lock:hover { color: var(--ink); }
.lock[aria-pressed=true] { color: #141312; background: var(--accent); border-color: var(--accent); }
.fpick { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg3); text-align: left; transition: border-color .3s; margin-bottom: 14px; }
.fpick:hover { border-color: var(--faint); }
.fpick .fn { font-size: 22px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.fpick small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: none; }
.wts { margin-bottom: 14px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.wts button { min-width: 38px; padding: 5px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 11px; transition: .25s; }
.wts button:hover { color: var(--ink); }
.wts button.on { background: var(--ink); color: #141312; border-color: var(--ink); }
.wts .it { font-family: var(--serif); font-style: italic; font-size: 15px; margin-left: auto; padding: 2px 12px; }

.favs { display: grid; gap: 6px; }
.fv { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: left; transition: border-color .25s; }
.fv:hover { border-color: var(--faint); }
.fv .t { font-size: 19px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv .x { color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.fv .x:hover { color: var(--bad); }
.favs:not(:empty) + .hint { display: none; }
#cssOut { max-height: 220px; font-size: 11px; }

/* font browser modal */
.fb { display: grid; gap: 12px; }
.fb .inp { font-size: 15px; }
.fb .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: min(56vh, 520px); overflow: auto; padding: 2px; }
.fc { text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; transition: border-color .25s, background .25s; min-height: 108px; align-content: space-between; }
.fc:hover { border-color: var(--faint); background: var(--bg3); }
.fc.on { border-color: var(--accent); }
.fc .s { font-size: 34px; line-height: 1; white-space: nowrap; overflow: hidden; color: var(--ink); }
.fc .n { font-size: 12.5px; color: var(--soft); display: flex; justify-content: space-between; gap: 8px; }
.fc .n small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fc.ld .s { opacity: .35; }
.modal .box:has(.fb) { width: min(860px, 100%); }

@media (max-width: 960px) {
  .art-wrap { width: min(100%, calc(70vh * var(--ar))); }
  .plist { max-height: 280px; }
}
@media (max-width: 560px) {
  .stage-bar { padding: 10px; }
  .stage-bar .seg { width: 100%; justify-content: space-between; }
  .stage-bar .seg button { padding: 6px 9px; }
  .bar-r { width: 100%; justify-content: space-between; }
  .compare { grid-template-columns: 1fr; }
  .caption { padding: 16px; }
  .cap-r { justify-items: stretch; width: 100%; }
  .cap-r .row { justify-content: space-between; }
  .cap-r .row .btn { flex: 1; }
  .cap-name .serif { font-size: 28px; }
}
