:root {
  --paper: #fff8ec;
  --panel: #fffefa;
  --ink: #183e3b;
  --muted: #61716b;
  --line: #d9dfd5;
  --accent: #bc542e;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4vw; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--sans); font-size: 17px; font-weight: 600; text-decoration: none; letter-spacing: -.7px; }
nav { display: flex; gap: 28px; font-family: var(--sans); font-size: 11px; }
main { max-width: 1480px; margin: auto; padding: 0 4vw 44px; }
.intro { margin: 38px 0 28px; }
h1 { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 49px); font-weight: 500; letter-spacing: -1.6px; line-height: 1.15; margin: 12px 0 14px; }
h2 { font-family: var(--serif); font-size: 20px; line-height: 1.5; font-weight: 600; margin: 0; }
h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0; }
header, .intro, .explore, .survey > summary { color: #242624; }
.intro > p, .explore { font-size: 18px; line-height: 1.6; max-width: 800px; }
.intro > p, .explore > p { margin: 0; }
.explore { margin: 24px 0; }
.explore ol { margin: 8px 0 0; padding-inline-start: 1.5em; }
.explore li + li { margin-top: 6px; }
.katex { font-size: 1em; }
[data-tex] { font-style: normal; }
sub { font-size: .72em; }
.workspace, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.workspace { padding: 18px 22px; }
.catalog-controls { display: grid; grid-template-columns: minmax(190px, 340px) 1fr; align-items: end; gap: 28px; }
.curve-picker { display: flex; align-items: end; gap: 12px; min-width: 0; }
.curve-picker label { flex: 1; min-width: 0; }
.curve-picker .lmfdb-link { display: block; padding-block: 10px; white-space: nowrap; }
label { display: flex; flex-direction: column; gap: 7px; font-family: var(--sans); font-size: 11px; font-weight: 500; }
select { width: 100%; min-width: 0; font-family: var(--sans); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink); padding: 10px 12px; border: 1px solid #c8d0c5; background: var(--panel); border-radius: 4px; }
button, .file-button { font-family: var(--sans); font-size: 11px; font-weight: 500; border-radius: 4px; cursor: pointer; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); background: transparent; }
.data-actions { display: flex; gap: 10px; justify-self: end; }
.file-button { display: inline-flex; align-items: center; justify-content: center; }
input[type=file] { width: 1px; height: 1px; position: absolute; opacity: 0; }
button:disabled { opacity: .5; cursor: wait; }
button:hover:not(:disabled), .file-button:hover { background: #eef1e8; }
:focus-visible, .file-button:focus-within { outline: 2px solid #668b72; outline-offset: 3px; }
.curve-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 24px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.lmfdb-link { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); }
.equation-scroll { overflow-x: auto; max-width: 100%; padding: 4px 0; }
.curve-equation { font-size: 21px; line-height: 1.8; padding: 4px 0; }
.curve-equation .katex { white-space: nowrap; }
.curve-divisors { display: grid; gap: 8px; font-size: 18px; line-height: 1.7; }
.curve-divisor { min-width: 0; overflow-x: auto; }
.method-note { margin: 0; font-size: 17px; line-height: 1.7; color: var(--muted); }
#status { font-size: 12px; line-height: 1.6; margin: 14px 0 0; color: var(--muted); }
#status:empty { display: none; }
#status.error { color: #a33828; }
.plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.panel { padding: 22px; min-width: 0; }
.section-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-label > span { font-family: var(--sans); font-size: 10px; color: var(--muted); }
.section-label > [data-tex] { font-size: 15px; }
.panel-description { min-height: 75px; font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0; max-width: 560px; }
.plot-tools { min-height: 36px; margin-top: 14px; display: flex; align-items: center; gap: 16px; }
.gesture { font-family: var(--sans); font-size: 10px; color: var(--muted); }
.tree-controls, .surface-controls { flex-wrap: wrap; }
.center-control { width: 180px; max-width: 100%; }
.sheet-control { width: 133px; }
.tree-controls select, .surface-controls select { padding: 7px 10px; font-family: inherit; font-size: 11px; }
.check-control { flex-direction: row; align-items: center; gap: 7px; font-size: 11px; }
.check-control input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.text-button { padding: 6px 0; border: 0; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; margin-left: auto; }
.plot { height: 390px; }
.caption { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }
.regulator-panel { margin-top: 22px; }
.matrix-result { margin-top: 24px; }
.matrix-caption { font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0 0 18px; }
.matrix-definition { text-align: center; margin: 0 0 20px; padding: 8px 0; font-size: 17px; }
#matrix-values { max-width: 900px; margin: 0 auto; }
.determinant { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 14px; text-align: center; font-size: 28px; border-top: 1px solid var(--line); padding-top: 24px; margin: 24px 0 4px; }
.determinant-label { font-size: 20px; color: var(--muted); }
.beilinson-panel { margin-top: 20px; padding: 28px 26px; }
.precision-heading { flex-wrap: wrap; }
.precision-control { width: 210px; max-width: 100%; }
.precision-control output { font-variant-numeric: tabular-nums; }
.precision-control input { width: 100%; margin: 0; accent-color: var(--ink); cursor: pointer; }
.conjecture-intro { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.conjecture-equation { text-align: center; font-size: 23px; white-space: nowrap; overflow-x: auto; padding: 12px 0; }
.conjecture-equation .katex { white-space: nowrap; }
.conjecture-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; text-align: center; border-top: 1px solid var(--line); margin: 0; padding: 22px 0 2px; }
.conjecture-values > div { min-width: 0; padding: 0 4px; }
.conjecture-values dt { color: var(--muted); font-size: 16px; }
.conjecture-values dd { margin: 8px 0 0; font-size: 18px; }
.conjecture-number { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.significant-digits { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.conjecture-values.precise { grid-template-columns: 1fr; }
.conjecture-values.precise > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: baseline; gap: 12px; text-align: left; }
.conjecture-values.precise dd { margin: 0; justify-content: flex-start; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th > [data-tex] { font-size: 16px; }
td { padding: 14px 10px; font-family: var(--serif); font-variant-numeric: tabular-nums; border-bottom: 1px solid #e8ebe3; font-size: 14px; white-space: nowrap; }
.regulator-matrix thead [data-tex] { font-size: 20px; color: var(--ink); }
.regulator-matrix th, .regulator-matrix td { text-align: center; }
.regulator-matrix td { font-size: 16px; }
.regulator-matrix tbody th { color: var(--ink); font-size: 16px; }
.complex-value > span { display: block; line-height: 1.5; }
.integral-table { width: min(100%, 760px); margin-inline: auto; text-align: center; }
.integral-table :is(th, td) { text-align: center; }
.integral-table th > [data-tex] { display: block; padding: 5px 0; }
.integral-table tbody td:first-child { font-size: 16px; vertical-align: middle; }
.regulator-matrix tbody tr:last-child > * { border-bottom: 0; }
details { font-size: 14px; color: var(--muted); line-height: 1.8; }
summary { cursor: pointer; color: var(--ink); }
.survey { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.survey > summary { font-family: var(--sans); font-size: 12px; font-weight: 500; }
.path-integrals { margin-top: 18px; color: inherit; font-size: inherit; line-height: normal; }
.path-integrals[open] > summary { margin-bottom: 12px; }
.integral-summary h3 { display: inline-flex; width: calc(100% - 1.5em); align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
#path-label { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); }
.selectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; }
.hint { font-size: 14px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.integral-panel td { vertical-align: top; }
pre { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.curve-table { margin-top: 16px; }
.curve-table tr.selected { background: #edf2e9; }
.curve-table button { padding: 0; border: 0; font-family: var(--sans); text-decoration: underline; text-underline-offset: 4px; }
.curve-table .lmfdb-link { margin-left: 12px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 12px; background: var(--panel); }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .catalog-controls { gap: 18px; }
  .curve-equation { font-size: 18px; }
  .curve-divisors { font-size: 16px; }
  .panel-description { min-height: 88px; }
  .plot { height: 350px; }
}
@media (max-width: 800px) {
  .plots { grid-template-columns: 1fr; }
  .panel-description { min-height: 0; }
  .plot { height: 390px; }
  .catalog-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .curve-overview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .data-actions { flex-direction: row; }
  .selectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conjecture-values { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .conjecture-values.precise > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  nav { gap: 16px; }
}
@media (max-width: 480px) {
  header { align-items: flex-start; padding: 18px 5vw; }
  .wordmark { font-size: 16px; }
  nav { flex-direction: column; gap: 7px; font-size: 10px; }
  main { padding: 0 5vw 32px; }
  .intro { margin-top: 28px; }
  h1 { letter-spacing: -1.1px; }
  .intro > p, .explore { font-size: 16px; }
  .workspace, .panel { padding: 16px; }
  .catalog-controls { gap: 12px; }
  .data-actions { flex-direction: column; gap: 6px; }
  .data-actions > * { padding: 8px 10px; }
  .curve-equation { font-size: 18px; }
  .method-note { font-size: 16px; }
  .plot { height: 330px; }
  h2 { font-size: 18px; }
  .plot-tools { gap: 12px; }
  .sheet-control { width: 118px; }
  .tree-controls select, .surface-controls select, .check-control, .text-button { font-size: 10px; }
  .regulator-matrix td { font-size: 11.5px; padding: 12px 4px; }
  .regulator-matrix th { padding: 12px 4px; }
  .regulator-matrix tbody th { font-size: 12px; }
  .conjecture-values { grid-template-columns: minmax(0, 1fr); }
}

.divisor-cell { min-width: 280px; max-width: 650px; white-space: normal; }
.divisor-cell > div { padding: 5px 0; overflow-x: auto; }
.tree-controls select { font-size: 14px; }
.center-control { width: 260px; }

.fibre-panel { margin-top: 22px; }
.fibre-panel .caption { overflow-wrap: anywhere; }
.fibre-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.fibre-controls label { min-width: 110px; }
.fibre-controls label > [data-tex] { display: inline; }
#fibre-prime { width: 140px; }
#fibre-status:empty, #fibre-error:empty { display: none; }
.fibre-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 16px; }
.fibre-layout > * { min-width: 0; }
.fibre-plot { overflow-x: auto; }
.fibre-diagram { position: relative; }
.fibre-diagram svg { position: absolute; inset: 0; display: block; }
.fibre-edge { fill: none; stroke: #82968a; stroke-width: 1.75; }
.fibre-label-guide { stroke: #a8b6ac; stroke-width: 1; stroke-dasharray: 2 3; }
.fibre-node { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; }
.fibre-node:hover:not(:disabled) { outline: 2px solid #668b72; outline-offset: 2px; }
.fibre-node-note { position: absolute; width: max-content; max-width: min(230px, calc(100% - 16px)); overflow-x: auto; background: var(--panel); padding: 3px 5px; font-size: 13px; line-height: 1.4; }
.fibre-node-name { font-family: var(--sans); font-size: 11px; color: var(--muted); white-space: nowrap; }
.fibre-node-name .katex { color: var(--ink); }
.fibre-point { margin-top: 3px; }
#fibre-unresolved ul { margin: 4px 0 0; padding-inline-start: 20px; }
#fibre-unresolved { overflow-x: auto; }
.fibre-charge-editor { border-inline-start: 1px solid var(--line); padding-inline-start: 20px; }
.fibre-charge-editor input { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid #c8d0c5; border-radius: 4px; padding: 7px 9px; }
.fibre-charge-scroll { max-height: 280px; overflow: auto; margin: 12px 0; }
.fibre-charge-scroll th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.fibre-charge-scroll td, .fibre-charge-scroll th { padding: 7px 10px; }
.fibre-charge-editor input { width: 100px; font-size: 14px; }
.fibre-charge-editor input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.fibre-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.fibre-solution { max-width: 820px; margin: 22px auto 0; padding: 16px clamp(12px, 3vw, 24px); border: 1px solid var(--line); border-radius: 6px; text-align: start; }
.fibre-solution > p { margin: 6px 0 0; }
.fibre-solution > .equation-scroll { text-align: center; }
.fibre-solution > .fibre-verdict { margin-top: 14px; font-weight: 600; color: #267f71; }
.fibre-verdict-prime { white-space: nowrap; }
.fibre-verdict.nonzero, .fibre-panel .error { color: #a33828; }
@media (max-width: 800px) {
  .fibre-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .fibre-charge-editor { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 14px; }
}
