/* Kinetrixa — single stylesheet. Warm paper palette, border-led separation,
   sharp corners, asymmetric content column plus notes rail. */

:root {
  --paper: #faf6ef;
  --paper-tint: #f1e9da;
  --paper-deep: #e8dcc6;
  --ink: #221e19;
  --ink-soft: #4b4238;
  --line: #cfc2ab;
  --line-strong: #9d8f77;
  --rust: #8f3a12;
  --rust-deep: #6f2c0c;
  --moss: #2f5535;
  --step-0: 1rem;
  --step-1: 1.15rem;
  --step-2: 1.4rem;
  --step-3: 1.75rem;
  --step-4: 2.2rem;
  --gap: 1.35rem;
  --gap-lg: 2.7rem;
  --radius: 2px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--font);
  overflow-wrap: break-word;
}

a { color: var(--rust-deep); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--rust); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip:focus { left: 0; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper-tint);
  border-bottom: 1px solid var(--line-strong);
}

.bar {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 600 var(--step-1)/1.2 var(--font-head);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--ink);
  color: var(--paper);
  font: 600 1.05rem/1 var(--font-head);
  border-radius: var(--radius);
}

.navtoggle {
  font: 500 0.95rem/1 var(--font);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.sitenav { border-top: 1px solid var(--line); }
.sitenav[hidden] { display: none; }

.sitenav ul {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0.4rem 1rem 0.7rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  font-size: 0.93rem;
}

.sitenav a {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.sitenav a:hover { color: var(--rust-deep); border-bottom-color: var(--line-strong); }
.sitenav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rust); }

/* ---------- layout ---------- */

main {
  max-width: 68rem;
  margin: 0 auto;
  padding: var(--gap-lg) 1rem 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap-lg);
  align-items: start;
}

@media (min-width: 62rem) {
  main { grid-template-columns: minmax(0, 1fr) 16.5rem; }
  main > .rail { position: sticky; top: 7.5rem; }
}

article { min-width: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6rem;
}

h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); margin-top: var(--gap-lg); }
h3 { font-size: var(--step-2); margin-top: var(--gap); }
h4 { font-size: var(--step-1); margin-top: var(--gap); }

p, ul, ol, dl, table, figure { margin: 0 0 var(--gap); }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  border-left: 3px solid var(--rust);
  padding-left: 0.9rem;
}

.meta {
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
  margin-bottom: var(--gap);
}

/* ---------- body units ---------- */

.keypoints {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 1rem 0;
  margin-bottom: var(--gap-lg);
}
.keypoints li { margin: 0; padding-left: 1.6rem; position: relative; }
.keypoints li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rust);
}

.disclosure {
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-left: 5px solid var(--rust);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: var(--gap-lg);
}
.disclosure h2 { margin: 0 0 0.5rem; font-size: var(--step-2); }
.disclosure p:last-child { margin-bottom: 0; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-tint);
  padding: 1.1rem 1.2rem;
  margin-bottom: var(--gap);
}
.panel > :last-child { margin-bottom: 0; }
.panel h2, .panel h3 { margin-top: 0; }

.panel-watch { border-left: 5px solid var(--rust); background: #f7ece1; }
.panel-method { border-left: 5px solid var(--moss); }
.panel-quick { border: 2px solid var(--line-strong); background: var(--paper); }

.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 0.75rem;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: var(--radius);
}
.checklist strong { display: block; }

.worked {
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: var(--gap);
}
.worked > :last-child { margin-bottom: 0; }
.worked .tag {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

dl.terms dt { font-weight: 600; margin-top: 0.9rem; }
dl.terms dd { margin: 0.2rem 0 0; color: var(--ink-soft); }

.tablewrap { overflow-x: auto; margin-bottom: var(--gap); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-bottom: 0.5rem;
}
th, td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
thead th { background: var(--paper-deep); }

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  background: var(--paper-tint);
}
summary {
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  font-weight: 600;
}
details[open] summary { border-bottom: 1px solid var(--line); }
details .inner { padding: 0.9rem; }
details .inner > :last-child { margin-bottom: 0; }

/* ---------- affiliate link ---------- */

.cta-block {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: var(--paper-tint);
  margin-bottom: var(--gap);
}
.cta-block > :last-child { margin-bottom: 0; }

.cta {
  display: inline-block;
  background: var(--rust-deep);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.cta:hover { background: var(--rust); color: #fff; text-decoration: underline; }

.cta-note { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.7rem; }

/* ---------- rail ---------- */

.rail {
  font-size: 0.93rem;
  border-top: 3px solid var(--ink);
  padding-top: 0.9rem;
}
.rail h2 { font-size: var(--step-1); margin: 0 0 0.5rem; }
.rail h2 + p, .rail ol, .rail ul { margin-bottom: 1.4rem; }
.rail ol, .rail ul { padding-left: 1.2rem; }
.rail li { margin-bottom: 0.35rem; }
.rail .box {
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
  margin-bottom: 1.4rem;
  background: var(--paper-tint);
}
.rail .box > :last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--line-strong);
  background: var(--paper-tint);
}

.foot-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.2rem 1rem 3rem;
  display: grid;
  gap: var(--gap-lg);
}
@media (min-width: 52rem) {
  .foot-inner { grid-template-columns: 1fr 1.2fr; }
}

.footnav h2 { font-size: var(--step-1); margin: 0 0 0.6rem; }
.footnav ul { list-style: none; padding: 0; margin: 0; font-size: 0.93rem; }
.footnav li { margin-bottom: 0.35rem; }

.publisher { font-size: 0.93rem; }
.publisher p { margin: 0 0 0.25rem; }
.publisher .pub-name { font: 600 var(--step-1)/1.3 var(--font-head); margin-bottom: 0.4rem; }
.publisher .polnav { margin: 0.7rem 0; }
.publisher .tm { color: var(--ink-soft); margin: 0.7rem 0; }

svg.figure { display: block; width: 100%; height: auto; margin-bottom: var(--gap); border: 1px solid var(--line); background: var(--paper-tint); }

.small { font-size: 0.9rem; color: var(--ink-soft); }

@media (min-width: 48rem) {
  .navtoggle { display: none; }
  .sitenav[hidden] { display: block; }
}
