/* eitamring.github.io - one stylesheet, no build step.
   Cool off-white paper, slate text, single teal accent. */

:root{
  --paper:#f7f9fa;       /* cool off-white, architectural */
  --surface:#eef2f4;     /* code blocks, slightly deeper cool gray */
  --text:#1f2933;        /* dark slate, softer than black */
  --muted:#61707d;       /* secondary text */
  --accent:#0e7570;      /* transformative teal */
  --accent-soft:#d7ebe9; /* teal wash for subtle highlights */
  --line:#dde3e7;        /* hairlines */
  --maxw:680px;
}
*{margin:0;padding:0;box-sizing:border-box}
html{font-size:17px}
body{
  background:var(--paper);
  color:var(--text);
  font-family:Georgia,'Times New Roman',serif;
  line-height:1.65;
}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px}

/* header */
header.site{padding:40px 0 8px}
header.site .brand{display:flex;align-items:center;gap:12px}
header.site .logo{flex:none;display:block}
header.site .name{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:15px;font-weight:700;letter-spacing:.02em;
}
header.site .name a{color:var(--text);text-decoration:none}
header.site .name a:hover{color:var(--accent)}
header.site .tagline{color:var(--muted);font-size:14px;margin-top:2px}
header.site nav{margin-top:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}
header.site nav a{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:13px;color:var(--muted);text-decoration:none;margin-right:18px;
}
header.site nav a:hover{color:var(--accent)}

/* index list */
main{padding:34px 0 60px}
.post-list{list-style:none}
.post-list li{
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;
  padding:10px 0;border-bottom:1px dotted var(--line);
}
.post-list a{color:var(--text);text-decoration:none;font-size:17px}
.post-list a:hover{color:var(--accent);text-decoration:underline}
.post-list time{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12px;color:var(--muted);white-space:nowrap;
}

/* article */
article h1{font-size:30px;line-height:1.2;margin-bottom:6px;font-weight:700}
article .meta{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;color:var(--muted);margin-bottom:30px;
}
article .meta a{color:var(--accent);text-decoration:none}
article h2{font-size:22px;margin:36px 0 12px}
article h3{font-size:18px;margin:28px 0 10px}
article p{margin-bottom:16px}
article a{color:var(--accent)}
article ul,article ol{margin:0 0 16px 24px}
article li{margin-bottom:6px}
article blockquote{
  border-left:3px solid var(--accent);padding-left:16px;margin:0 0 16px;
  color:var(--muted);font-style:italic;
}
article img{max-width:100%;border-radius:6px;margin:8px 0 16px}
article hr{border:none;border-top:1px solid var(--line);margin:32px 0}
article mark{background:var(--accent-soft);padding:1px 4px;border-radius:3px}

/* code */
code{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:.86em;background:var(--surface);
  padding:2px 5px;border-radius:4px;
}
pre{
  background:var(--surface);border:1px solid var(--line);border-radius:8px;
  padding:14px 16px;overflow-x:auto;margin:0 0 18px;line-height:1.55;
}
pre code{background:none;padding:0;font-size:13.5px}

/* line-numbered code with light token tinting (no JS, no highlighter) */
.code-numbered code{counter-reset:line;display:block;white-space:normal}
.code-numbered .ln{display:block;counter-increment:line;padding-left:40px;position:relative;white-space:pre}
.code-numbered .ln::before{
  content:counter(line);position:absolute;left:0;top:0;width:26px;
  text-align:right;color:var(--muted);opacity:.55;font-size:12px;
}
.tok-k{color:var(--accent);font-weight:600}   /* keys, keywords */
.tok-s{color:#8a5a2b}                          /* strings, values */
.tok-n{color:#3b5bb5}                          /* numbers */
.tok-c{color:var(--muted);font-style:italic}   /* comments */

/* flow diagram */
figure.diagram{margin:8px 0 20px;text-align:center}
figure.diagram svg{max-width:100%;height:auto}
figure.diagram figcaption{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12px;color:var(--muted);margin-top:6px;
}

/* tables (benchmarks) */
table{border-collapse:collapse;width:100%;margin:0 0 18px;font-size:14.5px}
th,td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--line)}
th{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);
}
td code{font-size:13px}

/* post layout: toc rail left, article center, repo rail right.
   Rails only appear when the viewport is wide enough to hold all three. */
