/* coratis.online — self-hosted stylesheet.
   No web fonts, no CDN, no remote assets. System font stack only. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --bg:        #ffffff;
  --bg-soft:   #f5f7fb;
  --bg-sunk:   #eef1f8;
  --ink:       #101828;
  --ink-2:     #344054;
  --muted:     #5b6678;
  --line:      #e3e8f0;
  --line-2:    #cfd6e4;

  --accent:    #4338ca;
  --accent-2:  #0891b2;
  --accent-sf: #eef0ff;
  --accent-ln: #c9cdf7;

  --flag:      #9a5b00;
  --flag-sf:   #fff6e6;
  --flag-ln:   #f3dcb0;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .14);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .06), 0 20px 44px -20px rgba(16, 24, 40, .24);

  --wrap:      1180px;
  --read:      74ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0d1117;
    --bg-soft:   #141a23;
    --bg-sunk:   #1a212c;
    --ink:       #e9edf5;
    --ink-2:     #c4ccda;
    --muted:     #97a1b2;
    --line:      #232c39;
    --line-2:    #33404f;

    --accent:    #a5b0ff;
    --accent-2:  #4fd1e8;
    --accent-sf: #191f3a;
    --accent-ln: #33407a;

    --flag:      #f0c078;
    --flag-sf:   #2a2113;
    --flag-ln:   #4b3a1c;

    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 20px 44px -20px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: from-font; }
a:hover { color: var(--accent-2); }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.018em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); letter-spacing: -.028em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.15vw, 1.95rem); margin-top: 2.4em; }
h3 { font-size: clamp(1.14rem, 1.03rem + .4vw, 1.3rem); margin-top: 1.9em; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.25em; padding-left: 1.35em; }
li { margin-bottom: .5em; }
li::marker { color: var(--accent); }

hr { border: 0; height: 1px; background: var(--line); margin: 2.6rem 0; }

code, kbd {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .12em .42em;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0; z-index: 200; font-weight: 600;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- Advertising disclosure bar (must render above the fold) ---------- */

.adbar {
  background: var(--flag-sf);
  border-bottom: 1px solid var(--flag-ln);
  color: var(--flag);
  font-size: .845rem;
  line-height: 1.5;
  padding: .6rem 1.25rem;
  text-align: center;
}
.adbar strong { color: var(--flag); letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.adbar a { color: inherit; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .masthead { background: var(--bg); } }

.masthead-in {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; display: block; }
.brand b { font-size: 1.12rem; font-weight: 700; letter-spacing: -.03em; }
.brand span { display: block; font-size: .67rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 600; }

.nav-toggle {
  margin-left: auto; display: none;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--radius-sm); padding: .48rem .8rem; font: inherit; font-size: .88rem;
  font-weight: 600; cursor: pointer;
}

.nav { margin-left: auto; display: flex; gap: .15rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 550;
  padding: .45rem .7rem; border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--accent-sf); color: var(--accent); }
.nav a[aria-current="page"] { background: var(--accent-sf); color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; width: 100%; order: 3; flex-direction: column; gap: 0;
    border-top: 1px solid var(--line); margin: .55rem -1.25rem -.7rem; padding: .4rem 1.25rem .8rem;
  }
  .nav[data-open] { display: flex; }
  .nav a { padding: .6rem .55rem; }
}

/* ---------- Layout ---------- */

.shell { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem 4rem; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
@media (max-width: 1020px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; } }

.prose { min-width: 0; max-width: var(--read); }
.prose.wide { max-width: none; }

.rail { min-width: 0; position: sticky; top: 5.2rem; display: grid; gap: 1.25rem; }
@media (max-width: 1020px) { .rail { position: static; } }

/* ---------- Article head ---------- */

.kicker {
  display: inline-block; font-size: .73rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-sf); border: 1px solid var(--accent-ln);
  border-radius: 999px; padding: .3rem .75rem; margin: 2.2rem 0 1rem;
}
.standfirst { font-size: 1.16rem; color: var(--ink-2); line-height: 1.6; margin-bottom: 1.4rem; }

.byline {
  display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center;
  font-size: .87rem; color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: .8rem 0; margin-bottom: 1.6rem;
}
.byline b { color: var(--ink); font-weight: 650; }

/* ---------- Disclosure box ---------- */

