:root {
  color-scheme: light;
  --ink: #14231b;
  --text: #415749;
  --paper: #f7f9f2;
  --cream: #edf2e6;
  --night: #132019;
  --edge: #d1dbce;
  --bright: #d5ee93;
  --green: #255b43;
  --mint: #adcbad;
  --amber: #a96728;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.8 var(--sans); }
html { scroll-padding-top: 16px; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.24; }
h2 { font-size: clamp(1.9rem,4vw,3.05rem); letter-spacing: -.045em; font-weight: 820; }
h3 { font-size: 1.2rem; font-weight: 810; }
a { color: inherit; }
a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid #697f35; outline-offset: 3px; }
code, .mono { font-family: var(--mono); }
code { color: #25543d; }
.wrap { width: min(1170px, calc(100% - 96px)); margin-inline: auto; }
.section { padding-block: clamp(58px,7vw,97px); }
.skip { position: absolute; z-index: 3; top: 6px; left: 6px; padding: 6px 12px; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.header { color: white; background: var(--night); border-bottom: 1px solid #445548; }
.head, .footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 6px 25px; min-height: 74px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 6px; text-decoration: none; font: 820 1.3rem/1 var(--mono); letter-spacing: -.045em; white-space: nowrap; }
.brand-sep { color: var(--bright); }
.symbol { display: grid; grid-template-columns: repeat(2, 5px); gap: 3px; padding: 6px; margin-right: 4px; border: 1px solid #86a288; border-radius: 4px; }
.symbol i { height: 5px; background: var(--bright); }
.symbol i:nth-child(2) { opacity: .35; }
.head nav, .footer nav { display: flex; flex-wrap: wrap; gap: 0 clamp(12px,2vw,29px); }
.head nav a, .footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .9rem; font-weight: 670; }
.head nav a:hover, .footer nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.language-switch { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid #68816a; border-radius: 7px; color: var(--bright); font-size: .9rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.language-switch:hover { background: #344c36; }
.hero { background: radial-gradient(ellipse at 83% 38%, #293c2a 0%, transparent 61%), var(--night); color: white; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.19fr) minmax(0,.81fr); gap: clamp(20px,6vw,88px); align-items: center; padding-block: clamp(54px,7vw,111px); }
.label { color: #3a6144; font-size: .87rem; font-weight: 790; letter-spacing: .085em; }
.hero .label { color: #c1d5b4; }
.hero h1 { font-size: clamp(2.25rem,4.55vw,4.3rem); line-height: 1.15; margin-block: 15px 19px; letter-spacing: -.055em; font-weight: 850; }
.hero h1:lang(en) { font-size: clamp(2.1rem,4.05vw,3.95rem); text-wrap: balance; }
.hero h1 em { color: var(--bright); font-style: normal; }
.lead { max-width: 540px; color: #dde9dc; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { font: 770 .93rem/1.45 var(--sans); min-height: 49px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; text-decoration: none; }
.bright { color: #172410; background: var(--bright); }
.bright:hover { background: #e4f5b5; }
.pale-outline { color: white; border-color: #93a286; }
.pale-outline:hover { background: #344c36; }
.bit-card { width: min(100%,354px); justify-self: center; border: 1px solid #68816a; border-radius: 15px; padding: clamp(13px,2vw,22px); background: #17231b; }
.bit-card figcaption { display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: space-between; font-size: .86rem; color: #ebf2e8; font-weight: 730; }
.bit-card .mono { color: #acccae; white-space: nowrap; }
.bit-grid { display: grid; width: 100%; aspect-ratio: 1; grid-template-columns: repeat(16,minmax(0,1fr)); grid-template-rows: repeat(16,minmax(0,1fr)); gap: clamp(2px,.37vw,5px); margin-top: 11px; }
.bit-grid span { border-radius: 2px; background: #2b4432; }
.bit-grid span.changed { background: #bada80; }
.bit-result { line-height: 1.2; margin-top: 12px; color: #e3ecdf; font-size: .88rem; }
.bit-result strong { color: var(--bright); font: 800 1.87rem/1.2 var(--mono); }
.bit-note { margin-top: 4px; font-size: .82rem; color: #bdd0bb; }
.section-top { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: end; gap: 10px 38px; margin-bottom: 24px; }
.section-top h2 { margin-top: 6px; }
.section-top > p, .method-note { color: var(--text); }
.experiment { border: 1px solid var(--edge); border-radius: 14px; padding: clamp(16px,3.3vw,35px); background: #fff; }
.experiment-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 11px 17px; margin-bottom: 21px; }
.experiment-head p, .note { color: var(--text); font-size: .9rem; }
label { display: block; font-size: .88rem; font-weight: 780; }
select, input { margin-top: 5px; min-height: 45px; border: 1px solid #829485; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; padding: 5px 9px; }
select { display: block; min-width: 124px; font: 720 .93rem/1 var(--mono); }
.metrics { display: grid; gap: 12px; }
.metric-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.metric-label strong { font: 800 1.13rem/1.2 var(--mono); }
.track { height: 13px; background: #e9eee7; border-radius: 3px; margin-top: 5px; }
.bar { height: 100%; width: var(--ratio,0%); border-radius: 3px; background: #368058; }
.bar.random { background: var(--amber); }
.method-note { margin-top: 15px; max-width: 79ch; }
.imprint { background: var(--cream); border-block: 1px solid var(--edge); }
.imprint-grid { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); gap: 14px; }
.imprint-grid article { padding: clamp(16px,3.1vw,29px); border-radius: 12px; border: 1px solid #bdcbbc; }
.imprint-grid h3 { margin-bottom: 10px; }
.imprint-grid article p + p { margin-top: 8px; }
.hypothesis { background: #f8fbf5; }
.imprint-card { color: white; background: #20372a; }
.imprint-card p:not(.mark-formula) { color: #e1ede0; }
.mark-formula { color: var(--bright); font-size: clamp(1.05rem,2.2vw,1.65rem); font-weight: 800; overflow-wrap: anywhere; }
.mark-formula span { color: #bcd6be; }
.text-link { display: inline-flex; align-items: center; font-weight: 750; min-height: 44px; text-underline-offset: .23em; color: var(--bright); }
details { margin-top: 12px; border-top: 1px solid var(--edge); }
summary { cursor: pointer; color: var(--green); padding: 8px 0; min-height: 42px; font-weight: 740; font-size: .92rem; }
.digest { margin-bottom: 8px; }
.digest dt { font-size: .9rem; font-weight: 750; }
.digest dd { overflow-wrap: anywhere; margin-bottom: 7px; }
.protocol { margin-top: 25px; }
.protocol ol { list-style: none; padding: 0; border-top: 1px solid #becbbc; margin-block: 10px 0; }
.protocol li { display: grid; grid-template-columns: 135px 1fr; gap: 3px 12px; padding: 8px 0; border-bottom: 1px solid #becbbc; color: var(--text); }
.protocol li strong { color: var(--ink); font-size: .93rem; }
.collatz { display: grid; grid-template-columns: minmax(0,.65fr) minmax(0,1.35fr); gap: 16px 24px; align-items: start; }
.input-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.input-row input { font-family: var(--mono); width: min(100%,151px); }
.forest { min-height: 45px; background: var(--green); color: white; }
.forest:hover { background: #1a4a33; }
#collatz-status { margin-top: 8px; }
.orbit-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-bottom: 1px solid var(--edge); gap: 5px 12px; padding-bottom: 10px; }
.orbit-metrics dt { color: var(--text); font-size: .86rem; font-weight: 680; }
.orbit-metrics dd { overflow-wrap: anywhere; font: 800 clamp(1.25rem,3vw,1.75rem)/1.35 var(--mono); }
#orbit-plot { display: block; width: 100%; height: 216px; margin-top: 12px; background: #f5f8f3; border-radius: 5px; }
.axis-note { margin-top: 4px; }
.sequence { grid-column: 1/-1; margin: 0; }
.sequence p { word-break: break-word; color: var(--text); font-size: .88rem; }
.footer { color: #e4ede1; background: var(--night); }
.footer-grid { align-items: flex-start; padding-block: 22px; }
.footer-grid p { font-size: .88rem; color: #c4d3bf; }
.footer nav { justify-content: end; }
@media (max-width: 930px) {
  .wrap { width: calc(100% - 54px); }
  .hero-grid { gap: 22px; }
  .bit-card { max-width: 310px; }
}
@media (max-width: 710px) {
  .wrap { width: calc(100% - 34px); }
  .head, .footer-grid { flex-wrap: wrap; padding-block: 10px 0; }
  .head nav { width: 100%; order: 1; }
  .hero-grid, .section-top, .imprint-grid, .collatz { grid-template-columns: 1fr; }
  .hero h1, .hero h1:lang(en) { font-size: clamp(2.1rem,7.5vw,3.6rem); }
  .bit-card { justify-self: start; width: min(100%,285px); }
  .footer-grid { padding-bottom: 13px; }
  .footer nav { justify-content: start; }
  .protocol li { grid-template-columns: 100px 1fr; }
}
