@font-face {
  font-family: LocalSans;
  src: local("Inter"), local("Arial");
  font-display: swap;
}
:root {
  --paper: #f7f8f2;
  --ink: #244e40;
  --text: #243e33;
  --muted: #687569;
  --line: rgba(36, 78, 64, 0.15);
  --accent: #e9efb2;
  --card: #eef0e7;
  --error: #a33f34;
  --white: #fff;
  --font:
    LocalSans, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 5px;
}
button {
  transition:
    background-color 0.15s,
    transform 0.15s,
    color 0.15s;
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg {
  width: 18px;
  height: 18px;
}
p,
h1,
h2 {
  margin: 0;
}
.page {
  max-width: 1248px;
  padding: 0 56px;
  margin: auto;
}
.header {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand > span:first-of-type {
  font-size: 30px;
  letter-spacing: -1.3px;
  font-weight: 750;
}
.brand-dot {
  color: #668361;
}
.brand-cn {
  border-left: 1px solid var(--line);
  font-size: 13px;
  margin-left: 8px;
  padding-left: 18px;
  font-weight: 500;
  letter-spacing: 2px;
}
.header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
}
.nav-button {
  display: flex;
  gap: 7px;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 12px 0;
  min-height: 44px;
}
.about-link {
  text-decoration: none;
  padding: 14px 0;
}
.about-link span {
  margin-left: 6px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 84px 0 72px;
}
.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 1.5px;
}
.tiny-star {
  font-size: 20px;
}
.edition {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-left: 9px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
h1 {
  font-size: clamp(46px, 4.9vw, 66px);
  line-height: 1.27;
  letter-spacing: -3px;
  font-weight: 650;
  margin: 23px 0 25px;
  color: var(--ink);
}
.title-mark {
  position: relative;
  white-space: nowrap;
}
.title-mark > svg {
  position: absolute;
  left: 0;
  width: 100%;
  bottom: -8px;
  height: 15px;
  color: #95aa66;
  stroke-width: 2.5;
}
.question {
  font-weight: 400;
}
.intro-copy {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  text-wrap: pretty;
}
form {
  margin-top: 34px;
  max-width: 402px;
}
label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}
label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.input-wrap {
  position: relative;
}
.input-wrap svg {
  position: absolute;
  width: 18px;
  height: 18px;
  left: 16px;
  top: 18px;
  color: var(--muted);
  pointer-events: none;
}
input {
  width: 100%;
  height: 56px;
  padding: 0 16px 0 46px;
  border: 1px solid rgba(36, 78, 64, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 16px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder {
  color: #7b8478;
  font-size: 14px;
}
input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(36, 78, 64, 0.06);
  outline: 0;
}
input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
input[aria-invalid="true"] {
  border-color: var(--error);
}
.field-error {
  font-size: 12px;
  color: var(--error);
  line-height: 1.6;
}
.field-error:not(:empty) {
  padding-top: 8px;
}
.field-error:not(:empty)::before {
  content: "! ";
  font-weight: 700;
}
.primary-button {
  width: 100%;
  height: 54px;
  margin-top: 12px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 550;
  box-shadow:
    0 1px 2px #244e4014,
    0 3px 6px #244e400a;
}
.button-arrow {
  font-size: 23px;
  font-weight: 400;
}
.primary-button:disabled {
  background: #50695a;
  border-color: #50695a;
  color: #fff;
}
.privacy-note {
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}
.privacy-note svg {
  height: 12px;
  width: 12px;
}
.form-status {
  min-height: 20px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.instrument-wrap {
  position: relative;
  padding-top: 10px;
  min-width: 0;
}
.floating-note {
  position: absolute;
  top: -35px;
  right: 34px;
  font-size: 12px;
  letter-spacing: 1px;
  transform: rotate(6deg);
  color: var(--muted);
}
.floating-note svg {
  position: absolute;
  right: -30px;
  top: 14px;
  width: 46px;
  height: 35px;
  stroke-width: 1.2;
}
.instrument {
  position: relative;
  background-color: var(--card);
  border: 1px solid rgba(36, 78, 64, 0.12);
  border-radius: 15px;
  overflow: hidden;
  box-shadow:
    0 2px 3px #244e4003,
    0 12px 24px #244e4005,
    0 30px 65px #244e4005;
  --position: 50%;
  isolation: isolate;
}
.instrument::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(#244e4008 1px, transparent 1px),
    linear-gradient(90deg, #244e4008 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(transparent, #000);
}
.instrument:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}
.report-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 1px;
}
.report-top > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: #64845d;
}
.report-code {
  font-family: monospace;
  color: var(--muted);
  font-size: 11px;
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 27px 0;
  gap: 5px;
}
.micro-label {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: var(--muted);
  font-weight: 500;
}
.fiction-tag {
  font-size: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(36, 78, 64, 0.24);
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
}
.instrument h2 {
  font-size: 13px;
  font-weight: 400;
  margin: 18px 27px 0;
  overflow-wrap: anywhere;
  min-height: 19px;
}
.reading {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-top: 5px;
  height: 132px;
  font-variant-numeric: tabular-nums;
}
.reading > span:first-child {
  font-size: 102px;
  line-height: 1.2;
  font-weight: 450;
  letter-spacing: -7px;
}
.unit {
  font-family: Georgia, serif;
  font-size: 26px;
  font-style: italic;
}
.unit span {
  display: block;
  font-family: var(--font);
  font-style: normal;
  font-size: 9px;
  margin-top: 0;
  text-align: center;
  color: var(--muted);
  letter-spacing: 2px;
}
.ruler-assembly {
  position: relative;
  margin: 14px 29px 0;
  height: 120px;
  transform: rotate(-7deg);
}
.ruler {
  background: var(--accent);
  height: 73px;
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  border: 1px solid rgba(59, 85, 37, 0.3);
  border-radius: 3px;
  box-shadow:
    0 2px 1px #42542d13,
    0 7px 9px #42542d0d,
    0 13px 18px #42542d0a;
  overflow: hidden;
}
.ruler-ticks {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 17px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 1px,
    transparent 1px calc(100% / 60)
  );
}
.ruler-ticks::after {
  content: "";
  position: absolute;
  inset: 0 0 -10px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 1px,
    transparent 1px calc(100% / 6)
  );
}
.ruler-numbers {
  position: absolute;
  top: 30px;
  left: 11px;
  right: 9px;
  display: flex;
  justify-content: space-between;
  font: 11px var(--font);
}
.ruler-brand {
  position: absolute;
  bottom: 8px;
  left: 14px;
  font-size: 6px;
  letter-spacing: 1.1px;
  color: var(--ink);
}
.measure-line {
  position: absolute;
  left: 14px;
  width: calc((100% - 28px) * 0.5);
  top: 9px;
  height: 9px;
  border: 1px solid #64845d;
  border-bottom: 0;
  transition: width 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.measure-line > span {
  font-size: 8px;
  white-space: nowrap;
  position: absolute;
  top: -14px;
  left: 0;
  color: var(--muted);
}
.pointer {
  position: absolute;
  top: 21px;
  left: calc(14px + (100% - 28px) * 0.5);
  width: 1px;
  height: 83px;
  background: var(--ink);
  transition: left 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 0 3px #244e4006;
}
.pointer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 7px;
  height: 7px;
  background: var(--ink);
  transform: rotate(45deg);
}
.report-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 27px 24px;
  gap: 12px;
}
.report-bottom p {
  font-size: 13px;
  margin-top: 9px;
  line-height: 1.7;
  text-wrap: pretty;
}
.doodle-star {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  stroke: #73916b;
  stroke-width: 1.2;
  transform: rotate(10deg);
}
.report-actions {
  height: 51px;
  background: #f8f9f253;
  border-top: 1px dashed rgba(36, 78, 64, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 27px;
  font-size: 10px;
  color: var(--muted);
}
.report-actions button {
  font-size: 11px;
  color: var(--ink);
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 5px 0 5px 15px;
}
.report-actions button:disabled {
  color: #75806e;
}
.report-actions button span {
  margin-left: 5px;
}
.under-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 9px 0;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.mini-cross {
  font-size: 16px;
  color: #83927c;
}
.steps {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 29px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step {
  display: flex;
  gap: 15px;
}
.step-number {
  font-size: 10px;
  color: #647b5b;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.step h2 {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.2px;
}
.step p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 7px;
}
.about {
  max-width: 700px;
  margin: 31px auto 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.about summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  font-size: 12px;
  padding: 8px 0;
}
.about summary::-webkit-details-marker {
  display: none;
}
.about summary > span {
  font-size: 19px;
}
.about[open] summary > span {
  transform: rotate(45deg);
}
.about-content {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  padding: 12px 0 20px;
}
.about-content p + p {
  margin-top: 12px;
}
.about-content a {
  text-underline-offset: 3px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-bottom: 30px;
  color: var(--muted);
  font-size: 10px;
}
footer > span:last-child {
  font-size: 8px;
  letter-spacing: 1.5px;
}
footer > span:last-child > span {
  margin-left: 12px;
  font-size: 13px;
}
.footer-separator {
  padding: 0 8px;
  color: #99a48f;
}
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #ffffff55;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.is-loading .spinner {
  display: block;
}
.is-loading .button-arrow {
  display: none;
}
.is-loading .status-dot {
  animation: pulse 1s ease-in-out infinite;
}
.instrument.has-result .reading {
  animation: reveal 0.35s ease-out;
}
dialog {
  width: min(460px, calc(100% - 32px));
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 25px 80px #142c3433;
  max-height: 85dvh;
}
dialog::backdrop {
  background: #1a302760;
  backdrop-filter: blur(4px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-header h2 {
  font-size: 24px;
  margin-top: 8px;
}
.close-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 27px;
  font-weight: 300;
}
.dialog-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 16px 0;
}
#history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.history-item {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.history-item span {
  overflow-wrap: anywhere;
}
.history-item strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 550;
}
.history-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 32px 0;
  text-align: center;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.text-button {
  border: 0;
  background: transparent;
  min-height: 44px;
  color: var(--ink);
  font-size: 12px;
  padding: 0;
}
.text-button:disabled {
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 32px);
  transform: translate(-50%, 10px);
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  box-shadow: 0 3px 20px #244e4022;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 5;
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  background: var(--ink);
  padding: 12px;
  color: var(--paper);
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}
.noscript {
  padding: 20px;
  background: var(--accent);
  text-align: center;
  font-size: 14px;
}
@media (hover: hover) {
  .primary-button:hover:not(:disabled) {
    background: color-mix(in oklch, var(--ink) 85%, black);
  }
  .nav-button:hover,
  .about-link:hover,
  .text-button:hover {
    color: #687e4b;
  }
  input:hover {
    border-color: var(--ink);
  }
  .close-button:hover {
    background: var(--card);
  }
  .report-actions button:hover:not(:disabled) {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
@media (min-width: 1450px) {
  .hero {
    padding-top: 104px;
    padding-bottom: 92px;
  }
}
@media (max-width: 1050px) {
  .page {
    padding: 0 34px;
  }
  .hero {
    gap: 34px;
    padding-top: 70px;
  }
  h1 {
    font-size: 53px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.8px;
  }
  .edition {
    font-size: 8px;
    margin-left: 1px;
  }
  .report-head {
    padding: 25px 20px 0;
  }
  .report-head .micro-label {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .report-top,
  .report-actions {
    padding-left: 20px;
    padding-right: 20px;
  }
  .instrument h2 {
    margin-left: 20px;
    margin-right: 20px;
  }
  .report-bottom {
    padding-left: 20px;
    padding-right: 20px;
  }
  .reading > span:first-child {
    font-size: 92px;
  }
  .reading {
    height: 124px;
  }
  .step {
    gap: 9px;
  }
  .steps {
    gap: 17px;
  }
  .step p {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .page {
    padding: 0 24px;
    max-width: 560px;
  }
  .header {
    height: 80px;
  }
  .brand > span:first-of-type {
    font-size: 27px;
  }
  .brand img {
    height: 30px;
    width: 30px;
  }
  .brand-cn {
    display: none;
  }
  .header nav {
    gap: 18px;
    font-size: 11px;
  }
  .nav-button svg {
    width: 16px;
    height: 16px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 59px;
    padding: 41px 0 37px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .edition {
    margin-left: auto;
  }
  .intro {
    max-width: none;
  }
  h1 {
    font-size: 58px;
    margin-top: 23px;
    margin-bottom: 22px;
    letter-spacing: -2px;
  }
  .intro-copy {
    font-size: 14px;
  }
  form {
    max-width: none;
    margin-top: 26px;
  }
  .privacy-note {
    font-size: 10px;
  }
  .form-status {
    margin-top: 7px;
    min-height: 0;
  }
  .form-status:empty {
    display: none;
  }
  .instrument-wrap {
    padding-top: 0;
  }
  .floating-note {
    top: -28px;
    right: 44px;
    font-size: 10px;
  }
  .floating-note svg {
    height: 26px;
    top: 9px;
  }
  .instrument {
    border-radius: 12px;
  }
  .report-head {
    padding: 25px 24px 0;
  }
  .report-head .micro-label {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .instrument h2 {
    margin-left: 24px;
    margin-right: 24px;
  }
  .reading {
    height: 128px;
  }
  .reading > span:first-child {
    font-size: 102px;
  }
  .ruler-assembly {
    margin-left: 28px;
    margin-right: 28px;
  }
  .report-bottom {
    padding: 16px 24px 22px;
  }
  .report-actions {
    padding: 0 24px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 27px 0;
  }
  .step {
    gap: 19px;
  }
  .step-number {
    font-size: 11px;
  }
  .step h2 {
    font-size: 13px;
  }
  .step p {
    font-size: 12px;
    margin-top: 4px;
  }
  .about {
    margin-top: 17px;
  }
  .about summary {
    font-size: 12px;
  }
  footer {
    flex-direction: column;
    align-items: center;
    margin-top: 27px;
    gap: 12px;
    padding-bottom: calc(26px + env(safe-area-inset-bottom));
    font-size: 10px;
  }
  .report-top {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 360px) {
  .page {
    padding: 0 18px;
  }
  h1 {
    font-size: 50px;
  }
  .header nav {
    gap: 12px;
  }
  .report-head .micro-label {
    font-size: 7px;
  }
  .fiction-tag {
    font-size: 8px;
  }
  .reading > span:first-child {
    font-size: 86px;
  }
  .report-bottom p {
    font-size: 12px;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .spinner {
    border-top-color: var(--accent);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@keyframes reveal {
  from {
    opacity: 0.5;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