.disclosure {
  background: var(--flag-sf);
  border: 1px solid var(--flag-ln);
  border-left: 4px solid var(--flag);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 0 0 1.9rem;
  font-size: .93rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.disclosure h2, .disclosure p:first-child strong { font-size: .95rem; margin: 0 0 .4rem; color: var(--flag); }
.disclosure p:last-child { margin-bottom: 0; }

/* ---------- Call to action ---------- */

.cta-block { margin: 2rem 0; }
.cta-block.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; text-decoration: none; font-weight: 650; font-size: 1.02rem;
  padding: .92rem 1.7rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); border: 0; line-height: 1.3;
}
.btn:hover { color: #fff; filter: brightness(1.07); }
.btn.full { display: flex; width: 100%; }
.btn.ghost {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--accent-ln); box-shadow: none;
}
.btn.ghost:hover { color: var(--accent); background: var(--accent-sf); }

.partner-tag {
  display: inline-block; margin-left: .1rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px; padding: .12rem .46rem; color: #fff;
}
.btn.ghost .partner-tag { background: var(--accent-sf); border-color: var(--accent-ln); color: var(--accent); }

.cta-note {
  margin: .6rem 0 0; font-size: .82rem; line-height: 1.55; color: var(--muted); max-width: 52ch;
}
.cta-block.center .cta-note { margin-left: auto; margin-right: auto; }

/* ---------- Cards & rail ---------- */

.card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem;
}
.card h2, .card h3 { margin-top: 0; font-size: 1.05rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .cta-note { max-width: none; }

.card-hi { background: var(--accent-sf); border-color: var(--accent-ln); }

.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: .1rem; counter-increment: toc; }
.toc a {
  display: block; text-decoration: none; color: var(--ink-2);
  font-size: .9rem; padding: .38rem .55rem .38rem 2rem; border-radius: var(--radius-sm);
  position: relative;
}
.toc a::before {
  content: counter(toc); position: absolute; left: .55rem; top: .38rem;
  font-size: .73rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums;
}
.toc a:hover { background: var(--bg-sunk); color: var(--ink); }

.tick { list-style: none; padding: 0; }
.tick li { position: relative; padding-left: 1.65rem; }
.tick li::before {
  content: ""; position: absolute; left: 0; top: .52em; width: .55rem; height: .28rem;
  border-left: 2.2px solid var(--accent-2); border-bottom: 2.2px solid var(--accent-2);
  transform: rotate(-45deg);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin: 1.8rem 0; }

/* ---------- Figures ---------- */

figure {
  margin: 2.2rem 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem .9rem;
}
figure img { display: block; width: 100%; border-radius: var(--radius-sm); }
figcaption { margin-top: .85rem; font-size: .85rem; line-height: 1.55; color: var(--muted); }
figcaption b { color: var(--ink-2); font-weight: 650; }

/* ---------- Callout ---------- */

.note {
  border-left: 3px solid var(--accent-ln); background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem; margin: 1.8rem 0; font-size: .95rem;
}
.note p:last-child { margin-bottom: 0; }
.note b { color: var(--accent); }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.8rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 520px; }
caption { text-align: left; font-size: .85rem; color: var(--muted); padding: .8rem 1rem 0; }
th, td { text-align: left; padding: .72rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-sunk); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Definition list (glossary) ---------- */

dl.defs { margin: 1.6rem 0; }
dl.defs dt { font-weight: 700; color: var(--ink); margin-top: 1.4rem; }
dl.defs dd { margin: .35rem 0 0; color: var(--ink-2); }

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 2.6rem 1.25rem 2.2rem;
  font-size: .89rem;
  color: var(--muted);
}
.foot-in { max-width: var(--wrap); margin: 0 auto; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.8rem; margin-bottom: 2rem; }
.foot-cols h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink); margin: 0 0 .75rem; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { margin-bottom: .38rem; }
.foot-cols a { color: var(--ink-2); text-decoration: none; }
.foot-cols a:hover { color: var(--accent); text-decoration: underline; }
.foot-cols address { font-style: normal; line-height: 1.7; }
.foot-legal { border-top: 1px solid var(--line-2); padding-top: 1.4rem; font-size: .82rem; line-height: 1.65; }
.foot-legal p { margin: 0 0 .6rem; }
.foot-legal p:last-child { margin-bottom: 0; }

/* ---------- 404 ---------- */

.center-page { max-width: 44rem; margin: 0 auto; text-align: center; padding: 3.5rem 0; }
.center-page .btn { margin-top: .6rem; }

/* ---------- Utilities ---------- */

.lede-links { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0; }
.lede-links a {
  text-decoration: none; font-size: .88rem; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: .42rem .95rem; color: var(--ink-2);
}
.lede-links a:hover { border-color: var(--accent-ln); color: var(--accent); background: var(--accent-sf); }

.small { font-size: .85rem; color: var(--muted); }
.updated { font-size: .85rem; color: var(--muted); margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
