/* OPTweaks website: the small pages (3 December 2026). Terms, Privacy, Refunds and What's new.
   styles.css and v2.css give them the colours, the top bar, the buttons and the credits; this file
   is only their own layout. Sharp corners everywhere, like the rest of the site and the app. */

/* ---------- Top bar: the wordmark, the four pages, then "Is it safe?" and light/dark ---------- */

.doc-page .top nav a[aria-current="page"] { color: var(--text); }
.doc-page .top nav a[aria-current="page"]::after { transform: scaleX(1); }
.safe-link { display: inline-flex; align-items: center; gap: 7px; padding: 10px 6px; color: var(--text-2); font: 700 11.5px/1 var(--display); letter-spacing: .03em; text-decoration: none; white-space: nowrap; transition: color .15s ease; }
.safe-link .i { width: 15px; height: 15px; color: var(--gold-text); }
.safe-link:hover { color: var(--text); }

/* ---------- The page's opening ---------- */

.doc-head { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.doc-head .wrap { position: relative; z-index: 1; }
.doc-kick { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font: 700 10.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.doc-kick::before { content: ""; width: 34px; height: 3px; background: var(--brand); }
.doc-head h1 { margin-top: 22px; font: 900 clamp(34px, 6.2vw, 88px)/1 var(--display); letter-spacing: .012em; text-transform: uppercase; }
.doc-head h1 .gold { display: inline; }
.doc-lede { max-width: 34em; margin-top: 22px; color: var(--text-2); font-size: clamp(16.5px, 1.35vw, 19.5px); line-height: 1.55; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.doc-meta span { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: 600 13px/1.2 var(--font); }
.doc-meta .i { width: 14px; height: 14px; color: var(--gold-text); }
.doc-head .wrap > * { animation: titles-in .8s ease both; }
.doc-head .wrap > :nth-child(2) { animation-delay: .08s; } .doc-head .wrap > :nth-child(3) { animation-delay: .16s; } .doc-head .wrap > :nth-child(4) { animation-delay: .24s; }
/* The crowned OP, drawn as a fine outline, standing large at the right. */
.doc-mark { position: absolute; z-index: 0; right: clamp(-60px, -2vw, 0px); top: 50%; width: clamp(260px, 34vw, 520px); height: auto; aspect-ratio: 74 / 54; transform: translateY(-46%) rotate(-4deg); fill: none; stroke: var(--gold-c); stroke-width: .22; opacity: .42; pointer-events: none; --mk-p: none; }
:root[data-theme="dark"] .doc-mark { opacity: .3; }

/* ---------- The text, with its contents list beside it ---------- */

.doc-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(40px, 6vw, 80px) 0 clamp(88px, 10vw, 150px); }
.doc-body.solo { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.doc-toc { position: sticky; top: 98px; }
.doc-toc > p { color: var(--text-3); font: 700 9.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.doc-toc ol { margin-top: 14px; border-left: 1px solid var(--line-strong); counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: flex; gap: 10px; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; color: var(--text-2); font: 600 14px/1.35 var(--font); text-decoration: none; transition: color .15s ease, border-color .15s ease; }
.doc-toc a::before { content: counter(toc, decimal-leading-zero); flex: none; width: 20px; color: var(--text-3); font: 700 10px/1.9 var(--display); }
.doc-toc a:hover { color: var(--text); }
.doc-toc a[aria-current] { border-left-color: var(--gold-b); color: var(--text); }
.doc-text { min-width: 0; max-width: 760px; }

/* "In short": the page in four lines, on a black card in both looks. */
.doc-short { padding: clamp(22px, 3vw, 32px); background: linear-gradient(180deg, #171716, #0A0A09); color: #F7F6F0; box-shadow: 0 0 0 1px rgba(var(--gold-a-rgb), .22), var(--shadow-lg); }
.doc-short h2 { display: flex; align-items: center; gap: 12px; color: var(--gold-a); font: 700 10.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.doc-short h2::before { content: ""; width: 22px; height: 3px; background: var(--brand); }
.doc-short ul { display: grid; gap: 12px; margin-top: 18px; }
.doc-short li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: #E4E2D9; font-size: 16px; line-height: 1.5; }
.doc-short li .i { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-b); stroke-width: 2.4; }
.doc-short b { color: #FFFFFF; }
.doc-short a { color: var(--gold-a); }

/* Each part of the text: a yellow number, a heading, plain paragraphs. */
.doc-sec { padding-top: clamp(44px, 5vw, 60px); scroll-margin-top: 92px; }
.doc-sec h2 { display: flex; align-items: flex-start; gap: 14px; font: 700 clamp(18px, 1.9vw, 23px)/1.25 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.doc-sec h2 .n { flex: none; display: inline-grid; place-items: center; min-width: 36px; height: 26px; padding: 0 6px; background: var(--brand); color: #141412; font: 700 11px/1 var(--display); letter-spacing: .04em; }
.doc-sec h3 { margin-top: 26px; color: var(--text); font: 700 16.5px/1.35 var(--font); }
.doc-sec p, .doc-sec li { color: var(--text-2); font-size: 16.5px; line-height: 1.68; }
.doc-sec p { margin-top: 14px; }
.doc-sec b, .doc-sec strong { color: var(--text); font-weight: 700; }
.doc-sec ul { display: grid; gap: 9px; margin-top: 14px; }
.doc-sec ul li { position: relative; padding-left: 24px; }
.doc-sec ul li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 8px; height: 8px; background: var(--gold-c); }
.doc-sec a, .doc-final a { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold-c); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc-sec a:hover, .doc-final a:hover { text-decoration-color: var(--text); }
.doc-sec code { padding: 1px 5px; background: var(--inset); color: var(--text); font: 500 .9em/1 var(--mono); overflow-wrap: anywhere; }

/* What we keep: one row per kind of data, a short line on why under it. */
.keep { margin-top: 22px; border-top: 1px solid var(--line-strong); }
.keep > div { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 8px 26px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.keep dt { color: var(--text); font: 700 11.5px/1.5 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.keep dd { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.keep dd .why { display: block; margin-top: 6px; color: var(--text-3); font-size: 14px; }

/* Who else handles it: a card per company. */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.who li { padding: 18px 20px 18px 20px; border: 1px solid var(--line); border-top: 3px solid var(--gold-b); background: var(--surface); box-shadow: var(--shadow); }
.doc-sec .who li { padding-left: 20px; }
.doc-sec .who li::before { display: none; }
.who b { display: block; font: 700 14px/1.3 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.who span { display: block; margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

/* Refunds: the one line that matters, in yellow. */
.doc-final { padding: clamp(26px, 4vw, 44px); background: var(--brand); color: #141412; box-shadow: var(--gold-glow); }
.doc-final p:first-child { font: 900 clamp(28px, 4.4vw, 54px)/1.02 var(--display); letter-spacing: .012em; text-transform: uppercase; }
.doc-final p + p { max-width: 36em; margin-top: 14px; font-size: 16.5px; line-height: 1.55; }
.doc-final a { color: #141412; text-decoration-color: #141412; }

/* What's new: one block per version, newest first. */
.release { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px clamp(28px, 5vw, 64px); padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--line-strong); }
.release:last-child { border-bottom: 1px solid var(--line-strong); }
.release .ver { font: 900 clamp(40px, 5vw, 64px)/1 var(--display); letter-spacing: .01em; }
.release .ver small { display: block; margin-bottom: 10px; color: var(--text-3); font: 700 9.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.release .when { margin-top: 14px; color: var(--text-3); font: 600 13px/1.4 var(--font); }
.tag-soon { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 11px 7px; background: var(--brand); color: #141412; font: 700 10px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tag-soon::before { content: ""; width: 6px; height: 6px; background: #141412; animation: blink 1.6s steps(2, jump-none) infinite; }
.release p.tag-soon { color: #141412; }
@keyframes blink { 50% { opacity: .15; } }
.release h2 { font: 700 clamp(20px, 2.4vw, 28px)/1.2 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.release > div > p { margin-top: 12px; color: var(--text-2); font-size: 16.5px; line-height: 1.6; }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.feats li { padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.feats b { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 12.5px/1.3 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.feats b::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--gold-c); }
.feats li > span { display: block; margin-top: 7px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.doc-note { margin-top: 26px; color: var(--text-3); font-size: 14px; }

/* ---------- The credits: the rules pages and our socials (on every page) are in v2.css ---------- */

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
  .doc-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; border-left: 0; }
  .doc-toc a { margin-left: 0; padding: 7px 0; border-left: 0; }
  .doc-toc a[aria-current] { color: var(--text-2); }
}
@media (max-width: 860px) {
  /* The four pages leave the top bar here (styles.css), so the bar is just the two ends. */
  .doc-page .top-in { display: flex; justify-content: space-between; gap: 12px; }
  .doc-page .top-end { margin-left: auto; }
  .doc-mark { opacity: .2; right: -18%; }
  :root[data-theme="dark"] .doc-mark { opacity: .16; }
  .release { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .keep > div { grid-template-columns: minmax(0, 1fr); }
  .who, .feats { grid-template-columns: minmax(0, 1fr); }
  .doc-toc ol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .doc-page .top-in { gap: 8px; padding-inline: 16px; }
  .doc-page .wm svg { height: 22px; }
  .doc-page .top-end { gap: 6px; }
  .safe-link { padding-inline: 2px; }
  .safe-link .i { display: none; }
  .doc-sec h2 { gap: 11px; }
  .doc-sec p, .doc-sec li { font-size: 16px; }
}
@media (max-width: 400px) {
  .doc-page .wm svg { height: 19px; }
  .safe-link { font-size: 10.5px; letter-spacing: 0; }
  .doc-page .mode button { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-head .wrap > *, .tag-soon::before { animation: none; }
}
