:root {
  --paper: #efe9dc;
  --ink: #15130f;
  --serif: "Fraunces", "Playfair Display", "Noto Serif SC", "Noto Serif KR", "Noto Serif Thai", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace, "Noto Serif SC", "Noto Serif KR", "Noto Serif Thai";
  --gutter: clamp(16px, 4vw, 56px);
}
:lang(ru), :lang(uk) { --serif: "Playfair Display", Georgia, serif; }
* { box-sizing: border-box; margin: 0; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--serif); overflow-x: hidden; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* the living print: threads drawn behind everything */
canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
/* paper grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9;
  mix-blend-mode: multiply; opacity: .35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono { font: 500 13px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- bar: name, language, the one action ---------- */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px var(--gutter); background: var(--paper); border-bottom: 2px solid var(--ink);
}
.bar div { display: flex; gap: 10px; }
.brand { font: italic 900 1.6rem/1 "Fraunces", serif; letter-spacing: -.04em; text-decoration: none; }
select, .get {
  min-height: 44px; border: 2px solid var(--ink); border-radius: 0;
  font: 500 13px var(--mono); letter-spacing: .08em; color: var(--ink); background: var(--paper);
}
select { padding: 0 8px; cursor: pointer; }
.get { display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; text-transform: uppercase; text-decoration: none; background: var(--ink); color: var(--paper); }
.get:hover { background: var(--paper); color: var(--ink); }

