/* Hallmark · shape: Index-First (product reference) · genre: editorial · theme: custom (brand palette, Golos Text, compact) · job: try · signature: engine-drawn product pictures
 * waive 58: the user asked for plain, informative product descriptions (2026-11-29), so word counts and intro length run over the marketing budget
 * waive 44b/78: the user dislikes large elements ("hard to focus"); heads are small by request */
/* Karta plugins site. Plain and compact by the user's request (2026-11-29): small type, short factual copy,
 * no big slogans or poster-size elements. Colours and fonts come from tokens.css. */
@import url("./tokens.css");
@import url("./base.css");

/* Golos Text, self-hosted (2026-11-30; was Google Fonts). One variable file per script covers weights 400 to 900.
 * Licence: fonts/OFL.txt */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/golos-text-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root { --container: 1180px; --measure: 68ch; }

body { font-size: var(--text-md); line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-body); font-weight: 500; letter-spacing: 0; line-height: 1.25; text-transform: none; }
h1 { font-size: var(--text-2xl); max-width: none; }
h2 { font-size: var(--text-xl); max-width: none; }
h3 { font-size: var(--text-lg); max-width: none; }
p, li, dd { max-width: var(--measure); }
a { text-decoration-color: var(--color-accent-2); }
a:hover { text-decoration-color: var(--color-accent); }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-md); border: 1px solid var(--color-ink); border-radius: 4px; background: var(--color-paper); color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.btn:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .nav a:focus-visible, .toc a:focus-visible, main a:focus-visible, .footer a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-hover); }

.fill { padding: 0 0.25em; border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent); border-radius: 3px; color: var(--color-muted); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- nav ---------- */
.nav { border-bottom: 1px solid var(--color-paper-3); background: var(--color-paper); }
.nav__in { display: flex; align-items: center; gap: var(--space-xl); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 500; text-decoration: none; }
.brand img { flex-shrink: 0; }
.nav__links { display: flex; gap: var(--space-lg); margin: 0 0 0 auto; padding: 0; list-style: none; font-size: var(--text-sm); }
.nav__links a { text-decoration: none; }
.nav__links a:hover, .nav__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav__links a[aria-current="page"] { text-decoration-color: var(--color-accent); }

/* ---------- page layout ---------- */
main { padding-bottom: var(--space-3xl); }
.intro { padding-block: var(--space-2xl) var(--space-xl); border-bottom: 1px solid var(--color-paper-3); }
.intro__in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.intro__in--plain { grid-template-columns: minmax(0, 1fr); }
.intro p { margin-top: var(--space-xs); color: var(--color-ink-2); }
.intro .actions { margin-top: var(--space-md); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.with-toc { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--space-2xl); align-items: start; padding-top: var(--space-xl); }
.toc { position: sticky; top: var(--space-lg); font-size: var(--text-sm); }
.toc ul { display: grid; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.toc a { text-decoration: none; color: var(--color-ink-2); }
.toc a:hover { color: var(--color-ink); text-decoration: underline; }
.toc p { margin-bottom: var(--space-xs); font-weight: 500; }

.block { padding-block: var(--space-xl); border-top: 1px solid var(--color-paper-3); }
.block:first-child { border-top: 0; padding-top: 0; }
.block > * + * { margin-top: var(--space-md); }
.block > h2 + p { margin-top: var(--space-xs); color: var(--color-ink-2); }
.block h3 { margin-top: var(--space-xl); }
.page-block { padding-block: var(--space-xl); border-top: 1px solid var(--color-paper-3); }
.page-block > * + * { margin-top: var(--space-md); }
.page-block > h2 + p { margin-top: var(--space-xs); color: var(--color-ink-2); }

/* ---------- figures ---------- */
.thumbs { display: grid; gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
.thumbs--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.thumbs--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.thumbs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumbs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thumbs > li { min-width: 0; max-width: none; }
.thumbs figure { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
.thumbs figcaption, .pair figcaption { font-size: var(--text-xs); color: var(--color-ink-2); line-height: 1.4; }
.thumb { position: relative; aspect-ratio: 1; border: 1px solid var(--color-paper-3); border-radius: 4px; background: var(--color-paper-2); overflow: hidden; }
.thumb > img { position: absolute; top: 8%; left: 8%; width: 84%; height: 84%; object-fit: contain; }
.thumb--photo > img, [data-slot] > img { top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb--photo { aspect-ratio: 720 / 571; }
.thumb--wide { aspect-ratio: 3 / 2; }

/* ---------- definition lists and tables ---------- */
.specs { display: grid; grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--color-paper-3); }
.specs dt, .specs dd { margin: 0; padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: 1px solid var(--color-paper-3); }
.specs dt { font-weight: 500; }
.specs dd { color: var(--color-ink-2); max-width: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
th, td { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-paper-3); }
thead th { font-weight: 500; color: var(--color-muted); white-space: nowrap; border-bottom-color: var(--color-ink); }
tbody th { font-weight: 500; }

.bullets { margin: 0; padding-left: 1.1em; }
.bullets li + li { margin-top: var(--space-3xs); }
.bullets li::marker { color: var(--color-accent-2); }

/* ---------- home: plugin cards ---------- */
.plugins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.plugin { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: var(--space-sm); min-width: 0; max-width: none; padding: var(--space-lg); border: 1px solid var(--color-paper-3); border-radius: 6px; background: var(--color-paper); }
.plugin__head { display: flex; align-items: center; gap: var(--space-sm); }
.plugin__head img { flex-shrink: 0; }
.plugin__apps { font-size: var(--text-sm); color: var(--color-muted); }
.plugin .thumb { aspect-ratio: 16 / 10; }
.plugin .bullets { font-size: var(--text-sm); color: var(--color-ink-2); }
.plugin__link { font-size: var(--text-sm); font-weight: 500; }

.downloads { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-paper-3); }
.downloads li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding-block: var(--space-sm); border-bottom: 1px solid var(--color-paper-3); max-width: none; }
.downloads small { display: block; color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- side by side: picture and text ---------- */
.pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-xl); align-items: start; }
.pair > figure { margin: 0; display: grid; gap: var(--space-xs); }
.pair > div > * + * { margin-top: var(--space-sm); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--color-paper-3); padding-block: var(--space-xl); font-size: var(--text-sm); color: var(--color-ink-2); }
.footer__in { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); align-items: center; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin: 0 0 0 auto; padding: 0; list-style: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 60rem) {
  .nav__links { gap: var(--space-md); }
  .with-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ul { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); }
  .plugins { grid-template-columns: minmax(0, 1fr); }
  .thumbs--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .thumbs--4, .thumbs--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .nav__in { flex-wrap: wrap; gap: var(--space-xs) var(--space-md); padding-block: var(--space-xs); }
  .nav__links { margin-left: 0; width: 100%; }
  .thumbs--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .thumbs--2 { grid-template-columns: minmax(0, 1fr); }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs dt { border-bottom: 0; padding-bottom: 0; }
  .intro__in { grid-template-columns: minmax(0, 1fr); }
  .downloads li { grid-template-columns: minmax(0, 1fr); }
}
.thumbs--2 { max-width: 760px; }
.nav__links { flex-wrap: wrap; row-gap: var(--space-2xs); }
.nav__links a { white-space: nowrap; }