.post-grid{
  display:grid;
  grid-template-columns:190px minmax(0,var(--maxw)) 190px;
  gap:40px;justify-content:center;padding:0 20px;
}
.rail{
  position:sticky;top:28px;align-self:start;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;line-height:1.5;
}
.rail h4{
  font-size:11px;text-transform:uppercase;letter-spacing:.08em;
  color:var(--muted);font-weight:700;margin-bottom:8px;
}
.toc a{
  display:block;color:var(--muted);text-decoration:none;
  padding:3px 0 3px 10px;border-left:2px solid var(--line);
}
.toc a:hover{color:var(--accent);border-left-color:var(--accent)}
.repos a{
  display:block;color:var(--muted);text-decoration:none;padding:3px 0;
}
.repos a:hover{color:var(--accent)}
.repos .desc{color:var(--muted);font-size:11.5px;margin:-2px 0 6px;opacity:.8}
@media(max-width:1120px){
  .post-grid{display:block;max-width:var(--maxw);margin:0 auto;padding:0}
  .rail{display:none}
}

/* footer */
footer.site{
  border-top:1px solid var(--line);padding:20px 0 50px;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;color:var(--muted);
}
footer.site a{color:var(--muted)}
footer.site a:hover{color:var(--accent)}

@media(max-width:520px){
  html{font-size:16px}
  .post-list li{flex-direction:column;gap:2px}
}

/* ---- cascade playground (posts/classmesh-v1.html), all classes .pg- scoped.
   Reuses the site palette: teal for decided, the .tok-s brown (#8a5a2b) for
   doubt/review, muted for dropped. Light theme only, like the rest. ---- */
.pg{border:1px solid var(--line);border-radius:8px;padding:16px 16px 14px;margin:8px 0 20px}
.pg :focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}
.pg-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pg-form{display:flex;gap:8px}
.pg-form input{
  flex:1;min-width:0;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;font-size:13.5px;
  color:var(--text);background:#fff;border:1px solid var(--line);border-radius:6px;
  padding:9px 12px;
}
.pg-form input::placeholder{color:var(--muted);opacity:.75}
.pg-form button{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:13px;font-weight:700;letter-spacing:.02em;
  background:var(--accent);color:#fff;border:0;border-radius:6px;
  padding:9px 18px;cursor:pointer;
}
.pg-form button:hover{filter:brightness(.92)}
.pg-label{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--muted);margin:14px 0 8px;
}
.pg-presets{display:flex;flex-wrap:wrap;gap:6px 8px}
.pg-preset{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;font-size:12px;
  border:1px solid var(--line);border-radius:999px;background:none;
  color:var(--muted);padding:3px 11px;cursor:pointer;
}
.pg-preset:hover{border-color:var(--accent);color:var(--accent)}
.pg-rules{margin-top:16px;border-top:1px dotted var(--line);padding-top:12px}
.pg-rules summary{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;color:var(--muted);cursor:pointer;
}
.pg-rules summary:hover{color:var(--accent)}
.pg-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:12px}
.pg-colh{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--accent);margin:0 0 6px;
}
.pg-cols ol{
  margin:0 0 0 18px;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12px;line-height:1.55;color:var(--muted);
}
.pg-cols li{margin-bottom:4px}
.pg-cols b{color:var(--text);font-weight:600}
/* the four-step journey: connector line + state dot per station */
.pg-result{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
.pg-steps{list-style:none;margin:0 0 4px;padding:0}
.pg-steps li{position:relative;padding-left:30px;margin:0 0 14px}
.pg-steps li:last-child{margin-bottom:0}
.pg-steps li::before{content:"";position:absolute;left:8px;top:22px;bottom:-14px;
  width:2px;background:var(--line)}
.pg-steps li:last-child::before{display:none}
.pg-steps li::after{content:"";position:absolute;left:3px;top:5px;width:11px;height:11px;
  border-radius:50%;background:var(--paper);border:2px solid var(--line)}
.pg-steps li.pg-hit::after{border-color:var(--accent);background:var(--accent)}
.pg-steps li.pg-esc::after{border-color:#8a5a2b;background:#8a5a2b}
.pg-steps li.pg-skip::after{border-style:dashed}
.pg-steps li.pg-drop::after{border-style:dashed;border-color:var(--muted)}
.pg-stk{display:block;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted)}
.pg-steps li.pg-hit .pg-stk{color:var(--accent)}
.pg-steps li.pg-esc .pg-stk{color:#8a5a2b}
.pg-stv{display:block;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;color:var(--text);margin-top:1px}
.pg-steps li.pg-skip .pg-stv,.pg-steps li.pg-drop .pg-stv,
.pg-steps li.pg-pending .pg-stv{color:var(--muted)}
.pg-steps li.pg-pending{opacity:.45}
@media(prefers-reduced-motion:no-preference){
  .pg-steps li{transition:opacity .25s ease}
}
.pg-json{margin:0 0 10px}
.pg-dest{
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  font-size:12.5px;font-weight:700;margin:0;
}
.pg-dest-ok{color:var(--accent)}
.pg-dest-rev{color:#8a5a2b}
.pg-dest-drop{color:var(--muted)}
@media(max-width:520px){
  .pg-form{flex-direction:column}
  .pg-cols{grid-template-columns:1fr}
}