/* ---------- I. plate ---------- */
.plate {
  min-height: calc(100svh - 68px); padding: var(--gutter);
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--gutter);
}
.plate header, .plate footer { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
h1 {
  align-self: center;
  font-weight: 300; font-size: clamp(3.4rem, 15vw, 17rem); line-height: .8; letter-spacing: -.05em;
  font-variation-settings: "opsz" 144;
}
h1 i { font-weight: 900; display: block; margin-left: .35em; }
.plate p { max-width: 30ch; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.35; }
.enter {
  font: italic 300 clamp(1.6rem, 3.4vw, 3rem)/1.1 var(--serif);
  text-decoration: none; border-bottom: 2px solid; padding-bottom: .12em;
}
.enter::after { content: " ↓"; font: normal 300 1em "Fraunces", serif; }
.enter:hover { background: var(--ink); color: var(--paper); }

/* ---------- II. spectrum ---------- */
.spectrum { height: 100svh; display: flex; border-block: 2px solid var(--ink); }
.band {
  flex: 1; min-width: 0; background: var(--c);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: var(--gutter) 0; gap: 20px; overflow: hidden;
  transition: flex .7s cubic-bezier(.2, .8, .2, 1);
}
.band + .band { border-left: 2px solid var(--ink); }
.band:nth-child(1) { --c: #b0c3d9; } .band:nth-child(2) { --c: #5e98d9; } .band:nth-child(3) { --c: #4b69ff; } .band:nth-child(4) { --c: #8847ff; }
.band:nth-child(5) { --c: #d32ce6; } .band:nth-child(6) { --c: #eb4b4b; } .band:nth-child(7) { --c: #e4ae39; } .band:nth-child(8) { --c: #ade55c; }
.band:hover { flex: 5; }
.band b {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: italic 900 clamp(1.6rem, 5.2vw, 5.5rem)/1 "Fraunces", serif;
  letter-spacing: -.03em; white-space: nowrap; font-variation-settings: "opsz" 144;
}
.band .mono { white-space: nowrap; }
.band s { opacity: .6; }

/* ---------- II½. the two headline features ---------- */
.feats { padding: 14vh var(--gutter) 4vh; display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.feats article { padding: clamp(22px, 3vw, 40px); background: var(--paper); border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); }
.feats h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: .95; letter-spacing: -.03em; margin-bottom: .5em; }
.feats article:nth-of-type(2) h2 { font-style: italic; font-weight: 900; }
.feats p { max-width: 38ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.4; }

/* ---------- III. method ---------- */
.method { padding: 20vh var(--gutter) 14vh; }
.method ol { list-style: none; padding: 0; }
.method li { margin-bottom: 7vh; }
.method strong {
  display: flex; align-items: baseline; gap: .25em;
  font-weight: 300; font-size: clamp(2rem, 7.5vw, 8rem); line-height: 1; letter-spacing: -.04em;
  font-variation-settings: "opsz" 144;
}
.method strong::before { content: attr(data-n); font: 500 13px var(--mono); letter-spacing: .08em; transform: translateY(-1em); }
.method p { margin: .7em 0 0 2.2rem; max-width: 32ch; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.35; }
.method li:nth-child(2) { margin-left: 18vw; }
.method li:nth-child(2) strong { font-style: italic; font-weight: 900; }
.method li:nth-child(3) { margin-left: 7vw; }

/* ---------- IV. ticket ---------- */
.gate { padding: 6vh var(--gutter) 20vh; display: grid; place-items: center; }
.ticket {
  width: min(100%, 520px); background: var(--paper);
  border: 2px solid var(--ink); padding: clamp(24px, 5vw, 48px);
  transform: rotate(-1.4deg); box-shadow: 14px 14px 0 var(--ink);
  transition: transform .3s;
}
.ticket:focus-within { transform: none; } /* straightens the moment you start filling it in */
.ticket h2 { font-weight: 900; font-style: italic; font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: .9; letter-spacing: -.04em; }
.ticket .row { display: flex; justify-content: space-between; border-bottom: 2px dashed var(--ink); padding: 18px 0; margin-bottom: 4px; }
label { display: block; margin-top: 22px; }
.ticket h2 + label { margin-top: 32px; }
input {
  display: block; width: 100%; padding: 8px 0;
  font: 400 1.5rem var(--serif); color: inherit; background: none;
  border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; outline: none;
}
input:focus, input:focus-visible { outline: none; border-bottom-width: 6px; padding-bottom: 4px; } /* the thick underline is the focus mark */
.pw { display: flex; align-items: flex-end; gap: 10px; }
.pw input { flex: 1; min-width: 0; }
.peek { min-height: 44px; padding: 0 12px; cursor: pointer; background: none; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; }
small { display: block; margin: 8px 0 26px; }
.go {
  width: 100%; min-height: 64px; padding: 14px; cursor: pointer;
  font: italic 900 1.6rem var(--serif); letter-spacing: -.02em;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 0;
}
.go:hover { background: var(--paper); color: var(--ink); }
.have { margin-top: 18px; text-align: center; font-size: 1.1rem; }
.err { margin-bottom: 18px; padding: 10px 12px; background: var(--ink); color: var(--paper); }
.err[hidden] { display: none; }

/* ---------- login, 404: one thing in the middle of the sheet ---------- */
.solo { min-height: calc(100svh - 68px); padding: 8vh var(--gutter) 14vh; display: grid; place-items: center; align-content: center; gap: 6vh; }

/* ---------- account: the download ---------- */
.bar form { display: flex; }
.out { min-height: 44px; padding: 0 16px; cursor: pointer; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; }
.out:hover { background: var(--ink); color: var(--paper); }
.who b { font-weight: 500; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
/* the three builds stand in one row, and only break onto their own lines when a narrow screen leaves no room */
.plate footer.dl { width: min(100%, 920px); justify-self: center; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; gap: 26px; }
a.go { display: grid; place-items: center; align-content: center; gap: 6px; text-decoration: none; min-height: 88px; font-size: 1.9rem; box-shadow: 10px 10px 0 var(--c, #d32ce6); }
/* one button per OS, each with its own rarity colour under it */
.os[href$="linux"] { --c: #4b69ff; }
.os[href$="windows"] { --c: #d32ce6; }
.os[href$="mac"] { --c: #e4ae39; }
.os small { padding: 0 8px; font-size: .8rem; text-transform: none; overflow-wrap: anywhere; } /* a file name keeps its own case, and wraps rather than widening the column */
.os .later, .os.off .file { display: none; }
.os.off { pointer-events: none; opacity: .45; box-shadow: none; border-style: dashed; }
.os.off .later { display: block; }

/* ---------- privacy, terms ---------- */
.prose { max-width: 72ch; margin: 8vh var(--gutter) 14vh; padding: clamp(20px, 4vw, 48px); background: var(--paper); border: 2px solid var(--ink); }
.prose h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .9; margin-bottom: .5em; }
.prose h2 { font: italic 900 1.6rem/1.1 var(--serif); margin: 1.6em 0 .4em; }
.prose p, .prose li { font-size: 1.15rem; line-height: 1.55; margin-bottom: .8em; }

.colophon { padding: var(--gutter); border-top: 2px solid var(--ink); background: var(--paper); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.colophon p { max-width: 70ch; }
.links { display: flex; gap: 20px; flex-wrap: wrap; align-items: start; }

/* scripts without italics or tight tracking: keep them upright and give them air */
:is(h1, h1 i, .method strong, .ticket h2, .enter, .go):is(:lang(zh), :lang(ko), :lang(th)) { font-style: normal; font-weight: 900; letter-spacing: 0; line-height: 1.15; }
:is(h1, .method strong, .ticket h2):lang(th) { line-height: 1.4; }

@media (max-width: 700px) {
  /* the action moves under the thumb */
  .get { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; min-height: 56px; border-width: 2px 0 0; }
  body { padding-bottom: 56px; }
  .spectrum { flex-direction: column; }
  .band { flex-direction: row; justify-content: space-between; padding: 0 var(--gutter); }
  .band + .band { border-left: 0; border-top: 2px solid var(--ink); }
  .band:hover { flex: 3; }
  .band b { writing-mode: horizontal-tb; transform: none; font-size: 1.7rem; }
  .feats { grid-template-columns: 1fr; }
  .feats article { box-shadow: 8px 8px 0 var(--ink); }
  .method li:nth-child(n) { margin-left: 0; }
  .ticket { box-shadow: 8px 8px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .band, .ticket { transition: none; }
}
