/* likhlike's public page. One family with the tool's own page (../app/style.css): the same paper, ink and pink, the same
   two typefaces, the same ruled margin line. The pitch is an argument in the tool's notation: each pitch carries in the
   margin the sign of the part it plays (a point, because, and, but, a question, even so).

   Each pitch is made for one window. It is as tall as the window under the top bar, its text and its piece stand side by
   side in the middle of it, and its sizes follow the smaller of the window's width and height (--u), so a short laptop
   window holds a whole pitch as a tall one does. Where the window is too narrow for two columns the piece goes under
   the text, and a pitch may then run longer than the window. */

@font-face { font-family: 'Anek'; src: url('/app/fonts/AnekLatin.ttf'); font-display: swap; font-weight: 100 800; font-stretch: 75% 125%; }
@font-face { font-family: 'Anek'; src: url('/app/fonts/AnekDevanagari.ttf'); font-display: swap; font-weight: 100 800; font-stretch: 75% 125%; unicode-range: U+0900-097F, U+A8E0-A8FF, U+1CD0-1CFF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Yrsa'; src: url('/app/fonts/Yrsa.ttf'); font-display: swap; font-weight: 300 700; }
@font-face { font-family: 'Yrsa'; src: url('/app/fonts/Yrsa-Italic.ttf'); font-display: swap; font-weight: 300 700; font-style: italic; }

:root {
  --paper: #fffaf5; --ink: #1a1016; --dye: #e5148c; --dye-ink: #c40f78; --pencil: #6b6066; --rule: #eadfd5; --wash: #f7efe7;
  --top: 76px; --margin: clamp(64px, 13vw, 184px);
  --u: min(1vw, 1.55svh);
  --text: clamp(15.5px, calc(var(--u) * .9 + 6.4px), 21px);          /* each size grows faster than the window, from a floor a short window can hold */
  --fair: clamp(21px, calc(var(--u) * 3 - 9px), 40px); --line: calc(var(--fair) * 1.12);
  --ui: 'Anek', system-ui, sans-serif; --hand: 'Yrsa', Georgia, serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; scroll-padding-top: var(--top); }
body { margin: 0; color: var(--ink); font: 400 var(--text)/1.5 var(--ui); font-stretch: 96%; -webkit-font-smoothing: antialiased;
  background: linear-gradient(90deg, transparent calc(var(--margin) - 1px), var(--dye) calc(var(--margin) - 1px) calc(var(--margin) + 1px), transparent calc(var(--margin) + 1px)); }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
figure { margin: 0; }
.sg { display: block; flex: none; }

.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); align-items: center; height: var(--top); background: var(--paper); border-bottom: 1px solid var(--rule); }
.brand { display: grid; place-items: center; height: 100%; border-right: 2px solid var(--dye); }
.brand img { display: block; height: calc(var(--top) - 24px); width: auto; }
.top nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(10px, 2.4vw, 30px); padding: 0 clamp(16px, 4vw, 44px); font-weight: 500; font-size: 15.5px; }
.top nav a { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 2px; text-underline-offset: 5px; white-space: nowrap; }
.top nav a:hover { text-decoration-color: var(--dye); }
.go { display: inline-block; padding: .62em 1.35em .56em; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.go:hover { background: var(--dye-ink); }

/* a pitch: the window under the bar, its sign in the margin level with its heading, the rest in the middle of the window */
.pitch { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); grid-template-rows: 1fr auto 1fr; min-height: calc(100svh - var(--top)); padding-block: clamp(14px, 3.4svh, 56px); border-bottom: 1px solid var(--rule); }
.sign, .body { grid-row: 2; }
.sign { display: grid; justify-items: center; align-content: start; gap: 6px; padding-top: .45em; }
.sign .marks { display: grid; gap: 4px; }
.sign small { font: 500 max(12.5px, .74em)/1.2 var(--ui); color: var(--dye-ink); text-align: center; max-width: calc(var(--margin) - 16px); }
.body { display: grid; gap: clamp(20px, 4svh, 40px) clamp(32px, 5vw, 96px); align-items: start; max-width: 1640px; padding-inline: clamp(18px, 4vw, 56px); }
.say > p { margin: 0 0 .85em; max-width: 31em; }
.say > :last-child { margin-bottom: 0; }
h2 { margin: 0 0 .5em; font: 500 clamp(27px, calc(var(--u) * 5.2 - 24px), 60px)/1.1 var(--hand); letter-spacing: -.01em; text-wrap: balance; }
.aside { color: var(--pencil); font-size: max(14px, .86em); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 1.3em !important; }
.quiet { font-weight: 500; text-decoration-color: var(--dye); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cap { display: block; font: 600 12px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); margin-bottom: .9em; }

