/* The public setup guide of Tlačomat, in the Školomat design system like the app: white and one quiet grey, near-black
   type, one calm violet, rounded cards, pill buttons, soft shadows. Colours, radii and shadows come from tokens.css
   (deploy.py copies the app's copy of the workspace's Brand/tokens.css next to this file); --tlac marks the steps.
   The greys of the drawn Windows dialogs are Windows' own, not the brand's. Everything that moves is
   transform/opacity/clip-path, and everything is already in place when JavaScript or motion is off. */

:root {
  --line2: color-mix(in srgb, var(--ink) 20%, transparent);
  --on: var(--bg);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --rail: 230px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg2); color: var(--text); font: 400 17px/1.6 var(--font); overflow-x: clip; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
h3 { line-height: 1.25; letter-spacing: -.01em; font-size: 1.1rem; }
p { margin: 0; }
a { color: var(--brand-ink); text-underline-offset: .18em; }
b { font-weight: 650; color: var(--ink); }
code, kbd { font-family: var(--mono); font-size: .86em; }
code { overflow-wrap: anywhere; }
kbd { padding: .1em .45em; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); white-space: nowrap; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) 0; background: var(--ink); color: var(--on); }
.skip:focus { left: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: .5em 1.7em; border: 1px solid var(--ink); border-radius: var(--r-pill); background: var(--ink); color: var(--on); font-weight: 600; text-align: center; text-decoration: none; transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.btn:hover { background: var(--text); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.btn.light { background: var(--bg); border-color: var(--bg); color: var(--brand-ink); }
.btn.light:hover { background: var(--brand-soft); }

/* ------------------------------------------------------------------ hero: the sheet comes out of the printer */

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 3rem; min-height: min(100svh, 860px); padding: 0 clamp(1rem, 4vw, 3.5rem); background: var(--bg); overflow: clip; border-bottom: 1px solid var(--line); }
.hero-in { align-self: center; padding: 2.2rem 0 3rem; max-width: 800px; min-width: 0; }
.mark { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; font-size: 1.3rem; margin-bottom: clamp(2rem, 7vh, 5rem); }
.mark img { width: 1.7em; height: 1.7em; }
.mark b { font-weight: 700; letter-spacing: -.02em; }
.mark span { padding: .1em .7em; border-radius: var(--r-pill); background: var(--tlac-soft); color: var(--tlac-ink); font-size: .8rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 5.2rem); line-height: 1; }
.lead { max-width: 36em; margin-top: 1.6rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 2.2rem; }
.cta-meta { font-size: .92rem; color: var(--mute); }
.facts { display: flex; flex-wrap: wrap; gap: .6rem 3rem; margin: 3rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .85rem; color: var(--mute); }
.facts dd { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--ink); }

.printer { position: relative; align-self: stretch; min-height: 480px; }
.slot { position: absolute; top: 0; left: 0; right: 0; height: 34px; border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--ink); z-index: 2; }
.slot::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 6px; height: 3px; border-radius: 3px; background: var(--tlac); }
.sheet { position: absolute; top: 28px; left: 9%; right: 9%; aspect-ratio: 210 / 297; background: var(--bg); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); box-shadow: var(--shadow-2); padding: 9% 9%; display: flex; flex-direction: column; gap: 3.2%; transform: translateY(calc(var(--p, 1) * -100% + var(--s, 0) * 1px)); will-change: transform; }
.ln { display: block; height: 7px; border-radius: 4px; background: var(--line2); flex: none; }
.w80 { width: 80%; height: 13px; background: var(--ink); } .w60 { width: 60%; } .w90 { width: 90%; } .w70 { width: 70%; } .w85 { width: 85%; } .w40 { width: 40%; }
.blk { display: block; height: 30%; border-radius: var(--r-sm); background: var(--tlac-soft); flex: none; margin: 2% 0; }
.tally { margin-top: auto; align-self: flex-end; font-size: .85rem; color: var(--mute); }
.tally b { font-size: 1.5rem; font-weight: 700; }

/* ------------------------------------------------------------------ progress: rail on wide screens, bar on narrow */

