@font-face {
  font-family: 'Special Elite';
  src: url('assets/SpecialElite-Regular.ttf') format('truetype');
  font-display: block;
}

:root {
  /* the studio's UI, taken from the "nice ui" study: grey ground, white cards, black medium system type,
     grey pills with the picked one black, grey fields, one lime action */
  --ground: #EFEFEF;
  --card: #FFFFFF;
  --ink: #000000;
  --soft: #444444;
  --muted: #6F6F6F;
  --faint: #A8A8A8;
  --line: #EFEFEF;
  --pill: #E4E4E4;
  --pill-hover: #D8D8D8;
  --picked: #000000;
  --picked-hover: #222222;
  --field: #EFEFEF;
  --lime: #ABEF3E;
  --lime-hover: #97D337;
  --focus: #739E32;
  --row: 30px;
  --r-card: 10px;
  --r-inner: 8px;
  --gutter: 30px;

  --paper: #F4F3F0;
  --brand-ink: #060707;
  --brand-green: #0D1E1D;
  --brand-blue: #387DC1;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 500 13px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

[data-icon] svg, .ico svg, .add svg { width: 16px; height: 16px; flex: none; }

/* header: logo, plain text links, the lime action */
.bar { display: flex; align-items: center; gap: 30px; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; flex: none; }
.brand img { height: 22px; display: block; }
.brand span { color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 25px; font-size: 14px; margin-left: auto; }
.tabs a { position: relative; color: var(--soft); text-decoration: none; line-height: 20px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current='page'] { color: var(--ink); }
.tabs a[aria-current='page']::before {
  content: ''; position: absolute; left: -10px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--lime);
}
.bar-end { display: flex; align-items: center; gap: 10px; }
.dims { color: var(--muted); font-variant-numeric: tabular-nums; }

.action {
  height: 34px; padding: 0 16px 0 13px; border: 0; border-radius: var(--r-inner);
  background: var(--lime); color: var(--ink); font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s;
}
.action:hover { background: var(--lime-hover); }
.action:disabled { opacity: 0.45; cursor: default; }