.hero .sign { padding-top: 2.2em; }
.hero .sign .marks { gap: clamp(14px, 3svh, 30px); }
.hero .sign .marks .sg:last-child { color: var(--dye); }
.for { font: 600 12.5px/1.4 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); margin: 0 0 1.1em !important; }
h1 { margin: 0; font: 600 clamp(50px, calc(var(--u) * 9 - 14px), 132px)/1.04 var(--ui); letter-spacing: -.02em; }
.gloss { display: block; font-size: clamp(21px, .29em, 38px); line-height: 1.2; letter-spacing: 0; }      /* the headline again in English, for a reader who cannot read Devanagari */
.said { margin: .62em 0 .55em !important; font: 400 clamp(23px, calc(var(--u) * 3.6 - 13px), 46px)/1.18 var(--hand); max-width: 40ch !important; text-wrap: balance; }
.lead { font-size: 1.06em; max-width: 54ch !important; }
.hero .say > *, .hero .reading { animation: rise .7s cubic-bezier(.2, .75, .25, 1) both; }
.hero .say > :nth-child(2) { animation-delay: 90ms; } .hero .say > :nth-child(3) { animation-delay: 180ms; } .hero .say > :nth-child(4) { animation-delay: 270ms; } .hero .say > :nth-child(5) { animation-delay: 360ms; }
.hero .reading { animation-delay: 480ms; }
@keyframes rise { from { opacity: 0; translate: 0 16px; } }

/* a bar on the one scale of nought to a hundred */
.bar { position: relative; display: block; height: clamp(8px, calc(var(--u) * .75), 12px); background: var(--wash); border-radius: 6px; }
.bar::after, .limit i { content: ''; position: absolute; left: var(--at); top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }      /* the limit some universities have written down */
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; min-width: 2px; }
.bar i.under { background: repeating-linear-gradient(135deg, var(--dye) 0 3px, transparent 3px 6px); }