.meter { position: fixed; z-index: 30; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.meter i { display: block; height: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.meter span { display: none; }

.rail { position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; width: var(--rail); padding: 2rem 0 2rem clamp(1rem, 2vw, 2rem); display: flex; align-items: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.rail.on { opacity: 1; pointer-events: auto; }
.rail ol { list-style: none; margin: 0; padding: 0; width: 100%; }
.rail a { display: flex; gap: .7em; padding: .34rem .8rem; border-radius: var(--r-pill); font-size: .9rem; color: var(--mute); text-decoration: none; transition: color .2s, background .2s; }
.rail a span { font-weight: 700; width: 1.1ch; text-align: center; }
.rail a:hover { color: var(--ink); }
.rail li.done a { color: var(--text); }
.rail li.now a { color: var(--brand-ink); font-weight: 650; background: var(--brand-soft); }

/* ------------------------------------------------------------------ sections */

main { display: block; }
.sec { display: grid; grid-template-columns: clamp(60px, 11vw, 170px) minmax(0, 1fr); column-gap: clamp(1rem, 3vw, 2.5rem); max-width: 1120px; margin-left: calc(var(--rail) + 1rem); margin-right: auto; padding: clamp(3.5rem, 9vh, 7rem) 1.5rem clamp(3.5rem, 9vh, 7rem) 0; border-bottom: 1px solid var(--line); }
.num { font-size: clamp(3rem, 8vw, 7rem); font-weight: 800; line-height: .95; letter-spacing: -.05em; color: var(--tlac); position: sticky; top: 80px; align-self: start; }
.body { min-width: 0; }
.sec h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.intro { max-width: 40em; margin: 1.1rem 0 2rem; font-size: 1.12rem; line-height: 1.55; }
.aside { max-width: 42em; margin-top: 1.8rem; padding: .2rem 0 .2rem 1.1rem; border-left: 3px solid var(--tlac); }
.sub { margin: 2.5rem 0 .8rem; font-size: 1.25rem; }

.need, .do { list-style: none; margin: 0; padding: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.need li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .3rem 2rem; padding: 1.1rem 1.4rem; }
.need li + li, .do li + li { border-top: 1px solid var(--line); }
.do { counter-reset: d; max-width: 48em; }
.do li { counter-increment: d; position: relative; padding: 1rem 1.4rem 1rem 3.6rem; }
.do li::before { content: counter(d, upper-alpha); position: absolute; left: 1.2rem; top: .95rem; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--tlac-soft); color: var(--tlac-ink); font-size: .85rem; font-weight: 700; }

.fine { margin-top: 1.2rem; font-size: .92rem; color: var(--mute); }
.fine summary { cursor: pointer; }
.fine code { display: block; margin-top: .4rem; }

.shot { margin: 2rem 0 0; }
.shot img { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); width: 100%; box-shadow: var(--shadow-2); }
.shot figcaption { margin-top: .7rem; font-size: .95rem; }
.trio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
.trio .shot:last-child { grid-column: 1 / -1; }
.trio .shot { margin-top: 0; }

.callout { margin-top: 1.4rem; padding: 1.3rem 1.5rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); max-width: 48em; }
.callout h3 { margin-bottom: .4rem; }

.tbl { width: 100%; border-collapse: collapse; font-size: .98rem; }
.tbl th { text-align: left; font-size: .85rem; font-weight: 600; color: var(--mute); padding: .5rem 1rem .5rem 0; border-bottom: 1px solid var(--line2); }
.tbl td { padding: .75rem 1rem .75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl .m { font-weight: 650; color: var(--ink); white-space: nowrap; }
.where td:first-child { width: 34%; font-weight: 600; color: var(--ink); }

.ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.ops > div { padding: 1.2rem 1.3rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); min-width: 0; }
.ops h3 { margin-bottom: .3rem; }
.ops p { font-size: .98rem; }

