@font-face {
  font-family: Bench Display;
  src: url("bench-display.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f7f0;
  --white: #fdfcf7;
  --ink: #172d23;
  --muted: #4c5d53;
  --line: #d1d5c9;
  --soft: #e7eae0;
  --orange: #bd4f27;
  --green: #223d30;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Bench Display", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.7 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid #d26137; outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3, h4, figure, dl { margin: 0; }
[id] { scroll-margin-top: 1.75rem; }
.container { width: min(1184px, calc(100% - 96px)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; top: 1rem; left: 1rem; background: var(--white); padding: .5rem .75rem; }

.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead-row, .footer-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.05rem; letter-spacing: .05em; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark { background: var(--green); display: grid; grid-template-columns: repeat(2, 5px); place-content: center; gap: 4px; width: 32px; height: 32px; rotate: -6deg; }
.brand-mark i { aspect-ratio: 1; border: 1px solid #f9f8ef; }
.brand-mark i:nth-child(2) { background: #ee855b; border-color: #ee855b; }
.masthead nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.7rem); }
.masthead nav a { font-size: .92rem; text-decoration: none; padding-block: .35rem; }
.masthead nav a:hover, .text-link:hover { color: var(--orange); }
.header-action { border: 1px solid #aab6aa; padding: .31rem .85rem; text-decoration: none; font-size: .87rem; white-space: nowrap; }
.header-action span { font-size: 1rem; margin-right: .2rem; color: var(--orange); }
.header-action:hover { background: var(--white); border-color: var(--ink); }

.hero {
  background-image: linear-gradient(90deg, rgba(51, 84, 66, .055) 1px, transparent 1px), linear-gradient(rgba(51, 84, 66, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center -1px;
  border-bottom: 1px solid var(--line);
}
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); gap: clamp(2rem, 6vw, 5.1rem); align-items: center; padding-block: 65px 57px; }
.hero-copy { padding-bottom: .75rem; }
.eyebrow { display: flex; align-items: center; gap: .7rem; color: #425649; font-size: .86rem; font-weight: 700; letter-spacing: .18em; }
.dash { width: 24px; height: 2px; background: var(--orange); }
.hero h1 { font: 700 clamp(5.1rem, 8vw, 7.55rem)/1.04 var(--serif); letter-spacing: -.07em; margin-block: 19px 23px; }
.hero-stop { display: inline-block; width: .12em; height: .12em; margin-left: .21em; background: var(--orange); vertical-align: .055em; }
.hero-intro { font-size: clamp(1.13rem, 2vw, 1.38rem); font-weight: 700; line-height: 1.6; }
.hero-detail { margin-top: .55rem; max-width: 31rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .62rem 1.08rem; min-height: 43px; gap: .48rem; border: 1px solid transparent; font-size: .91rem; line-height: 1.45; font-weight: 700; white-space: nowrap; text-decoration: none; }
.button.primary { background: var(--green); color: #fffef7; }
.button.primary:hover { background: #365545; }
.button.secondary { background: var(--paper); color: var(--ink); border-color: #aab6aa; }
.button.secondary:hover:not(:disabled) { background: var(--white); border-color: var(--green); }
.wave-icon { font-family: Georgia, serif; font-size: 1.55em; line-height: .66; }
.hero-visual { min-width: 0; padding: 6px 6px 0; }
.photo-frame { background: #244634; position: relative; }
.photo-frame img { width: 100%; height: auto; aspect-ratio: 1.08; display: block; object-fit: cover; object-position: center 53%; }
.photo-angle { position: absolute; width: 33px; height: 33px; pointer-events: none; }
.angle-top { top: -7px; left: -7px; border-top: 1px solid var(--orange); border-left: 1px solid var(--orange); }
.angle-bottom { bottom: -7px; right: -7px; border-bottom: 1px solid var(--orange); border-right: 1px solid var(--orange); }
.hero-visual figcaption { margin-top: 15px; display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .79rem; }
.caption-rule { flex: 1; height: 1px; background: #bfc8bd; }
.hero-visual .mono { letter-spacing: .12em; }

.section { padding-block: 4rem 0; }
.section-heading { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.35rem; }
.section-heading h2 { font: 700 2.18rem/1.28 var(--serif); }
.section-rule { height: 1px; flex: 1; background: var(--line); margin-left: .6rem; }
.section-symbol { flex: 0 0 21px; color: var(--orange); position: relative; }
.chip-icon { height: 17px; border: 1px solid currentColor; scale: .75; }
.chip-icon::before, .chip-icon::after { content: ""; position: absolute; top: 3px; width: 4px; height: 1px; background: currentColor; box-shadow: 0 4px, 0 8px; }
.chip-icon::before { left: -5px; }
.chip-icon::after { right: -5px; }
.note-icon { height: 20px; border: 1px solid currentColor; scale: .75; }
.note-icon::after { content: ""; position: absolute; inset: 5px 4px auto; height: 1px; background: currentColor; box-shadow: 0 4px, 0 8px; }

.platform-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; }
.hardware-card, .learning-card { background: var(--white); border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2.1rem); min-width: 0; }
.hardware-card { background: #edf0e6; border-top: 2px solid var(--green); }
.platform h3, .lab h3 { font: 700 clamp(1.6rem, 2.5vw, 2rem)/1.35 var(--serif); }
.project-type { color: #546656; font-size: .87rem; font-weight: 700; letter-spacing: .09em; margin-bottom: .4rem; }
.platform-description { color: var(--muted); margin-top: .5rem; }
.hardware-list { margin-block: 1.25rem; font-size: .93rem; }
.hardware-list div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; border-bottom: 1px solid #cad2c5; padding-block: .52rem; }
.hardware-list div:first-child { border-top: 1px solid #cad2c5; }
.hardware-list dd { margin: 0; font: 700 .93rem/1.5 var(--mono); }
.hardware-list a, .text-link { text-underline-offset: .28em; text-decoration-thickness: 1px; }
.hardware-list a:hover { color: var(--orange); }
.bench-equipment h4 { font-weight: 700; font-size: .91rem; margin-bottom: .25rem; }
.bench-equipment p { color: var(--muted); font-size: .93rem; }
.sampling-link { margin-top: .65rem; }
.sampling-card {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  padding: clamp(1rem, 3vw, 2rem);
}
.sampling-card h3 { font: 700 1.45rem/1.4 var(--sans); }
.sampling-card h4 { margin: 1.35rem 0 .5rem; font-size: 1rem; }
.sampling-table { border: 1px solid var(--line); }
.sampling-table table { min-width: 15rem; font-size: .91rem; font-variant-numeric: tabular-nums; }
.sampling-table th, .sampling-table td { width: 33.33%; padding: .55rem clamp(.35rem, 1.3vw, .7rem); }
.sampling-table tbody th { background: transparent; }
.sampling-table tbody tr:nth-child(even) { background: #f6f7f1; }
.sampling-table tbody tr:last-child > * { border-bottom: 0; }
.learning-card h3 { border-bottom: 1px solid var(--line); padding-bottom: .65rem; }
.learning-list { list-style: none; padding: 0; margin: .35rem 0 0; }
.learning-list li { position: relative; padding: .43rem 0 .43rem .95rem; }
.learning-list li::before { content: ""; position: absolute; top: .98rem; left: 0; width: 4px; height: 4px; background: var(--orange); }
.learning-list strong, .learning-list span { display: block; }
.learning-list span { color: var(--muted); font-size: .91rem; }
.bench-check { margin-top: 1rem; border: 1px solid #cacebd; background: #f0f0e5; }
.bench-check summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .72rem 1rem; font-weight: 700; }
.check-indicator { display: grid; place-content: center; border: 1px solid currentColor; color: #a44220; width: 1.2rem; height: 1.2rem; font: 700 .84rem/1 var(--mono); }
.bench-check .note-body { padding: 0 1.25rem 1rem; }
.bench-check ul { padding-left: 1.25rem; margin: 0 0 .65rem; }
.bench-check li + li { margin-top: .35rem; }

.project-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border: 1px solid var(--line); }
.project-summary, .project-next { padding: clamp(1.25rem, 3.2vw, 2.4rem); }
.project-summary h3 { font: 700 clamp(1.65rem, 3.2vw, 2.52rem)/1.36 var(--serif); margin-bottom: .7rem; }
.project-summary > p:not(.project-type), .project-next > p:not(.project-status) { color: var(--muted); }
.project-next { background: #edf0e6; border-left: 1px solid var(--line); }
.project-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; line-height: 1.4; padding: .25rem .57rem; color: #7a381e; background: #f7e5d9; }
.project-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.project-next h4 { font-size: 1.12rem; margin: .6rem 0 .3rem; }
.project-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.45rem 0 0; padding: .85rem 0 0; list-style: none; border-top: 1px solid var(--line); }
.project-metrics li + li { border-left: 1px solid var(--line); padding-left: 1rem; }
.project-metrics strong, .project-metrics span { display: block; }
.project-metrics strong { font: 700 2.15rem/1.2 var(--mono); }
.project-metrics span { font-size: .86rem; color: var(--muted); }
.evidence-list { margin-block: .8rem; font-size: .9rem; }
.evidence-list div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .4rem; border-top: 1px solid var(--line); padding-block: .4rem; }
.evidence-list dt { font-weight: 700; }
.evidence-list dd { margin: 0; color: var(--muted); }
.text-link { font-size: .9rem; font-weight: 700; }
.text-link .mono { font-size: .77rem; margin-left: .3rem; }

.journal { margin-top: 1rem; border: 1px solid var(--line); background: var(--white); padding: clamp(1rem, 3vw, 1.7rem); }
.journal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.journal-heading h3 { font-size: 1.18rem; }
.journal-heading p { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.journal-fields { display: grid; grid-template-columns: 1fr 1fr 1.18fr 1.28fr auto; align-items: end; gap: .65rem; margin-block: 1.05rem; }
.journal-fields label { display: grid; gap: .3rem; min-width: 0; font-size: .88rem; font-weight: 700; }
.journal-fields input, .journal-fields select { width: 100%; min-height: 43px; border: 1px solid #aab6aa; padding: .45rem .55rem; border-radius: 0; background-color: var(--white); color: var(--ink); font-size: 1rem; font-weight: 400; }
.journal-fields select { appearance: none; padding-right: 1.7rem; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.journal-fields input::placeholder { color: #626b62; }
.empty-log { color: var(--muted); padding: .7rem 0 0; border-top: 1px solid var(--line); font-size: .9rem; }
.table-frame { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th, td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #edf0e6; }
th:first-child, td:first-child, .delete-button { white-space: nowrap; }
td { overflow-wrap: anywhere; }
.delete-button { background: transparent; border: 0; color: #9b3c20; padding: 0 .2rem; text-decoration: underline; text-underline-offset: .15em; }
.feedback { color: var(--muted); font-size: .9rem; }
.feedback:not(:empty) { margin-top: .5rem; }

.lab { margin-top: 4.2rem; padding-block: 3.3rem 3.8rem; background: #193529; color: #f8f7ec; }
.lab .section-heading { margin-bottom: 1.55rem; }
.lab .section-rule { background: #547063; }
.lab .section-symbol, .lab .wave-icon { color: #f08a62; }
.lab-layout { display: grid; grid-template-columns: .63fr 1.37fr; align-items: start; gap: clamp(1.2rem, 4.3vw, 3.6rem); }
.lab-copy h3 { margin-top: .12rem; }
.lab-copy > p:not(.slider-help) { color: #cfdbd0; margin-top: .65rem; }
.order-control { border: 0; padding: 0; margin: 1.15rem 0 1.05rem; min-inline-size: 0; }
.order-control legend, .slider-header { font-size: .9rem; font-weight: 700; }
.order-options { display: flex; gap: .5rem; margin-top: .4rem; }
.order-options label { position: relative; }
.order-options input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.order-options span { pointer-events: none; display: block; padding: .32rem .72rem; border: 1px solid #6b8677; font-size: .88rem; }
.order-options input:checked + span { color: #193529; background: #dbe8d4; border-color: #dbe8d4; font-weight: 700; }
.order-options input:focus-visible + span { outline: 2px solid #fa9d72; outline-offset: 3px; }
.slider-header { display: flex; justify-content: space-between; }
.slider-header output { font-family: var(--mono); color: #ffab88; }
input[type="range"] { display: block; margin: .4rem 0 .28rem; width: 100%; accent-color: #ef916b; cursor: pointer; }
.slider-help { font-size: .83rem; color: #becdc1; }
.lab-readouts { display: flex; flex-wrap: wrap; gap: .6rem 1.7rem; border-top: 1px solid #547063; margin-top: 1.05rem; padding-top: .65rem; }
.lab-readouts p { font-size: .85rem; color: #cfdbd0; }
.lab-readouts strong { display: block; color: #f8f7ec; font: 700 1.13rem/1.6 var(--mono); }
.plot-panel { background: #11281e; border: 1px solid #547063; padding: clamp(.8rem, 3vw, 1.4rem); min-width: 0; }
.plot-panel figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem; font-size: .95rem; }
.plot-panel figcaption .mono { font-size: .82rem; color: #c0d0c5; }
#waveform { display: block; width: 100%; height: clamp(225px, 28vw, 325px); margin-top: .4rem; }
.plot-legend { display: flex; flex-wrap: wrap; gap: .25rem 1.3rem; list-style: none; padding: 0; margin: 0; font-size: .82rem; color: #dbebde; }
.plot-legend li { display: flex; gap: .4rem; align-items: center; white-space: nowrap; }
.trace { display: inline-block; width: 16px; border-top: 2px solid; }
.phase-a { color: #b5e28e; }
.phase-b { color: #70c9e2; }
.phase-c { color: #dfb7ff; }
.phase-sum { color: #ffa179; border-top-style: dashed; }
.plot-explanation { color: #cfdbd0; border-top: 1px solid #415c4f; margin-top: .7rem; padding-top: .65rem; font-size: .91rem; }

.notes { padding-bottom: 4rem; }
.notes-intro { color: var(--muted); max-width: 53rem; margin: -.3rem 0 1.15rem; }
.note-list { border-top: 1px solid var(--line); }
.note-list details { border-bottom: 1px solid var(--line); }
summary::-webkit-details-marker { display: none; }
summary { list-style: none; }
.note-list summary { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 15px; align-items: center; gap: 1rem; padding: 1rem .7rem; }
.note-list summary:hover, .bench-check summary:hover { background: #e8ece1; }
.note-topic { color: #96401f; font-size: .88rem; }
.note-title { font-weight: 700; font-size: 1.03rem; }
.toggle-icon { position: relative; width: 14px; height: 14px; color: var(--green); }
.toggle-icon::before, .toggle-icon::after { content: ""; position: absolute; background: currentColor; }
.toggle-icon::before { width: 100%; height: 1px; top: 6px; }
.toggle-icon::after { height: 100%; width: 1px; left: 6px; }
details[open] .toggle-icon::after { visibility: hidden; }
.note-body { max-width: 57rem; padding: 0 1rem 1rem 8.2rem; color: var(--muted); }
.note-body p + p { margin-top: .65rem; }
.note-body code { background: #e8eade; padding: .1em .3em; font-family: var(--mono); overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); background: #edf0e6; }

@media (max-width: 980px) {
  .container { width: calc(100% - 64px); }
  .hero-layout { gap: 2.2rem; padding-block: 52px 43px; }
  .hero h1 { font-size: clamp(4.5rem, 9vw, 6rem); }
  .journal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-fields .button { justify-self: start; }
}

@media (max-width: 730px) {
  .container { width: calc(100% - 38px); }
  .masthead-row { display: grid; grid-template-columns: 1fr auto; gap: .1rem .7rem; padding-block: .7rem .25rem; }
  .masthead nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: .35rem; }
  .masthead nav a { font-size: .86rem; white-space: nowrap; padding: .4rem 0; }
  .header-action { justify-self: end; }
  .hero-layout, .platform-layout, .project-card, .lab-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-layout { padding-block: 35px 28px; gap: 1.1rem; }
  .hero h1 { margin-block: 11px 18px; font-size: clamp(4rem, 15vw, 6.25rem); }
  .hero-detail { max-width: 25rem; }
  .hero-actions { margin-top: 1.15rem; }
  .photo-frame img { aspect-ratio: 1.22; }
  .section { padding-top: 2.65rem; }
  .section-heading { gap: .55rem; }
  .section-heading h2 { font-size: 1.82rem; }
  .project-next { border-left: 0; border-top: 1px solid var(--line); }
  .lab { margin-top: 2.8rem; padding-block: 2.5rem; }
  .notes { padding-bottom: 2.75rem; }
  .note-list summary { grid-template-columns: minmax(0, 1fr) 15px; gap: .2rem .55rem; padding: .7rem .3rem; }
  .note-topic { grid-row: 1; }
  .note-title { grid-row: 2; }
  .note-list .toggle-icon { grid-column: 2; grid-row: 1 / span 2; }
  .note-list .note-body { padding: .1rem .3rem .9rem; }
  .footer-row { min-height: 65px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.journal-actions, .record-actions { display: flex; align-items: center; gap: .45rem; }
.record-actions { display: inline-flex; white-space: nowrap; }
.edit-button { color: var(--green); }
.edit-button, .delete-button {
  background: transparent;
  border: 0;
  padding: 0 .2rem;
  text-decoration: underline;
  text-underline-offset: .15em;
}
#edit-status:not(:empty) { margin: -.45rem 0 .65rem; font-weight: 700; }
#sync-status:empty, #feedback:empty { display: none; }

@media (max-width: 360px) {
  .journal-actions { flex-wrap: wrap; }
}