/* pills, rows, fields */
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pills button, .pill {
  height: 30px; padding: 0 13px; border: 0; border-radius: 15px; background: var(--pill);
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink); text-decoration: none; white-space: nowrap; transition: background 0.15s;
}
.pill[data-icon], .pill:has(svg:first-child) { padding-left: 10px; }
.pills button:hover, .pill:hover { background: var(--pill-hover); }
.pills button[aria-pressed='true'] { background: var(--picked); color: #fff; }
.pills button[aria-pressed='true']:hover { background: var(--picked-hover); }

/* Grafika's choices: small grey cards, a sign over a short name; the picked one black */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.cards button {
  min-width: 0; height: 58px; padding: 7px 4px 6px; border: 0; border-radius: var(--r-inner); background: var(--pill);
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 4px;
  color: var(--ink); font-size: 12px; line-height: 14px; transition: background 0.15s;
}
.cards button:hover { background: var(--pill-hover); }
.cards button[aria-pressed='true'] { background: var(--picked); color: #fff; }
.cards .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-sign { width: 26px; height: 26px; }
.c-sign * { vector-effect: non-scaling-stroke; }
.c-sign .line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.c-sign .shade { fill: currentColor; opacity: 0.25; }
.c-sign .ink { fill: currentColor; }
.c-swatch { width: 24px; height: 24px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.c-tape { width: 34px; height: 13px; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.c-tape.none { box-shadow: inset 0 0 0 1px currentColor; opacity: 0.35; }
.c-thumb { display: block; width: 100%; height: 28px; border-radius: 4px; }
.c-thumb.icon { display: grid; place-items: center; }
.c-thumb.icon svg { width: 20px; height: 20px; }
.c-stamp { width: 28px; height: 28px; }
.c-logo { width: 46px; max-height: 24px; object-fit: contain; }
.cards button[aria-pressed='true'] :is(.c-logo, .c-stamp) { filter: invert(1); }
.cards button[aria-pressed='true'] .c-swatch, .cards button[aria-pressed='true'] .c-tape:not(.none) { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4); }

.row { display: flex; align-items: center; gap: 5px; min-height: var(--row); }
.row + .row { margin-top: 4px; }
.field > span { width: 96px; flex: none; color: var(--muted); }
.row input:not([type='range']) {
  height: 30px; min-width: 0; flex: 1; border: 0; border-radius: var(--r-inner);
  background: var(--field); padding: 0 10px; outline: none; color: #222;
}
.row input:not([type='range']):focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
input[type='range'] { flex: 1; min-width: 0; accent-color: var(--ink); margin: 0; }
output { width: 46px; white-space: nowrap; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.sub { margin: 8px 0 5px; color: var(--muted); font-size: 12px; }
.group h3 + .sub { margin-top: 0; }
.row.spaced { margin-top: 10px; }

.ico {
  width: 28px; height: 28px; flex: none; border: 0; border-radius: var(--r-inner); background: none;
  display: grid; place-items: center; color: var(--ink); opacity: 0.4;
}
.ico:hover { opacity: 1; background: var(--field); }
.add, .link {
  height: 28px; border: 0; background: none; border-radius: var(--r-inner); padding: 0 8px 0 4px;
  display: inline-flex; align-items: center; gap: 4px; color: var(--muted);
}
.add:hover, .link:hover { color: var(--ink); background: var(--field); }

/* tool views: a white panel on the grey ground, the work beside it */
main { min-height: 0; }
.view { height: 100%; min-height: 0; }
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.panel {
  margin: 0 0 var(--gutter) var(--gutter); padding: 4px 15px 10px; overflow: auto;
  background: var(--card); border-radius: var(--r-card);
}
.group { padding: 12px 0; border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }
.group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.photo-row { margin-top: 4px; }
#photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sec { padding-bottom: 6px; }
.sec + .sec { padding-top: 10px; border-top: 1px solid var(--line); }
.sec .price, #r-items .price { flex: 0 0 58px; text-align: right; }
#r-items .qty { flex: 0 0 34px; text-align: center; }
#r-items .item + .item { margin-top: 4px; }
.sec .item { padding-left: 10px; }

.stage { display: grid; place-items: center; padding: 0 var(--gutter) var(--gutter); min-width: 0; min-height: 0; overflow: hidden; }
.stage canvas {
  display: block; border-radius: 2px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* feed: a phone with the profile */
#view-menu > .stage, #view-menu > .feed-stage { grid-column: 2; grid-row: 1; }
.feed-stage { min-width: 0; min-height: 0; overflow: hidden; display: grid; place-items: center; padding: 0 var(--gutter) var(--gutter); }
.phone {
  width: 390px; max-width: 100%; height: 100%; max-height: 844px; overflow: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 44px; padding: 18px 0 0; color: #000;
  box-shadow: 0 0 0 9px #E2E2E2, 0 20px 50px rgba(0, 0, 0, 0.12);
  font: 400 14px/1.35 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; scrollbar-width: none;
}
.phone::-webkit-scrollbar { display: none; }
.ig-top { display: flex; align-items: center; gap: 2px; padding: 6px 16px 10px; font-size: 20px; }
.ig-top svg { width: 20px; height: 20px; }
.ig-icons { margin-left: auto; display: flex; gap: 18px; }
.ig-icons svg { width: 26px; height: 26px; }
.ig-head { display: flex; align-items: center; gap: 28px; padding: 4px 16px 10px; }
.ig-avatar { width: 86px; height: 86px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ig-avatar img { width: 66%; }
.ig-stats { display: flex; gap: 28px; }
.ig-stats div { display: grid; justify-items: start; }
.ig-stats b { font-size: 17px; font-weight: 600; }
.ig-bio { display: grid; padding: 0 16px 12px; }
.ig-bio b { font-weight: 600; }
.ig-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 16px 14px; }
.ig-buttons span { height: 32px; border-radius: 8px; background: #EFEFEF; display: grid; place-items: center; font-weight: 600; font-size: 13.5px; }
.ig-highlights { display: flex; gap: 14px; padding: 0 16px 14px; font-size: 12px; overflow-x: auto; }
.ig-highlights div { display: grid; justify-items: center; gap: 5px; }
.ig-highlights span { width: 64px; height: 64px; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 1px #DBDBDB; overflow: hidden; display: block; }
.ig-highlights img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ig-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 44px; border-top: 1px solid #EFEFEF; }
.ig-tabs button { border: 0; background: none; display: grid; place-items: center; color: #8E8E8E; padding: 0; }
.ig-tabs button[data-on] { color: #000; box-shadow: inset 0 -1.5px 0 #000; }
.ig-tabs svg { width: 22px; height: 22px; }
.ig-list { display: grid; gap: 14px; padding-bottom: 18px; }
.ig-item header { display: flex; align-items: center; gap: 9px; padding: 8px 12px; }
.ig-item header b { font-weight: 600; font-size: 13.5px; }
.ig-mini { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.ig-mini img { width: 70%; }
.ig-media { display: block; width: 100%; padding: 0; border: 0; background: #EFEFEF; cursor: pointer; }
.ig-media canvas { width: 100%; aspect-ratio: 4 / 5; display: block; }
.ig-actions { display: flex; gap: 14px; padding: 10px 12px 6px; }
.ig-actions svg { width: 25px; height: 25px; }
.ig-actions span { margin-left: auto; }
.ig-item p { margin: 0; padding: 0 12px; font-size: 13.5px; }
.ig-item p b { font-weight: 600; }
.ig-item time { display: block; padding: 4px 12px 0; font-size: 11px; color: #8E8E8E; }
.ig-now.inline { position: static; margin-left: auto; background: #EFEFEF; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-post { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: #EFEFEF; overflow: hidden; cursor: pointer; }
.ig-post canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-post:hover canvas { opacity: 0.88; }
.ig-now { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); font-size: 10.5px; font-weight: 600; }

/* badges */
.badges-stage { overflow: auto; padding: 0 var(--gutter) var(--gutter); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px; max-width: 1160px; }
.badge { margin: 0; display: grid; gap: 10px; background: var(--card); border-radius: var(--r-card); padding: 0 0 15px; overflow: hidden; }
.badge-art { aspect-ratio: 1; display: grid; place-items: center; padding: 6%; }
.badge-art svg { width: 100%; height: auto; display: block; }
.badge-thumb svg { height: 100%; width: auto; max-width: 100%; display: block; }
.badge figcaption, .badge .dl-row { margin: 0; padding: 0 15px; }
.field.top { align-items: flex-start; }
.field.top > span { padding-top: 4px; }
.field textarea {
  flex: 1; min-width: 0; border: 0; border-radius: var(--r-inner); background: var(--field); padding: 6px 10px;
  resize: vertical; outline: none; line-height: 1.4; font: inherit; color: #222;
}
.badge-thumb { background: var(--paper); padding: 6%; }

/* overview */
.home { overflow: auto; }
.home-wrap { max-width: 1500px; margin: 0 auto; padding: 4px var(--gutter) 48px; }
.home-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 15px; }
.home-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
/* overview cards, like the study's product cards: media on top, a title, a muted line, an arrow that opens on hover */
.tool {
  display: flex; flex-direction: column; border-radius: var(--r-card); overflow: hidden;
  background: var(--card); color: inherit; text-decoration: none;
}
.thumb {
  aspect-ratio: 1.5; background: var(--pill); overflow: hidden;
  display: grid; place-items: center; padding: 14px; position: relative;
}
.thumb canvas { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; display: block; }
.brand-thumb { background: var(--paper); align-content: center; gap: 12px; }
.brand-thumb img { width: 46%; }
.mini-type { font: 15px/1 'Special Elite', monospace; color: var(--brand-ink); }
.mini-swatches { display: flex; gap: 4px; }
.mini-swatches i { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.web-thumb { padding: 0; place-items: start; }
.web-thumb iframe { width: 1440px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.tool-text { display: grid; gap: 4px; padding: 15px 15px 0; }
.tool-text b { font-weight: 500; font-size: 20px; line-height: 1.35; letter-spacing: -0.025em; }
.tool-text span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 14px 15px 15px; margin-top: auto; font-size: 13px; color: var(--muted); }
.tags i { font-style: normal; }
.tags i + i::before { content: '·'; margin: 0 6px; color: var(--faint); }
.tags::after {
  content: 'Otevřít →'; margin-left: auto; color: var(--ink); max-width: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.2s;
}
.tool:hover .tags::after, .tool:focus-visible .tags::after { max-width: 80px; }

/* brand manual */
.mini-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-tool { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-inner); background: var(--ground); color: inherit; text-decoration: none; }
.mini-tool:hover { background: var(--pill); }
.mini-tool b { display: block; font-weight: 500; margin-bottom: 2px; }
.mini-tool span { color: var(--muted); }
.mini-thumb { aspect-ratio: 4 / 3; border-radius: 6px; background: var(--paper); display: grid; place-items: center; padding: 8px; overflow: hidden; }
.mini-thumb canvas, .mini-thumb svg { width: 100%; height: auto; display: block; }
.link.back { color: var(--ink); text-decoration: none; padding-left: 6px; }
.brand-view { overflow: auto; }
.manual { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter) 48px; display: grid; gap: 15px; }
.card { background: var(--card); border-radius: var(--r-card); padding: 15px; }
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
.card-head.sub { margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.kit { display: flex; flex-wrap: wrap; gap: 4px; }
.dl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dl-row.spaced { margin-top: 10px; }
.dl-row .muted { margin-left: 4px; }
.rules { margin: 10px 0 0; padding: 0 0 0 14px; display: grid; gap: 3px; color: var(--muted); }

.logos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
figure { margin: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r-inner); overflow: hidden; }
.tiles .t { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 0 14%; }
.t svg { width: 100%; height: auto; display: block; }
.t.paper { background: var(--paper); }
.t.dark { background: var(--brand-green); }
figcaption { margin: 8px 0 6px; display: grid; gap: 2px; }
figcaption b { font-weight: 500; }
figcaption span { color: var(--muted); }

.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.demo { aspect-ratio: 4 / 3; border-radius: var(--r-inner); position: relative; overflow: hidden; }
.d-type {
  background: var(--paper); padding: 0 16%; display: grid; align-content: center; gap: 10px;
  font: 13px/1 'Special Elite', monospace; color: var(--brand-ink);
}
.d-type .pair { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.d-type img { height: 39px; width: auto; margin: 0 auto 6px; }
.d-type .tick { position: absolute; right: -34px; font: 11px/1 -apple-system, system-ui, sans-serif; color: var(--muted); }
.d-type .tick.big { top: 0; bottom: 6px; display: flex; align-items: center; padding-left: 8px; border-left: 1px solid var(--muted); }
.d-quarter { background: var(--brand-green); display: grid; place-items: center; }
.mark-q { width: 25%; display: grid; gap: 8px; }
.q-logo svg { width: 100%; height: auto; display: block; }
.q-dim { position: relative; height: 12px; border: 1px solid rgba(244, 243, 240, 0.5); border-top: 0; }
.q-dim span {
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%); padding: 0 4px;
  background: var(--brand-green); color: var(--paper); font-size: 11px;
}
.d-receipt { background: #E9E8E4; display: grid; place-items: center; }
.slip { width: 40%; background: #FBFBF8; padding: 10px 8px 12px; display: grid; gap: 5px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); }
.slip canvas { width: 100%; height: auto; margin-bottom: 4px; }
.slip i { display: block; height: 3px; background: #B9B7B1; border-radius: 2px; }
.slip i.short { width: 60%; }
.type-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.specimen, .sample {
  background: var(--paper); border-radius: var(--r-inner); padding: 18px 20px;
  font-family: 'Special Elite', monospace; color: var(--brand-ink);
}
.specimen .big { font-size: 42px; line-height: 1.1; }
.specimen .chars { font-size: 17px; line-height: 1.55; margin-top: 8px; word-spacing: 3px; }
.specimen .pangram { font-size: 15px; margin-top: 10px; }
.sample { font-size: 15px; }
.sample .r { display: flex; justify-content: space-between; gap: 12px; line-height: 2.2; }
.sample .gap { height: 22px; }

.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.swatch { border: 0; padding: 0; background: none; text-align: left; display: grid; gap: 3px; }
.swatch i { display: block; height: 56px; border-radius: var(--r-inner); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.swatch b { font-weight: 500; margin-top: 3px; }
.swatch span { color: var(--muted); }
.swatch:hover i { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }

.elements { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.elements canvas { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: var(--r-inner); }

.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.examples img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-inner); display: block; }

.prompt .lbl { width: 52px; flex: none; color: var(--muted); }
.prompt textarea {
  width: 100%; min-height: 168px; margin-top: 8px; resize: vertical; border: 0; outline: none;
  border-radius: var(--r-inner); background: var(--field); padding: 9px 11px; line-height: 1.5;
}
.row.end { justify-content: flex-end; margin-top: 8px; }

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { grid-template-rows: auto minmax(0, 1fr); }
  .bar { flex-wrap: wrap; padding: 12px var(--gutter); gap: 10px 20px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; gap: 20px; padding-left: 10px; margin-left: 0; }
  .bar-end { margin-left: auto; }
  .split { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: auto; }
  .panel { margin: 0 var(--gutter); overflow: visible; }
  .stage { padding: var(--gutter); min-height: 70vh; }
  .logos, .type-grid, .elements, .sizes, .mini-tools { grid-template-columns: 1fr; }
  .swatches, .examples { grid-template-columns: repeat(2, 1fr); }
}