/* smaller pictures (user, 2026-11-29) */
.thumbs--6 { max-width: 720px; }
.thumbs--4 { max-width: 520px; }
.thumbs--3 { max-width: 560px; }
.thumbs--2 { max-width: 480px; }
.plugin .thumb { aspect-ratio: auto; height: 120px; }
.pair { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }

/* features and benefits */
.fb th[scope="row"] { width: 22%; }
.fb td:last-child { color: var(--color-ink-2); }
.plugins { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }
@media (max-width: 70rem) { .plugins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .plugins { grid-template-columns: minmax(0, 1fr); } .fb th[scope="row"] { width: auto; } }
@media (max-width: 40rem) {
  .fb thead { display: none; }
  .fb tr { display: grid; gap: var(--space-2xs); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-paper-3); }
  .fb th, .fb td { padding: 0; border: 0; }
  .fb td:last-child::before { content: "Benefit: "; font-weight: 500; color: var(--color-ink); }
}
.intro__in--art { grid-template-columns: auto minmax(0, 1fr) 260px; align-items: center; }
.intro__art { width: 260px; height: auto; }
@media (max-width: 60rem) { .intro__in--art { grid-template-columns: auto minmax(0, 1fr); } .intro__art { display: none; } }
@media (max-width: 40rem) { .intro__in--art { grid-template-columns: minmax(0, 1fr); } }
.intro__art--square { width: 180px; justify-self: center; }
.callout { margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); border-left: 3px solid var(--color-accent); background: var(--color-paper-2); color: var(--color-ink); }

/* platforms on the home cards */
.os { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); font-weight: 500; }
.os li { display: inline-flex; align-items: center; gap: var(--space-2xs); max-width: none; }
.os img { flex-shrink: 0; }
.os small { font-weight: 400; color: var(--color-muted); }
.os--later img { opacity: 0.45; }
.plugin { grid-template-rows: auto auto auto auto 1fr auto; }
.plugin__head .os { margin-left: auto; flex-wrap: nowrap; gap: var(--space-xs); align-self: flex-start; padding-top: 3px; }
.plugin { grid-template-rows: auto auto auto 1fr auto; }

