/* FTO Reference page styles. Shared tokens come from styles.css. */
main{padding-top:2rem;}
.masthead p.sub{margin:0.35rem 0 0;color:rgba(255,255,255,0.78);font-size:0.95rem;}

.ref-card{
  background:var(--paper-raised);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:1.1rem 1.2rem;
  margin:0 0 1rem;
}
.ref-muted{color:var(--ink-soft);margin:0;}
.ref-build{font-family:'IBM Plex Mono',monospace;font-size:0.7rem;letter-spacing:0.04em;}

.ref-search{
  display:flex;align-items:center;gap:0.6rem;
  background:var(--paper-raised);
  border:1px solid var(--line-strong);
  border-radius:999px;
  padding:0.55rem 0.9rem;
  margin:0 0 1.1rem;
}
.ref-search svg{width:18px;height:18px;color:var(--ink-soft);flex:none;}
.ref-search input{
  flex:1;border:0;background:transparent;color:var(--ink);
  font:inherit;font-size:1rem;outline:none;min-width:0;
}
.ref-search input::placeholder{color:var(--ink-soft);}

.ref-intro{color:var(--ink-soft);margin:0 0 1rem;font-size:0.95rem;line-height:1.5;}

.problem-list{list-style:none;margin:0;padding:0;display:grid;gap:0.7rem;}
.problem-tile{
  display:block;text-decoration:none;color:inherit;
  background:var(--paper-raised);
  border:1px solid var(--line);
  border-left:5px solid var(--pine);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:0.95rem 1.1rem;
  transition:transform 0.08s ease, border-color 0.12s ease;
}
.problem-tile:hover,.problem-tile:focus-visible{border-color:var(--pine);transform:translateY(-1px);}
.problem-tile .num{
  font-family:'IBM Plex Mono',monospace;font-size:0.7rem;font-weight:700;
  letter-spacing:0.08em;text-transform:uppercase;color:var(--gold-text);
}
.problem-tile h2{font-family:'Fraunces',serif;font-weight:600;font-size:1.15rem;margin:0.15rem 0 0.3rem;line-height:1.25;color:var(--pine);}
.problem-tile p{margin:0;color:var(--ink-soft);font-size:0.93rem;line-height:1.45;}
.problem-empty{color:var(--ink-soft);padding:1rem 0.2rem;}

.entry-back{
  display:inline-flex;align-items:center;gap:0.35rem;
  color:var(--pine);text-decoration:none;font-weight:600;font-size:0.9rem;margin:0 0 0.8rem;
}
.entry-back svg{width:16px;height:16px;}
.entry-back:hover{text-decoration:underline;}

.entry-head{margin:0 0 1.1rem;}
.entry-head .num{
  font-family:'IBM Plex Mono',monospace;font-size:0.72rem;font-weight:700;
  letter-spacing:0.08em;text-transform:uppercase;color:var(--gold-text);
}
.entry-head h2{font-family:'Fraunces',serif;font-weight:600;font-size:1.65rem;line-height:1.2;margin:0.2rem 0 0.6rem;color:var(--pine);}
.entry-head .looks{
  margin:0;padding:0.8rem 1rem;
  background:var(--pine-tint);border-radius:var(--radius);
  color:var(--ink);line-height:1.5;font-size:1rem;
}
.entry-head .looks strong{color:var(--pine);}

.entry-section{
  background:var(--paper-raised);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:1rem 1.2rem 0.9rem;
  margin:0 0 0.9rem;
}
.entry-section h3{
  font-family:'Fraunces',serif;font-weight:600;font-size:1.15rem;
  margin:0 0 0.6rem;color:var(--ink);
}
.entry-section h4{
  font-family:'IBM Plex Mono',monospace;font-size:0.72rem;font-weight:700;
  letter-spacing:0.08em;text-transform:uppercase;color:var(--gold-text);
  margin:0.8rem 0 0.4rem;
}
.entry-section h4:first-of-type{margin-top:0;}
.entry-section ul,.entry-section ol{margin:0;padding-left:1.25rem;}
.entry-section li{margin:0 0 0.55rem;line-height:1.5;}
.entry-section li:last-child{margin-bottom:0;}
.entry-section ol li::marker{font-weight:700;color:var(--pine);}
.entry-section a{color:var(--pine);font-weight:600;}
.entry-section.next{border-left:5px solid var(--pine);}
.entry-section.else{border-left:5px solid var(--gold);}

.entry-nav{display:flex;justify-content:space-between;gap:1rem;margin:1.2rem 0 0;}
.entry-nav a{
  flex:1;text-decoration:none;color:var(--pine);font-weight:600;font-size:0.9rem;
  padding:0.75rem 0.9rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-raised);
}
.entry-nav a.next-link{text-align:right;}
.entry-nav a span{display:block;color:var(--ink-soft);font-weight:500;font-size:0.75rem;margin-bottom:0.15rem;}
.entry-nav a:hover{border-color:var(--pine);}

.scale{width:100%;border-collapse:collapse;margin:0;}
.scale td{padding:0.5rem 0.4rem;border-top:1px solid var(--line);vertical-align:top;line-height:1.45;}
.scale tr:first-child td{border-top:0;}
.scale td.n{
  font-family:'IBM Plex Mono',monospace;font-weight:700;color:var(--pine);
  width:2rem;text-align:center;
}
.axis{margin:0 0 0.8rem;}
.axis:last-child{margin-bottom:0;}
.axis strong{display:block;color:var(--pine);margin-bottom:0.15rem;}
.axis p{margin:0;line-height:1.5;}

@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .entry-head .looks{background:rgba(255,255,255,0.06);}
  :root:not([data-theme="light"]) .problem-tile .num,
  :root:not([data-theme="light"]) .entry-head .num,
  :root:not([data-theme="light"]) .entry-section h4{color:#E3C45A;}
  :root:not([data-theme="light"]) .problem-tile h2,
  :root:not([data-theme="light"]) .entry-head h2,
  :root:not([data-theme="light"]) .axis strong,
  :root:not([data-theme="light"]) .scale td.n{color:#9DB4E8;}
}
[data-theme="dark"] .entry-head .looks{background:rgba(255,255,255,0.06);}
[data-theme="dark"] .problem-tile .num,
[data-theme="dark"] .entry-head .num,
[data-theme="dark"] .entry-section h4{color:#E3C45A;}
[data-theme="dark"] .problem-tile h2,
[data-theme="dark"] .entry-head h2,
[data-theme="dark"] .axis strong,
[data-theme="dark"] .scale td.n{color:#9DB4E8;}