/* the first window's reading: three figures, the tool's own marked */
.reading { display: grid; gap: .35em; }
.mark { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 .9em; align-items: center; padding: .55em .9em .55em .7em; border-left: 3px solid transparent; }
.mark strong { min-width: 2.9em; font: 500 clamp(32px, calc(var(--u) * 5 - 16px), 62px)/1 var(--hand); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mark span { display: grid; gap: 2px; font-size: .92em; line-height: 1.3; color: var(--pencil); }
.mark span b { font-weight: 700; font-size: 1.08em; color: var(--ink); }
.mark .bar { margin-top: 5px; }
.mark.ours, .ours { background: var(--wash); border-left: 3px solid var(--dye); border-radius: 4px 16px 16px 4px; }
.mark.ours strong, .ours .head strong { color: var(--dye-ink); }
.mark.ours .bar, .ours .bar { background: var(--paper); }
.mark.ours .bar i:not(.under), .ours .bar i:not(.under) { background: var(--dye); }
.reading > a { justify-self: start; margin: .5em 0 0 .9em; font-size: .9em; font-weight: 500; text-decoration-color: var(--dye); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* the sheet: every text Turnitin read, the tool's own in one marked block with its figure */
.plate { container-type: inline-size; }
.row { display: grid; grid-template-columns: 17em minmax(48px, 1fr) 5em; gap: 3px 1em; align-items: center; padding: .6em .2em; }      /* the label column holds the longest label on one line, the last the longest reading (4.7em); the bar takes what is left */
.row .what b { display: block; font: 600 1em/1.25 var(--ui); }
.row .what small, .ours .head small { display: block; font-size: max(13px, .82em); color: var(--pencil); line-height: 1.35; }
.num { font: 600 1em/1.2 var(--ui); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ours { margin: .35em 0; padding: .75em 1em .5em; }
.ours .head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: .3em; }
.ours .head b { display: block; font: 700 1.22em/1.15 var(--ui); }
.ours .head .its { flex: none; text-align: right; }
.ours .head .its small:last-child { color: var(--ink); font-weight: 600; }
.ours .head strong { display: block; font: 500 clamp(34px, calc(var(--u) * 5 - 14px), 64px)/1 var(--hand); white-space: nowrap; }
.ours .row { padding: .32em 0; }
.ours .row .what b { font-weight: 500; }
.limits { margin-top: .7em; padding: .7em .2em 0; border-top: 1px solid var(--rule); font-size: max(13.5px, .86em); color: var(--pencil); }
.limits small { display: block; font: 600 12px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; margin-bottom: .6em; }
.limits p { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: .25em 0; }
.limits b { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.limit { position: relative; margin: .8em 0 0; padding: 0 .2em 0 16px; font-size: max(13.5px, .86em); line-height: 1.4; }
.limit i { left: 3px; top: .1em; bottom: .1em; }
.foot { display: block; margin-top: .6em; padding: 0 .2em; font-size: max(12.5px, .76em); color: var(--pencil); }

/* how a sentence is made: the taps, then the fair copy on ruled lines */
.made { container-type: inline-size; padding: 1.15em 1.3em 1em; background: var(--wash); border-left: 3px solid var(--dye); border-radius: 4px 18px 18px 4px; }
.taps { display: flex; flex-wrap: wrap; gap: .7em 1.2em; margin-bottom: 1em; }
.place { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.place small, .notes small { flex-basis: 100%; display: block; font: 600 12px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); margin-bottom: 2px; }
.place b { padding: .28em .8em .22em; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font: 500 .9em/1.3 var(--ui); }
.place b.mine { border-style: dashed; border-color: var(--dye-ink); }
.place b[data-sg] { display: inline-flex; align-items: center; gap: 7px; }
.place i { font: 500 12.5px var(--ui); color: var(--pencil); font-style: normal; }
.place em { font: 500 .86em/1.9 var(--ui); font-style: normal; color: var(--pencil); }
.notes { margin-bottom: 1em; padding: .75em .9em; background: var(--paper); border: 1px dashed var(--pencil); border-radius: 10px; font: 400 .94em/1.5 ui-monospace, Menlo, monospace; }
.notes small { margin-bottom: 8px; }
.fair { margin: 0 0 .5em; font: 400 var(--fair)/var(--line) var(--hand); padding-bottom: 2px;
  background: repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line)); }
.fair .code { color: var(--dye-ink); }
.made figcaption { font-size: max(13px, .78em); color: var(--pencil); }
.k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 0; }
.k.own { background: var(--ink); } .k.code { background: var(--dye); margin-left: 14px; }
/* one point held three ways: what the writer tapped on the left, the sentence code wrote from it on the right */
.tone { display: grid; grid-template-columns: 11.5em minmax(0, 1fr); gap: 6px 18px; align-items: start; margin-bottom: .9em; }
.tone .fair { margin: 0; }

.tiers { container-type: inline-size; display: grid; gap: .5em; }
.tier { display: grid; grid-template-columns: 9.4em 8.6em minmax(0, 1fr); gap: 2px 16px; align-items: baseline; padding: .68em 1em; border: 1px solid var(--rule); border-left: 3px solid var(--rule); border-radius: 4px 14px 14px 4px; }
.tier:first-of-type { border-left-color: var(--dye); background: var(--wash); }
.tier b { font: 600 1.05em var(--ui); }
.tier .price { font: 500 1.45em/1 var(--hand); }
.tier .price small { font: 400 max(13px, .55em) var(--ui); color: var(--pencil); }
.tier a { text-decoration: underline; text-decoration-color: var(--dye); text-decoration-thickness: 2px; text-underline-offset: 4px; }      /* a price is the link to its buy page */
.tiers .cap { margin-bottom: .2em; color: var(--dye-ink); }
.tier span:last-child { font-size: max(13.5px, .84em); color: var(--pencil); }

.nots { margin: 0; padding: 0; list-style: none; display: grid; gap: .7em; max-width: 33em; }
.nots li { padding-left: 22px; position: relative; }
.nots li::before { content: ''; position: absolute; left: 0; top: .68em; width: 10px; height: 2.3px; background: var(--ink); border-radius: 2px; }
.refs h3 { margin: .4em 0 .9em; font: 600 12px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); }
.refs ol { margin: 0; padding-left: 20px; display: grid; gap: .6em; font-size: max(13.5px, .82em); line-height: 1.5; color: var(--pencil); }
.refs a { text-decoration-color: var(--rule); text-underline-offset: 3px; word-break: break-word; }
.legal { margin: 1.6em 0 0; font-size: max(13.5px, .82em); color: var(--pencil); }      /* the links to the four legal pages, above the page's last line */
.legal a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.legal + .by { margin-top: .35em; }
.by { margin: 1.6em 0 0; font-size: max(13.5px, .82em); color: var(--pencil); }      /* the last line of the last pitch: nothing comes after a pitch, so the page always rests on one */
.by b { color: var(--ink); }