/* buying */
.plugin__foot { display: grid; gap: var(--space-sm); }
.plugin__foot .actions { gap: var(--space-xs); }
.plugin__foot .btn { min-height: 36px; padding: 0 var(--space-sm); }
.prices td:nth-child(3) { white-space: nowrap; font-weight: 500; }
.prices td:last-child { text-align: right; }
.prices .btn { min-height: 34px; }
.prices__bundle th { color: var(--color-accent-2); }
.prices tbody tr:nth-child(5) > * { border-top: 1px solid var(--color-ink); }
.addon { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
@media (max-width: 40rem) { .prices td:last-child { text-align: left; } }

/* text pages: licence, privacy, refunds, trial and licence (2026-11-30) */
.intro__date { font-size: var(--text-sm); color: var(--color-muted); }
.doc { padding-block: var(--space-xl); }
.doc h2 { font-size: var(--text-lg); margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-paper-3); }
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: var(--text-md); margin-top: var(--space-lg); }
.doc > * + * { margin-top: var(--space-sm); }
.doc h2 + *, .doc h3 + * { margin-top: var(--space-xs); }
.doc p, .doc li { color: var(--color-ink-2); }
.doc .specs { margin-top: var(--space-sm); }
.doc .bullets li + li { margin-top: var(--space-2xs); }
.footer__links--legal { flex-basis: 100%; margin-left: 0; justify-content: flex-end; }
.footer__links a[aria-current="page"] { text-decoration-color: var(--color-accent); }

/* ---------- polish pass (2026-11-30) ---------- */
.nowrap { white-space: nowrap; }

/* home cards: rows line up across cards (title, app, bullets, links, buttons), logo on the title's first line */
.plugins { align-items: stretch; }
.plugin { grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--space-sm); }
.plugin__head { align-items: flex-start; }
.plugin__head > img { margin-top: 1px; }
.plugin__foot { align-self: end; }

/* tables: no rule under the last row (the section rule follows), same columns in every features table */
tbody tr:last-child > th, tbody tr:last-child > td { border-bottom: 0; }
.fb { table-layout: fixed; }
.fb thead th:nth-child(1) { width: 22%; }
.fb thead th:nth-child(2) { width: 42%; }

/* product intros: logo level with the heading */
.intro__in--art > img:first-child { align-self: start; margin-top: 4px; }

/* footer: copyright left, link rows right */
.footer__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm) var(--space-xl); align-items: start; }
.footer__in > p { grid-row: span 2; max-width: none; margin: 0; }
.footer__links, .footer__links--legal { margin: 0; justify-content: flex-end; gap: var(--space-2xs) var(--space-lg); flex-basis: auto; }
.footer__links li { max-width: none; }

@media (max-width: 60rem) {
  .footer__in { grid-template-columns: minmax(0, 1fr); }
  .footer__in > p { grid-row: auto; }
  .footer__links, .footer__links--legal { justify-content: flex-start; }
}

@media (max-width: 40rem) {
  /* smaller heads and intro on phones */
  h1 { font-size: 1.625rem; }
  h2 { font-size: var(--text-lg); }
  .intro { padding-block: var(--space-xl) var(--space-lg); }
  .intro__in > img:first-child { width: 40px; height: 40px; }

  /* nav: one row that scrolls sideways instead of three wrapped rows */
  .nav__links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: var(--space-2xs) var(--space-xs); }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__in > nav { flex: 1 1 100%; min-width: 0; }

  /* prices: name and price on one line, what's included under the name */
  .prices thead { display: none; }
  .prices tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: var(--space-md); row-gap: var(--space-3xs); align-items: center; padding-block: var(--space-sm); border-bottom: 1px solid var(--color-paper-3); }
  .prices tbody tr:last-child { border-bottom: 0; }
  .prices th, .prices td, .prices tbody tr:nth-child(5) > * { padding: 0; border: 0; }
  .prices tbody tr:nth-child(5) { border-top: 1px solid var(--color-ink); }
  .prices th { grid-column: 1; grid-row: 1; }
  .prices td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: var(--text-xs); color: var(--color-ink-2); }
  .prices td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
  .prices td:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; }

  /* stacked tables: one block per row, labels in front of the values */
  .stack thead { display: none; }
  .stack tr { display: grid; gap: var(--space-3xs); padding-block: var(--space-sm); border-bottom: 1px solid var(--color-paper-3); }
  .stack tbody tr:last-child { border-bottom: 0; }
  .stack th, .stack td { padding: 0; border: 0; }
  .stack th { margin-bottom: var(--space-3xs); }
  .stack td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); color: var(--color-ink-2); }
  .stack td::before { content: attr(data-label); color: var(--color-muted); }

  /* downloads: button stays beside its plugin */
  .downloads li { grid-template-columns: minmax(0, 1fr) auto; }
  .fb tr:last-child { border-bottom: 0; }
}
/* lists with margin: 0 lost the section's spacing above them */
.page-block > * + :is(.plugins, .downloads, .thumbs, .specs, .table-wrap), .block > * + :is(.thumbs, .table-wrap, .specs, .pair) { margin-top: var(--space-md); }
@media (max-width: 40rem) { main { padding-bottom: var(--space-xl); } }

/* loops: the video fills the thumbnail (its frames carry the background and the 8% inset) */
.thumb--loop > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* a picture that should fill its thumbnail more (the Penumbra home card, user 2026-11-30) */
.thumb--tight > img { top: 3%; left: 3%; width: 94%; height: 94%; }
