/*
 * Inklyn's own page styles, on top of Oinam UI (/ui/) and the Inklyn variation (inklyn.css).
 *
 * Tokens only, and outside any cascade layer, so these win over the system's without !important.
 * Anything Inklyn adds that the system has no name for starts with "ink-".
 */

/* Type: a size up and a weight up from Base, as asked on 2026-11-23. Geist carries every weight, so
   the heavier text costs no extra file. */

body {
  font-size: var(--text-base);
  font-weight: 450;
}

h1,
h2,
h3,
h4 {
  font-weight: 650;
  letter-spacing: -0.03em;
}

o-prose {
  font-size: var(--text-base);
}

/* The bar across the top of every page. */

.ink-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-cloud);
  border-bottom: 1px solid var(--color-line);
}

.ink-bar o-wrap > o-row {
  min-height: var(--space-16);
}

.ink-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-ink);
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

/* The mark is drawn in the text's color, a little taller than the name beside it. */
.ink-mark svg {
  flex: none;
  width: 1.3em;
  height: 1.3em;
}

.ink-nav a {
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  text-decoration: none;
}

.ink-nav a:hover {
  color: var(--color-ink);
}

/* On a phone the bar keeps the mark and the theme button; the page is short enough to scroll. */
@media (width < 40rem) {
  .ink-nav {
    display: none;
  }
}

/* Hide the theme button until its script has made it work. */
o-theme:not(:defined) {
  visibility: hidden;
}

.ink-theme svg {
  width: 1.1em;
  height: 1.1em;
}

/* Sections are set apart by space and a hairline, not by boxes. */

/* The hero is dark in both themes: it takes the dark scheme, so every token inside it resolves to its
   dark value (light ink on a deep cloud) without a color of its own. In the light theme the sign-up
   card goes back to the page's light scheme, a light card on the dark band, as in v0.9.0. */
.ink-hero {
  padding-block: clamp(3.5rem, 10vw, 7.5rem) clamp(3.5rem, 9vw, 6.5rem);
  color-scheme: dark;
  background: var(--color-cloud);
  color: var(--color-ink);
}

:root[data-theme="light"] .ink-hero .ink-signup {
  color-scheme: light;
  color: var(--color-ink);
}

.ink-hero h1 {
  max-width: 16ch;
  text-wrap: balance;
}

.ink-hero .lede {
  max-width: 42ch;
}

.ink-section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--color-line);
}

.ink-intro {
  max-width: 62ch;
  color: var(--color-ink-soft);
}

/* The sign-up: the field and its button on one line, and the ask beneath them, flush with the
   field's left edge (asked on 2026-11-23). The status line after a sign-up sits on the same edge. */

.ink-signup {
  max-width: 36rem;
}

/* The call to action stands out, as in v0.9.0: a raised card, a full-size field, and a large, heavier
   button. */
.ink-signup {
  box-shadow: var(--shadow-lg);
}

.ink-signup .input {
  flex: 1 1 14rem;
  height: var(--control-lg);
  font-size: var(--text-base);
}

.ink-signup .button {
  font-weight: 600;
}

.ink-ask {
  font-size: var(--text-sm);
}

.ink-ask label {
  font-weight: 600;
}

.ink-ask em {
  color: var(--color-ink-soft);
  font-size: var(--text-xs);
}

/* The answer after a sign-up: plain text while it works, then an alert in the tone of what it says
   (signup.js). */
.ink-status {
  font-size: var(--text-sm);
  font-weight: 500;
}

.ink-status o-alert {
  font-weight: 450;
}

.ink-status:empty,
.ink-turnstile:empty {
  display: none;
}

/* How it works: a process, so a numbered list. Each step opens on a solid disc with its number, as in
   v0.9.0; when all four sit in one row, a line runs from each disc to the next, so it reads as one
   path from the idea to the morning report. */

.ink-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-12) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.ink-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  counter-increment: step;
}

.ink-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-ink);
  color: var(--color-cloud);
  font-size: var(--text-base);
  font-weight: 650;
}

@media (width >= 64rem) {
  .ink-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .ink-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(var(--control) / 2);
    left: calc(var(--control) + var(--space-3));
    right: calc(var(--space-3) - var(--space-8));
    border-top: 2px solid var(--color-line-strong);
  }
}

.ink-steps h3,
.ink-rules h3 {
  font-size: var(--text-xl);
}

.ink-steps p,
.ink-rules p {
  color: var(--color-ink-soft);
}

/* A Kill: the claim on one side, the reasons on the other. */

.ink-quote {
  max-width: 24ch;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.3;
}

/* The six rules: a rule of ink above each, and nothing around it. */

.ink-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-8) var(--space-12);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Six rules sit as three by two, never four and an orphaned two. */
@media (width >= 64rem) {
  .ink-rules {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ink-rules li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-ink);
}

/* The example report's figures line up on their decimal points. */

.ink-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ink-report-head {
  font-size: var(--text-sm);
}

.ink-caption {
  color: var(--color-ink-faint);
  font-size: var(--text-xs);
}

/* Privacy and Terms: a page of reading. */

.ink-page {
  padding-block: clamp(2.5rem, 8vh, 4rem);
}

.ink-updated {
  color: var(--color-ink-faint);
  font-size: var(--text-sm);
}

/* The foot of every page. */

.ink-foot {
  padding-block: var(--space-12) var(--space-16);
  border-top: 1px solid var(--color-line);
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

.ink-foot p {
  max-width: 70ch;
}

/* Skip to content: off the page until it has the keyboard's focus. */

.ink-skip {
  position: absolute;
  top: calc(-1 * var(--space-16));
  left: var(--space-4);
  z-index: 20;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-cloud);
}

.ink-skip:focus {
  top: var(--space-3);
}