/* each piece sets itself by its own width, wherever it stands: beside the text or under it */
@container (max-width: 480px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .bar { grid-column: 1 / -1; grid-row: 2; }
  .tone { grid-template-columns: minmax(0, 1fr); }
  .ours .head { display: block; }
  .ours .head .its { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: .35em; text-align: left; }
  .ours .head .its small { white-space: nowrap; }
}
@container (max-width: 560px) {      /* a tier's note goes under its name and price before it is squeezed into a thin column */
  .tier { grid-template-columns: minmax(0, 1fr) auto; }
  .tier span:last-child { grid-column: 1 / -1; }
}
/* two columns from 1000 wide. From 1180 by 620 the page comes to rest with one pitch filling the window, and fit.html
   holds it to that: at every size where it rests so, no pitch may be taller than its window. In a narrower or a shorter
   window it rests on a pitch only when it is near one, and scrolls like any page. */
@media (min-width: 1000px) {
  html { scroll-snap-type: y proximity; }
  .pitch { scroll-snap-align: start; }
  .body { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .hero .body { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: center; }
}
@media (min-width: 1180px) and (min-height: 620px) { html { scroll-snap-type: y mandatory; } }
@media (min-width: 1000px) and (max-height: 900px) {      /* a short window: the sheet's gaps give way, never its type */
  .cap { margin-bottom: .55em; }
  .row { padding-block: .3em; }
  .ours { margin-block: .2em; padding-block: .5em .3em; }
  .ours .head { margin-bottom: .1em; }
  .ours .row { padding-block: .2em; }
  .limits { margin-top: .4em; padding-top: .45em; }
  .limits p { margin-block: .12em; }
  .limit { margin-top: .5em; }
  .foot { margin-top: .4em; }
}
@media (min-width: 1000px) and (max-height: 800px) { :root { --top: 54px; } .pitch { padding-block: 8px; } }      /* a shorter one: the bar and the pitch's edges give way too */
@media (max-width: 999px) { :root { --text: 17px; --fair: 25px; } }
@media (max-width: 760px) {
  :root { --top: 64px; }
  .top nav a:not(.go) { display: none; }
  .brand img { height: auto; width: min(69px, calc(var(--margin) - 14px)); }      /* the mark stays inside the margin, clear of its line */
  .sign small { font-size: 12px; }
  .made { padding: 1em .9em .85em; }
}
@media (prefers-reduced-motion: reduce) { .hero .say > *, .hero .reading { animation: none; } html { scroll-behavior: auto; } }

/* The four legal pages (refunds, terms, privacy, contact; make-legal.py): the same bar, margin line and type, with a
   text to read and no pitches. They do not rest on a pitch, and their type keeps one size whatever the window. */
html.doc { scroll-snap-type: none; }
.doc { --text: 18px; }
.doc body { min-height: 100svh; }      /* the margin line runs to the foot of the window on a short page */
.doc main { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); }
.doc article { grid-column: 2; max-width: 43em; padding: clamp(30px, 7svh, 84px) clamp(18px, 4vw, 56px) 80px; line-height: 1.6; }
.doc h1 { margin: 0 0 .55em; font: 500 clamp(36px, 5.4vw, 60px)/1.06 var(--hand); letter-spacing: -.01em; }
.doc h2 { margin: 2.5em 0 .9em; font: 600 12px/1.3 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); text-wrap: initial; }
.doc p { margin: 0 0 1em; }
.doc article > p a { text-decoration-color: var(--dye); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.doc article > p:has(em:only-child) { margin-top: 2.4em; color: var(--pencil); font-size: .9em; }      /* the line that says when the page was written */
.doc .legal { margin-top: 2.6em; padding-top: 1.4em; border-top: 1px solid var(--rule); }
.doc .legal a, .doc .by a { text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 999px) { .doc { --text: 17px; } }
