/* J-Code — same ink-on-paper family as heinhteaung.com. System fonts only. */
:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --ink: #211d19;
  --muted: #6f695e;
  --line: #d9d2c4;
  --accent: #a63a26;
  --card: #fffdf8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 22px 48px;
}
.kicker {
  margin: 0 0 14px;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
h1 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 12px;
}
/* J brand lettermark (owner, 2026-12-03): capital J with a dot above
   it, drawn as inline SVG (serif J outline + circle) sized so the
   glyph's cap height matches the heading text. Master asset:
   ~/workspace/j-brand/ (j-dot-mark-serif.svg). */
.jdot { width: auto; vertical-align: baseline; }
.jdot-serif { height: 1.352em; vertical-align: -0.312em; }
.standfirst {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 10px;
}
.byline { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; }
.intro { margin: 0; color: #35302a; }
.hero {
  padding-bottom: 30px;
  border-bottom: 2px solid var(--ink);
}
.block {
  padding: 30px 0 6px;
  border-bottom: 1px solid var(--line);
}
.block:last-of-type { border-bottom: none; }
.tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.tab {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 14px 2px 10px;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tools-next {
  font-size: 15.5px;
  color: #35302a;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 4px 0 0;
}
/* Scroll reveal — the Method steps arrive in sequence (JS +
   IntersectionObserver; no-JS readers get the plain static list). */
.js .steps li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .steps li:nth-child(2) { transition-delay: 0.15s; }
.js .steps li:nth-child(3) { transition-delay: 0.3s; }
.js .steps li.inview { opacity: 1; transform: none; }
/* Animated audit illustration (Tools tab): a 10s loop that shows what
   the tool does — scan the file, mark the call that was never written,
   state the finding, type in the fix stub. Pure CSS, no assets. */
.audit-anim { margin: 0 0 4px; }
.aa-code {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #f0ead9;
  border-radius: 4px;
  padding: 14px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.9;
}
.aa-line { display: block; white-space: pre; }
.aa-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.9em;
  background: rgba(166, 58, 38, 0.18);
  border-bottom: 2px solid var(--accent);
  opacity: 0;
  animation: aa-scan 10s linear infinite;
}
@keyframes aa-scan {
  0% { top: 14px; opacity: 0; }
  4% { opacity: 1; }
  30% { top: calc(14px + 5.7em); opacity: 1; }
  42% { top: calc(14px + 5.7em); opacity: 1; }
  50%, 100% { top: calc(14px + 5.7em); opacity: 0; }
}
.aa-bad {
  border-bottom: 2px solid transparent;
  animation: aa-mark 10s linear infinite;
}
@keyframes aa-mark {
  0%, 40% { border-bottom-color: transparent; }
  48%, 94% { border-bottom-color: var(--accent); }
  100% { border-bottom-color: transparent; }
}
.aa-note {
  color: #e08a70;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 10px;
  opacity: 0;
  animation: aa-note 10s linear infinite;
}
@keyframes aa-note {
  0%, 44% { opacity: 0; }
  52%, 94% { opacity: 1; }
  100% { opacity: 0; }
}
.aa-finding {
  border-left: 3px solid var(--accent);
  background: var(--card);
  padding: 8px 12px;
  margin: 10px 0 0;
  font-size: 15px;
  opacity: 0;
  transform: translateY(6px);
  animation: aa-finding 10s linear infinite;
}
.aa-finding .tag {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes aa-finding {
  0%, 50% { opacity: 0; transform: translateY(6px); }
  58%, 94% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
.aa-fix {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--ink);
  color: #f0ead9;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
}
.aa-fixtext {
  display: inline-block;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation: aa-type 10s linear infinite;
}
@keyframes aa-type {
  0%, 60% { clip-path: inset(0 100% 0 0); opacity: 1; animation-timing-function: steps(36, end); }
  88%, 94% { clip-path: inset(0 0 0 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
.aa-caption { font-size: 13.5px; color: var(--muted); margin: 8px 0 16px; }
.demo-video { display: block; width: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--ink); margin: 18px 0 0; }
h2 {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 16px;
}
h3.sub {
  font-size: 15px;
  margin: 22px 0 10px;
  font-weight: 700;
}
.block p { margin: 0 0 14px; }
.steps { margin: 0 0 14px; padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.checks { margin: 0 0 14px; padding-left: 22px; }
.checks li { margin-bottom: 7px; }
.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--ink);
  color: #f0ead9;
  padding: 16px 18px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0 0 6px;
  white-space: pre;
}
.proof {
  border: 1px solid var(--ink);
  background: var(--card);
  padding: 18px 20px 8px;
  margin-bottom: 16px;
}
.proof-head {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 18px;
  margin: 0 0 10px !important;
}
.proof-list { margin: 0 0 10px; padding-left: 22px; }
.proof-list li { margin-bottom: 7px; }
.honest { color: #35302a; font-size: 15.5px; }
.demo {
  border: 1px solid var(--ink);
  background: var(--card);
  padding: 18px 20px 10px;
  margin-bottom: 16px;
}
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 12px;
  font-size: 14.5px;
  color: var(--muted);
}
.demo-bar select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 6px;
  margin-left: 6px;
}
.demo-file input { margin-left: 6px; font-size: 13.5px; max-width: 220px; }
#demo-code {
  width: 100%;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  background: var(--ink);
  color: #f0ead9;
  border: none;
  border-radius: 4px;
  padding: 14px 16px;
  resize: vertical;
}
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.demo-btn {
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 8px 18px;
  cursor: pointer;
}
.demo-btn[disabled] { opacity: 0.55; cursor: wait; }
.demo-btn-alt { background: transparent; color: var(--accent); }
.demo-result { margin-top: 10px; }
.demo-clean {
  border-left: 3px solid #3d7a3a;
  background: #f2f5ec;
  padding: 8px 12px;
  margin: 8px 0;
}
.demo-err {
  border-left: 3px solid var(--accent);
  background: #faf0ec;
  padding: 8px 12px;
  margin: 8px 0;
}
.demo-count {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 17px;
  margin: 10px 0 6px;
}
.demo-findings { list-style: none; margin: 0 0 10px; padding: 0; }
.demo-findings li {
  border-left: 3px solid var(--accent);
  background: var(--paper);
  padding: 8px 12px;
  margin-bottom: 8px;
}
.demo-findings .tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo-findings .fl { font-weight: 700; }
.demo-findings .fx { display: block; color: #35302a; font-size: 15px; margin-top: 3px; }
.demo .demo-note { font-size: 13.5px; color: var(--muted); margin: 8px 0 6px; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid #d8a294; }
a:hover { border-bottom-color: var(--accent); }
.foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
}
.foot p { margin: 0; }
.foot a { color: var(--muted); border-bottom-color: var(--line); }
@media (max-width: 520px) {
  .page { padding: 40px 18px 36px; }
  h1 { font-size: 38px; }
  .standfirst { font-size: 19px; }
  body { font-size: 16px; }
  .code { font-size: 12px; }
  .aa-code { font-size: 12px; }
  .aa-fix { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .steps li { opacity: 1; transform: none; transition: none; }
  .aa-scan { display: none; }
  .aa-bad { border-bottom-color: var(--accent); animation: none; }
  .aa-note { opacity: 1; animation: none; }
  .aa-finding { opacity: 1; transform: none; animation: none; }
  .aa-fixtext { clip-path: none; animation: none; }
}

/* Drop-in file download block (Tools tab) */
.dl-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.dl-btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 8px 18px;
  text-decoration: none;
}
.dl-meta { color: var(--muted); font-size: 14px; }
.dl-cmds {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14.5px;
  overflow-x: auto;
  margin: 0 0 14px;
}