.faq { margin-top: 1.8rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 1.4rem; font-weight: 600; font-size: 1.05rem; color: var(--ink); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 500; line-height: 1.1; color: var(--brand); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2.6rem 1.2rem 1.4rem; max-width: 46em; }
.faq details[open] p { animation: open .28s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* ------------------------------------------------------------------ Windows dialogs, drawn (Windows' own greys and blues) */

.story { position: relative; }
.beat { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.beat h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.stage { display: none; }

.mock { margin: 1.2rem 0 0; background: #f3f3f3; color: #1b1b1b; border: 1px solid #c4c4c4; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-2); font: 400 14px/1.45 "Segoe UI", var(--font); max-width: 430px; }
.mock b { color: inherit; }
.w-title { padding: .45rem .8rem; background: #fff; border-bottom: 1px solid #d6d6d6; font-size: 13px; }
.w-body { padding: .9rem; }
.w-body .f { color: inherit; margin-bottom: .7rem; font-size: 14px; }
.w-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.w-row.right { justify-content: flex-end; }
.w-btn { padding: .3rem 1rem; border: 1px solid #8a8a8a; border-radius: 4px; background: #fdfdfd; font-size: 13px; }
.w-btn.hot, .hot-text { outline: 3px solid var(--brand); outline-offset: 2px; }
.w-btn.hot { background: var(--brand); border-color: var(--brand); color: var(--on); font-weight: 600; }
.stage .w-btn.hot, .stage .hot-text { animation: hot 1.8s ease-in-out infinite; }
@keyframes hot { 50% { outline-offset: 5px; } }
.hot-text { text-decoration: underline; border-radius: 2px; }
.m-smart { background: #0a5ea8; color: #fff; border-color: #063b6a; }
.m-smart .big { font-size: 21px; font-weight: 300; margin-bottom: .6rem; }
.m-smart .w-btn { background: #0a5ea8; color: #fff; border-color: #fff; }
.m-smart .w-btn.hot, .m-smart .hot-text { outline-color: #fff; }
.m-smart .w-btn.hot { background: #fff; color: #0a5ea8; border-color: #fff; }
.m-uac .w-title { background: #1c5ba3; color: #fff; border: 0; }
.box { display: inline-block; width: 13px; height: 13px; border: 1px solid #333; background: #fff; vertical-align: -1px; margin-right: .3em; }
.box.on { background: var(--brand); box-shadow: inset 0 0 0 2px #fff; }

/* ------------------------------------------------------------------ the end (dark surface: tokens.css .on-dark) */

.end { display: grid; gap: 3rem; padding: clamp(4rem, 12vh, 8rem) clamp(1rem, 4vw, 3.5rem) 2rem; background: var(--bg2); color: var(--text); }
.end-big { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 700; line-height: 1.02; letter-spacing: -.025em; max-width: 14em; margin-bottom: 2rem; color: var(--ink); }
.end .btn { background: var(--ink); border-color: var(--ink); color: var(--bg2); }
.end .btn:hover { background: var(--text); }
.end-fine { max-width: 52em; font-size: .9rem; color: var(--mute); }

/* ------------------------------------------------------------------ scroll motion (only when JS marked the page) */

.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
/* screenshots come out like a page from the printer: revealed top to bottom */
.js .shot.rv { opacity: 1; transform: none; }
.js .shot.rv img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .shot.rv.in img { clip-path: inset(0); }
.js .num.rv { transform: translateX(-14px); }
.js .num.rv.in { transform: none; }

/* ------------------------------------------------------------------ widths */

@media (min-width: 1000px) {
  .beats { width: 48%; }
  .beat { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .35; transition: opacity .3s; }
  .beat.now { opacity: 1; }
  .beat .mock { display: none; }
  .stage { display: block; position: absolute; top: 0; right: 0; width: 46%; height: 100%; pointer-events: none; }
  .stage .frame { position: sticky; top: calc(50vh - 120px); height: 260px; }
  .stage .mock { position: absolute; left: 0; right: 0; top: 0; margin: 0; max-width: none; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .4s var(--ease), transform .4s var(--ease); }
  .stage .mock.now { opacity: 1; transform: none; }
}

@media (max-width: 1240px) {
  :root { --rail: 0px; }
  .rail { display: none; }
  .sec { margin-left: auto; padding-left: clamp(1rem, 4vw, 3.5rem); padding-right: clamp(1rem, 4vw, 3.5rem); }
  .meter { height: 32px; top: auto; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); }
  .meter i { position: absolute; inset: 0; background: var(--brand-soft); }
  .meter span { display: block; position: absolute; inset: 0; padding: 0 1rem; font-size: .82rem; line-height: 31px; font-weight: 600; color: var(--brand-ink); white-space: nowrap; overflow: hidden; }
  .end { padding-bottom: 3.8rem; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .printer { min-height: 0; height: 230px; }
  .sheet { left: 14%; right: 14%; }
  .hero-in { padding: 1.5rem 0 2.5rem; }
  .mark { margin-bottom: 2.5rem; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .trio .shot:last-child { grid-column: auto; }
  .sec { grid-template-columns: minmax(0, 1fr); }
  .num { position: static; font-size: 2.6rem; margin-bottom: .6rem; }
  .need li { grid-template-columns: minmax(0, 1fr); }
  .ops { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .tbl td { display: block; padding: 0; border: 0; }
  .tbl td:first-child { font-weight: 600; color: var(--ink); }
  .where td:first-child { width: auto; }
  .btn { width: 100%; }
  .end .btn { width: auto; }
  .need li, .faq summary { padding-left: 1.1rem; padding-right: 1.1rem; }
  .faq details p { padding-left: 1.1rem; padding-right: 1.1rem; }
  .callout, .ops > div { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .shot.rv { opacity: 1; transform: none; }
  .js .shot.rv img { clip-path: none; }
  .sheet { transform: none; }
}

@media print {
  .rail, .meter, .printer, .stage { display: none !important; }
  .js .rv { opacity: 1 !important; transform: none !important; }
  .js .shot.rv img { clip-path: none !important; }
}
