/* web/src/style.css */
:root {
  font-family:
    "Noto Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
  color: #17372f;
  background: #f6f5ee;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
.site-header {
  height: 76px;
  border-bottom: 1px solid #e4e7dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(4.4vw, 22px);
  background: #fafaf5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: .08em;
}
.brand-symbol {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 30px;
  height: 30px;
  transform: rotate(-12deg);
}
.brand-symbol i {
  display: block;
  width: 11px;
  height: 22px;
  background: #154d3d;
  border-radius: 8px 2px 8px 2px;
}
.brand-symbol i:last-child {
  height: 18px;
  background: #b69c58;
  transform: translateY(5px);
}
nav {
  display: flex;
  gap: 36px;
}
nav button,
.text-link {
  background: none;
  border: none;
  color: #24483d;
  font-weight: 600;
}
nav button:hover,
.text-link:hover {
  color: #aa8d48;
}
.header-tail {
  color: #7f9186;
  font-size: 13px;
}
.hero {
  max-width: 1350px;
  margin: auto;
  min-height: 625px;
  padding: 85px max(4.4vw, 22px) 85px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 7vw;
  align-items: center;
}
.eyebrow,
.panel-kicker {
  letter-spacing: .17em;
  color: #9e8750;
  font-weight: 700;
  font-size: 12px;
}
.hero h1 {
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: 1.25;
  letter-spacing: -.055em;
  margin: 30px 0 22px;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  color: #b29756;
}
.hero-copy > p {
  max-width: 540px;
  color: #64796d;
  line-height: 1.9;
  font-size: 17px;
}
.primary {
  border: 0;
  border-radius: 12px;
  background: #164d3d;
  color: white;
  padding: 14px 23px;
  font-weight: 600;
  box-shadow: 0 8px 19px #164d3d22;
}
.primary:hover {
  background: #0d3e31;
}
.primary span {
  margin-left: 20px;
}
.hero .primary {
  margin-top: 25px;
}
.hero-note {
  margin-top: 21px;
  font-size: 12px;
  color: #98a59b;
}
.hero-card {
  background:
    linear-gradient(
      160deg,
      #164d3d,
      #0b3028);
  padding: 30px;
  min-height: 400px;
  border-radius: 26px;
  color: #eff5ed;
  box-shadow: 0 28px 70px #15433325;
  position: relative;
  overflow: hidden;
}
.hero-card:after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid #b4cdb423;
  border-radius: 50%;
  right: -90px;
  top: 65px;
}
.hero-card-top {
  display: flex;
  justify-content: space-between;
  color: #b6cbbb;
  font-size: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  background: #cfb271;
  border-radius: 50%;
}
.hero-card-icon {
  font-size: 86px;
  color: #cab77d;
  margin: 46px 0 12px;
  font-weight: 300;
}
.hero-card h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}
.hero-card p {
  color: #b5cbbb;
  margin: 13px 0 28px;
}
.hero-card .text-link {
  padding: 0;
  color: #e2cf8e;
}
.overview {
  background: #eef1e8;
  padding: 75px max(4.4vw, 22px) 90px;
}
.overview > div {
  max-width: 1250px;
  margin: auto;
}
.overview h2 {
  font-weight: 600;
  font-size: 31px;
  margin: 16px 0 42px;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.overview article {
  background: #f9faf5;
  border-radius: 16px;
  padding: 28px 30px;
  min-height: 190px;
}
.overview article span {
  color: #ad985f;
  font-size: 13px;
}
.overview h3 {
  margin: 22px 0 7px;
}
.overview p {
  margin: 0;
  color: #738478;
}
.workspace-head {
  max-width: 1320px;
  margin: 46px auto 20px;
  padding: 0 25px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.workspace-head h1 {
  font-size: 35px;
  margin: 8px 0 8px;
}
.workspace-head p {
  color: #718478;
  margin: 0;
  line-height: 1.8;
}
.status-pill {
  font-size: 12px;
  color: #557263;
  background: #e8ede3;
  padding: 10px 13px;
  border-radius: 99px;
  white-space: nowrap;
}
.tabs {
  max-width: 1270px;
  margin: 0 auto 23px;
  padding: 0 0 0 12px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #dce4d7;
}
.tabs button {
  border: 0;
  background: none;
  color: #6d7d73;
  padding: 15px 18px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs button.active {
  color: #174f3e;
  border-bottom: 3px solid #174f3e;
}
.workspace {
  max-width: 1270px;
  margin: auto auto 85px;
  display: grid;
  grid-template-columns: minmax(370px, 520px) minmax(320px, 1fr);
  gap: 52px;
  padding: 0 18px;
}
.device-column {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.machine {
  position: relative;
  width: min(100%, 405px);
  aspect-ratio: 900/1562;
  background:
    linear-gradient(
      145deg,
      #24493c,
      #0a251f 58%,
      #183d32);
  border-radius: 34px 34px 46px 46px;
  box-shadow:
    inset 0 3px 4px #ffffff26,
    inset 0 -14px 26px #061a17aa,
    0 26px 55px #14372b38;
  border: 5px solid #122f28;
}
.machine-title {
  position: absolute;
  top: 4%;
  left: 13%;
  right: 13%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #dce6d9;
  font-weight: 700;
  letter-spacing: .18em;
  font-size: clamp(11px, 1vw, 14px);
}
.machine-mark {
  font-size: 9px;
  letter-spacing: .1em;
  color: #9ab2a4;
}
.lcd-shell {
  position: absolute;
  left: 18.89%;
  top: 16.13%;
  width: 61.66%;
  aspect-ratio: 200/79;
  border: 7px solid #102d25;
  background: #c8d5bf;
  box-shadow: 0 1px 0 #5a8069, 0 7px 13px #001c1570;
}
.lcd-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.machine-key {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #67877855;
  border-radius: 10px;
  background: linear-gradient(#edf0e5, #d2dcce);
  color: #133d31;
  font-size: clamp(10px, 1.15vw, 15px);
  font-weight: 700;
  padding: 0;
  touch-action: manipulation;
  box-shadow: 0 3px 1px #031c1770;
  white-space: nowrap;
}
.machine-key:active {
  transform: translateY(2px);
  box-shadow: 0 1px 1px #031c17;
}
.key-home {
  background: linear-gradient(#bdd5b2, #83ab91);
}
.key-accent {
  background: linear-gradient(#c1d1a9, #86a47d);
}
.device-caption {
  color: #84958b;
  font-size: 12px;
  text-align: center;
  margin-top: 19px;
}
.side-panel {
  background: #fff;
  border: 1px solid #e8eae3;
  border-radius: 23px;
  padding: 34px 37px;
  min-height: 450px;
  align-self: start;
  box-shadow: 0 13px 35px #1c39260b;
}
.side-panel h2 {
  font-size: 27px;
  margin: 13px 0;
}
.side-panel > p {
  color: #6d7e73;
  line-height: 1.9;
}
.input-row {
  display: flex;
  gap: 8px;
  margin: 27px 0;
}
.input-row input,
textarea,
.token-modal input {
  width: 100%;
  border: 1px solid #d9e1d8;
  border-radius: 11px;
  padding: 13px 14px;
  background: #fbfcfa;
  color: #163c30;
  outline: none;
}
.input-row input:focus,
textarea:focus {
  border-color: #1c654e;
}
.input-row .primary {
  white-space: nowrap;
}
.app-shortcuts {
  border-top: 1px solid #edf0ea;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.app-shortcuts span {
  width: 100%;
  font-weight: 600;
  color: #365a48;
}
.app-shortcuts button,
.outline {
  background: #f4f7f1;
  border: 1px solid #dce6da;
  border-radius: 10px;
  padding: 9px 13px;
  color: #315e49;
}
.app-shortcuts button:hover,
.outline:hover {
  background: #e7f0e5;
}
.tip-box {
  margin-top: 25px;
  border-radius: 12px;
  padding: 17px;
  background: #f3f6ef;
  color: #668171;
  line-height: 1.7;
  font-size: 13px;
}
.photo-actions {
  display: flex;
  gap: 10px;
  margin: 23px 0;
}
.photo-actions button {
  flex: 1;
}
.photo-preview {
  max-width: 100%;
  max-height: 225px;
  display: block;
  margin: 13px 0;
  border-radius: 10px;
}
.field-label {
  display: block;
  margin: 22px 0 9px;
  color: #315e49;
  font-weight: 600;
}
.wide {
  width: 100%;
  margin-top: 16px;
}
.recognized-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.recognized-lines button {
  text-align: left;
  border: 1px solid #e2e9dd;
  background: #f7f9f4;
  border-radius: 8px;
  padding: 8px;
  color: #244d3a;
}
.step-list {
  max-height: 330px;
  overflow: auto;
  margin: 25px 0;
  border-top: 1px solid #e7ebe3;
}
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 3px;
  border-bottom: 1px solid #e7ebe3;
  color: #62746a;
  font-size: 14px;
}
.step > span {
  color: #b7a269;
  font-size: 12px;
  min-width: 19px;
}
.step.current {
  color: #14543d;
  font-weight: 700;
}
.step.done {
  color: #9aa99b;
}
.step.compact {
  max-height: 350px;
}
.progress {
  height: 7px;
  background: #e5ece3;
  border-radius: 99px;
  overflow: hidden;
  margin: 20px 0;
}
.progress div {
  height: 100%;
  background: #247356;
}
.qa-list {
  max-height: none;
  overflow: visible;
}
.qa-item {
  margin: 18px 0;
  padding: 17px;
  background: #f5f8f3;
  border-radius: 12px;
  line-height: 1.75;
}
.qa-q {
  font-weight: 700;
  margin-bottom: 9px;
}
.qa-a {
  white-space: pre-wrap;
}
.qa-source {
  color: #7b9381;
  font-size: 12px;
  margin-top: 8px;
}
.history-card {
  border: 1px solid #e6ece3;
  padding: 17px;
  border-radius: 12px;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-card span {
  color: #718076;
}
.history-card .text-link {
  text-align: left;
  padding: 0;
}
.notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #173d32;
  color: white;
  max-width: min(90vw, 560px);
  padding: 12px 40px 12px 17px;
  border-radius: 11px;
  box-shadow: 0 10px 30px #0003;
  z-index: 10;
  font-size: 14px;
}
.notice button {
  position: absolute;
  right: 9px;
  top: 6px;
  border: 0;
  background: none;
  color: white;
  font-size: 22px;
}
.token-modal {
  position: fixed;
  inset: 0;
  background: #071e17aa;
  z-index: 20;
  display: grid;
  place-items: center;
}
.token-modal > div {
  background: white;
  padding: 35px;
  border-radius: 18px;
  max-width: 380px;
  width: 90%;
}
.token-modal .primary {
  margin-top: 12px;
  width: 100%;
}
footer {
  border-top: 1px solid #e1e6dc;
  display: flex;
  justify-content: space-between;
  padding: 28px max(4.4vw, 22px);
  color: #91a098;
  font-size: 12px;
}
@media (max-width: 850px) {
  .site-header {
    height: 64px;
  }
  .site-header nav {
    gap: 10px;
  }
  .site-header nav button {
    font-size: 12px;
    padding: 4px;
  }
  .header-tail {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
    padding: 55px 24px 65px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero-card {
    min-height: 330px;
  }
  .hero-card-icon {
    margin: 30px 0 8px;
  }
  .overview {
    padding: 60px 24px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .workspace-head {
    display: block;
    margin: 31px auto 15px;
  }
  .workspace-head h1 {
    font-size: 28px;
  }
  .status-pill {
    display: inline-block;
    margin-top: 15px;
  }
  .tabs {
    overflow-x: auto;
    padding: 0 15px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 15px;
  }
  .machine {
    max-width: 390px;
  }
  .machine-key {
    font-size: clamp(8px, 2.4vw, 12px);
  }
  .side-panel {
    padding: 28px 25px;
  }
  .device-caption {
    margin-top: 12px;
  }
}
@media (max-width: 420px) {
  .site-header nav button:last-child {
    display: none;
  }
  .brand {
    font-size: 18px;
  }
  .machine {
    width: min(100%, 355px);
  }
  .workspace-head {
    padding: 0 18px;
  }
  .side-panel h2 {
    font-size: 23px;
  }
}
.machine-key {
  font-size: clamp(8px, .75vw, 11px);
  overflow: hidden;
  letter-spacing: -.04em;
}
.machine-key[data-key=shift],
.machine-key[data-key=format],
.machine-key[data-key=exp] {
  font-size: clamp(6px, .58vw, 8px);
}
.machine-key[data-key=home] {
  font-size: clamp(7px, .65vw, 9px);
}
.machine-key[data-key="0"],
.machine-key[data-key="1"],
.machine-key[data-key="2"],
.machine-key[data-key="3"],
.machine-key[data-key="4"],
.machine-key[data-key="5"],
.machine-key[data-key="6"],
.machine-key[data-key="7"],
.machine-key[data-key="8"],
.machine-key[data-key="9"] {
  font-size: 15px;
}
.machine-key.key-highlight {
  position: absolute;
  z-index: 2;
  background: #72dc8d;
  color: #073a27;
  box-shadow: 0 0 0 3px #2ab565, 0 0 18px #62ec91;
  outline: 2px solid #e5ffdf;
  outline-offset: 3px;
}
.machine-key.key-pressed {
  transform: translateY(2px);
  box-shadow: 0 1px 1px #031c17;
}
.machine {
  background: #f4f4f4 url(/calculator/assets/calculator-cwii-no-brand.png) center/100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 38px #16241d1a;
  width: min(100%, 460px);
}
.machine.machine-cw {
  width: min(100%, 480px);
  aspect-ratio: 704/1430;
  background: transparent url(/calculator/assets/calculator-cw-cutout-v1.png) center 28.5%/145.455% 107.413% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 3px #19231e24) drop-shadow(0 17px 17px #19231e26);
}
.machine.machine-cw2 {
  width: min(100%, 480px);
  aspect-ratio: 765/1550;
  background: transparent url(/calculator/assets/calculator-cwii-cutout-v1.png) 41.667% 37.19%/125.098% 106.065% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 3px #19231e24) drop-shadow(0 17px 17px #19231e26);
}
.machine .lcd-shell {
  left: 18.88%;
  top: 16.13%;
  width: 62.25%;
  height: 14.35%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 1.7%;
  background: #e8f6ef;
  box-shadow: none;
  overflow: hidden;
}
.machine.machine-cw .lcd-shell {
  left: 11.6%;
  top: 15.5%;
  width: 76.5%;
  height: 14.8%;
}
.machine.machine-cw2 .lcd-shell {
  left: 10.85%;
  top: 15.35%;
  width: 78.04%;
  height: 15.1%;
}
.machine .lcd-shell canvas {
  width: 100%;
  height: 100%;
}
.machine-key,
.machine-key[data-key] {
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  overflow: visible;
  touch-action: manipulation;
}
.machine-key:hover {
  background: #acd5fa25;
  box-shadow: inset 0 0 0 1px #b1d7ef88;
}
.machine-key:focus-visible {
  outline: 3px solid #81d9fb;
  outline-offset: 1px;
  background: #81d9fb28;
}
.machine-key:active,
.machine-key.key-pressed {
  transform: none;
  background: #91d8ff5c;
  box-shadow: inset 0 0 0 2px #a6e6ff;
}
.machine-key.key-highlight {
  background: #72dc8d55;
  box-shadow: 0 0 0 3px #2ab565, 0 0 18px #62ec91;
  outline: 2px solid #e5ffdf;
  outline-offset: 2px;
}
.machine-key.key-shift-active {
  background: #75cbff55;
  box-shadow: 0 0 0 2px #4ab8fa, 0 0 12px #9fe2ff;
}
.shift-indicator {
  position: absolute;
  z-index: 2;
  top: 8.9%;
  left: 19%;
  right: 19%;
  text-align: center;
  border-radius: 7px;
  padding: 4px 2px;
  background: #d6edfcdd;
  color: #064a71;
  font-size: clamp(7px, 1.5vw, 11px);
  font-weight: 700;
  pointer-events: none;
}
@media (max-width: 850px) {
  .machine {
    width: min(100%, 430px);
    max-width: none;
  }
}
@media (max-width: 420px) {
  .machine {
    width: min(100%, 390px);
  }
}
.mobile-keypad-toggle,
.mobile-keypad {
  display: none;
}
.mobile-keypad[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .mobile-keypad-toggle {
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px solid #c7d9cb;
    border-radius: 12px;
    background: #e8f1e8;
    color: #164d3d;
    font-weight: 700;
  }
  .mobile-expanded .machine {
    display: none;
  }
  .mobile-keypad {
    display: block;
    width: 100%;
    max-width: 430px;
  }
  .mobile-lcd {
    width: 100%;
    aspect-ratio: 200/79;
    padding: 6px;
    background: #dbe9dc;
    border: 5px solid #153d31;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .mobile-lcd canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
  }
  .mobile-shift-status {
    margin: -3px 0 9px;
    color: #15613a;
    font-size: 13px;
    font-weight: 700;
  }
  .mobile-key-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .touch-row {
    display: grid;
    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    gap: 4px;
  }
  .touch-key {
    min-width: 0;
    min-height: 58px;
    padding: 3px 1px;
    border: 1px solid #a9c0ad;
    border-radius: 9px;
    background: #edf2ea;
    color: #183e2d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    touch-action: manipulation;
  }
  .touch-primary {
    font-size: 13px;
    line-height: 1.1;
    font-weight: 750;
  }
  .touch-secondary {
    min-height: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3970a3;
    font-size: 10px;
    line-height: 1.1;
  }
  .touch-key.key-highlight {
    background: #8de09d;
    border-color: #2b9d52;
    box-shadow: 0 0 0 2px #2b9d5280;
  }
  .touch-key.key-shift-active {
    background: #c2e3f5;
    border-color: #3595c7;
  }
  .touch-key.key-pressed {
    background: #b9d9f2;
    box-shadow: inset 0 0 0 2px #488cbb;
  }
  .touch-key:focus-visible,
  .mobile-keypad-toggle:focus-visible {
    outline: 3px solid #3187be;
    outline-offset: 2px;
  }
}
.mode-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}
.mode-choice .selected {
  background: #dceee0;
  border-color: #49986b;
  color: #15543c;
  font-weight: 700;
}
.plan-context {
  color: #62746a;
  line-height: 1.7;
  font-size: 13px;
  margin: 16px 0 0;
}
.guide-angle {
  margin-top: 18px;
}
.guide-angle .mode-choice {
  margin-top: 8px;
}
.guide-angle .mode-choice button {
  min-width: 82px;
}
.device-notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #d9a99c;
  border-radius: 10px;
  background: #fff6f1;
  color: #7b3325;
  font-size: 14px;
  line-height: 1.5;
}
.site-header {
  position: relative;
  z-index: 3;
  background: #f8f8f1;
  border-bottom-color: #dfe5d9;
}
.brand {
  gap: 19px;
  color: #101414;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand-symbol {
  position: relative;
  display: block;
  flex: none;
  width: 34px;
  height: 39px;
  background: none;
  transform: none;
  overflow: visible;
}
.brand-symbol i {
  position: absolute;
  display: block;
  transform: none;
}
.brand-symbol i:first-child {
  left: 0;
  top: 0;
  width: 12px;
  height: 38px;
  background: #0d4b40;
  border-radius: 7px 7px 2px 2px;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}
.brand-symbol i:last-child {
  left: 21px;
  top: 14px;
  width: 10px;
  height: 26px;
  background: #a68535;
  border-radius: 3px 3px 6px 6px;
}
.site-header nav {
  align-items: center;
  gap: 30px;
}
.site-header nav button {
  padding: 12px 0;
  color: #385b4b;
  font-weight: 600;
}
.site-header nav button:hover,
.site-header nav button.active {
  color: #0f4737;
}
.header-tail {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #697f70;
  letter-spacing: .03em;
}
.header-mark {
  color: #a58c53;
  font-size: 20px;
}
.hero {
  max-width: 1430px;
  min-height: 650px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .82fr);
  gap: min(8vw, 110px);
  padding-top: 78px;
  padding-bottom: 90px;
}
.hero h1 {
  max-width: 730px;
  margin: 25px 0;
  font-size: clamp(43px, 5.2vw, 76px);
  line-height: 1.19;
  letter-spacing: -.063em;
  font-weight: 650;
}
.hero h1 em {
  color: #a68d51;
}
.hero-copy > p {
  max-width: 610px;
  margin: 0;
  color: #60786a;
  font-size: 17px;
  line-height: 1.95;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 27px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero .primary {
  margin: 0;
  padding: 16px 24px;
  border-radius: 9px;
  box-shadow: 0 10px 22px #123e3024;
}
.hero-secondary {
  border: 0;
  background: transparent;
  color: #1e523e;
  font-weight: 650;
  padding: 12px 0;
}
.hero-secondary span {
  margin-left: 9px;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  color: #718b79;
  font-size: 13px;
}
.status-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #62aa73;
  box-shadow: 0 0 0 4px #62aa731c;
  vertical-align: middle;
}
.hero-card {
  min-height: 460px;
  padding: 29px 32px;
  background:
    radial-gradient(
      circle at 87% 18%,
      #2c6750 0%,
      #164737 35%,
      #0b2d25 100%);
  border: 1px solid #31624e;
  border-radius: 18px;
  box-shadow: 0 31px 70px #183b2b28;
}
.hero-card:after {
  width: 480px;
  height: 480px;
  right: -185px;
  top: -100px;
  border-color: #e1ddb323;
}
.hero-card-top {
  position: relative;
  z-index: 2;
  color: #c7d9cd;
  letter-spacing: .15em;
  font-weight: 650;
}
.hero-card-status {
  padding: 6px 10px;
  color: #e9e0b9;
  border: 1px solid #b9ad7355;
  border-radius: 99px;
  letter-spacing: 0;
}
.hero-card-number {
  position: absolute;
  right: 16px;
  top: 34px;
  font-size: clamp(160px, 20vw, 310px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.12em;
  color: #ffffff0b;
  pointer-events: none;
}
.hero-card-bottom {
  position: absolute;
  z-index: 2;
  left: 32px;
  right: 32px;
  bottom: 31px;
}
.hero-card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 0 20px;
  border: 1px solid #d9c98b75;
  border-radius: 12px;
  color: #e1cf95;
  font-size: 32px;
  font-weight: 400;
}
.hero-card h2 {
  font-size: 29px;
  letter-spacing: -.03em;
}
.hero-card p {
  margin: 9px 0 18px;
  font-size: 15px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 27px;
}
.hero-tags span {
  border: 1px solid #b9d2bd47;
  border-radius: 99px;
  padding: 6px 10px;
  color: #d4e0d1;
  font-size: 12px;
}
.hero-card .text-link {
  color: #e8d69b;
  font-size: 15px;
}
.hero-card .text-link span {
  margin-left: 9px;
}
.hero-device-preview {
  position: absolute;
  z-index: 1;
  top: 50px;
  right: 42px;
  width: 102px;
  padding: 4px;
  border-radius: 14px;
  background: #eff2ea;
  box-shadow: 0 18px 34px #021c18a8;
  transform: rotate(9deg);
  pointer-events: none;
}
.hero-device-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.agent-section {
  padding: 78px max(4.4vw, 22px) 90px;
  background: #fdfcf7;
  border-top: 1px solid #e7eadf;
}
.section-heading {
  max-width: 1250px;
  margin: 0 auto 34px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 38px;
}
.section-heading h2 {
  max-width: 750px;
  margin: 14px 0 0;
  font-weight: 620;
  font-size: clamp(27px, 2.5vw, 37px);
  line-height: 1.4;
  letter-spacing: -.035em;
}
.section-heading > p {
  max-width: 350px;
  margin: 0;
  color: #758578;
  line-height: 1.8;
  font-size: 14px;
}
.agent-grid {
  max-width: 1250px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 17px;
}
.agent-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 215px;
  padding: 26px 30px;
  border: 1px solid #dbe5d9;
  border-radius: 15px;
  background: #f4f8f1;
  color: #244d3c;
}
.agent-tile-active:hover {
  border-color: #67a078;
  background: #edf6ed;
}
.agent-tile-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #698577;
  font-size: 12px;
  letter-spacing: .06em;
}
.agent-tile-top b {
  font-size: 19px;
  color: #296e4e;
}
.agent-tile strong {
  margin-top: auto;
  font-size: 25px;
  letter-spacing: -.025em;
}
.agent-tile > span:last-child {
  margin-top: 11px;
  color: #7b8d7d;
  font-size: 14px;
}
.agent-tile-future {
  background: #fafaf6;
  border-color: #e8e9e0;
  color: #879589;
}
.agent-tile-future strong {
  color: #849688;
}
.overview {
  padding-top: 83px;
  background: #edf1e9;
}
.overview .section-heading {
  margin-bottom: 34px;
}
.overview h2 {
  margin: 14px 0 0;
}
.overview article {
  border: 1px solid #e6ebe1;
  background: #fdfdf9;
  min-height: 238px;
  padding: 27px 29px;
}
.overview article h3 {
  font-size: 21px;
  margin: 26px 0 10px;
}
.overview article p {
  min-height: 56px;
  line-height: 1.75;
}
.overview article .text-link {
  padding: 0;
  margin-top: 22px;
  font-size: 13px;
}
.workspace-head {
  margin-top: 49px;
}
.workspace-head h1 {
  letter-spacing: -.035em;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 99px;
}
.side-panel .action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}
.side-panel .action-links .outline {
  flex: 1;
  min-width: 142px;
  text-align: center;
}
.current-model {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  padding: 10px 13px;
  border: 1px solid #e3e9dd;
  border-radius: 9px;
  background: #f7faf4;
  color: #406a4e;
  font-size: 13px;
  font-weight: 650;
}
.service-state {
  margin: 12px 0 4px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f1f7ef;
  color: #416b50;
  font-size: 13px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.footer-links a {
  color: #315e49;
}
.footer-links a:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  footer {
    flex-wrap: wrap;
    gap: 12px;
  }
}
.service-state.offline {
  background: #fbf4e9;
  color: #805e35;
}
.workspace {
  grid-template-areas: "device panel";
}
.workspace .device-column {
  grid-area: device;
}
.workspace .side-panel {
  grid-area: panel;
}
.practice-steps {
  margin-top: 18px;
  border-top: 1px solid #e7ebe3;
}
.practice-steps summary {
  padding: 13px 0;
  color: #315e49;
  font-weight: 650;
  cursor: pointer;
}
.practice-steps .step-list {
  margin-top: 0;
}
.ai-plan {
  margin-top: 22px;
}
.ai-plan h3 {
  margin: 0 0 14px;
  font-size: 19px;
  color: #173d32;
}
.ai-plan h4 {
  margin: 22px 0 0;
  font-size: 15px;
  color: #315e49;
}
.ai-plan-facts {
  margin: 0;
  border: 1px solid #e7ebe3;
  border-radius: 12px;
  overflow: hidden;
}
.ai-plan-facts > div {
  display: grid;
  grid-template-columns: minmax(100px, 28%) 1fr;
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid #e7ebe3;
  font-size: 13px;
  line-height: 1.65;
}
.ai-plan-facts > div:last-child {
  border-bottom: 0;
}
.ai-plan-facts dt {
  color: #667e6e;
  font-weight: 700;
}
.ai-plan-facts dd {
  margin: 0;
  color: #254537;
  overflow-wrap: anywhere;
}
.ai-plan .step-list {
  max-height: none;
  margin-top: 10px;
}
.ai-plan .step {
  align-items: flex-start;
}
.ai-plan .step > div {
  min-width: 0;
}
.ai-plan .step strong {
  display: block;
  color: #254537;
  font-size: 14px;
}
.ai-plan .step small {
  display: block;
  color: #6b7e71;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .ai-plan-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
.token-error {
  color: #a04432;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 850px) {
  .workspace {
    grid-template-areas: "device" "panel";
  }
  .workspace:not(.workspace-calculator) {
    grid-template-areas: "panel" "device";
  }
}
.machine-key:disabled,
.touch-key:disabled {
  cursor: not-allowed;
}
.machine.machine-cnx {
  width: min(100%, 480px);
  aspect-ratio: 544/1150;
  background: transparent url(/calculator/assets/calculator-cnx-cutout-v1.png) center 34.615%/230.515% 109.043% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 3px #19231e24) drop-shadow(0 17px 17px #19231e26);
}
.machine-cnx .lcd-shell {
  left: 10.2%;
  top: 15%;
  width: 79.2%;
  height: 14.6%;
  border: 0;
  border-radius: 1.7%;
  background: #e8f6ef;
  box-shadow: none;
  z-index: 1;
}
.machine-cnx .machine-key[data-key] {
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  line-height: 1;
}
.machine-cnx .machine-key.cnx-shape-round {
  border-radius: 50%;
}
.machine-cnx .machine-key.cnx-shape-pad-up {
  clip-path: polygon(50% 0, 100% 42%, 73% 100%, 27% 100%, 0 42%);
}
.machine-cnx .machine-key.cnx-shape-pad-left {
  clip-path: polygon(0 50%, 37% 0, 100% 16%, 79% 84%, 37% 100%);
}
.machine-cnx .machine-key.cnx-shape-pad-right {
  clip-path: polygon(100% 50%, 63% 0, 0 16%, 21% 84%, 63% 100%);
}
.machine-cnx .machine-key.cnx-shape-pad-down {
  clip-path: polygon(27% 0, 73% 0, 100% 58%, 50% 100%, 0 58%);
}
.machine-cnx .machine-key[data-key]:focus-visible {
  outline: 3px solid #81d9fb;
  outline-offset: 1px;
  background: #81d9fb45;
}
.machine-cnx .machine-key.key-highlight {
  background: #72dc8d66;
  box-shadow: 0 0 0 2px #2ab565, 0 0 15px #62ec91;
}
.machine-cnx .machine-key.key-shift-active {
  background: #75cbff66;
  box-shadow: 0 0 0 2px #4ab8fa;
}
.machine-cnx .machine-key.key-alpha-active {
  background: #f5a9bf66;
  box-shadow: 0 0 0 2px #e8799c;
}
.machine-cnx .alpha-indicator {
  background: #f7d9e2;
  color: #70364a;
}
.touch-key.key-alpha-active {
  background: #f7d9e2;
  border-color: #d97998;
}
@media (max-width: 420px) {
  .machine.machine-cnx {
    width: min(100%, 360px);
  }
}
.model-picker {
  max-width: 1270px;
  margin: 0 auto 10px;
  padding: 0 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.model-picker button.selected {
  background: #174f3e;
  border-color: #174f3e;
  color: #fff;
}
.compat-note {
  max-width: 1270px;
  margin: 0 auto 10px;
  padding: 0 18px;
  color: #8a6a32;
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 850px) {
  .site-header nav {
    gap: 14px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-top: 62px;
  }
  .hero h1 {
    font-size: clamp(39px, 6vw, 56px);
  }
  .hero-card {
    min-height: 370px;
  }
  .hero-card-number {
    font-size: 230px;
  }
  .agent-section {
    padding: 64px 24px;
  }
  .section-heading {
    display: block;
  }
  .section-heading > p {
    margin-top: 17px;
  }
  .overview {
    padding: 64px 24px;
  }
  .agent-grid {
    grid-template-columns: 1fr;
  }
  .agent-tile {
    min-height: 190px;
  }
}
@media (max-width: 420px) {
  .site-header {
    padding: 0 15px;
  }
  .site-header nav {
    gap: 12px;
  }
  .site-header nav button {
    font-size: 12px;
  }
  .site-header nav button:nth-child(n+3) {
    display: none;
  }
  .brand {
    font-size: 18px;
  }
  .hero {
    padding: 48px 20px 57px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero-copy > p {
    font-size: 15px;
  }
  .hero-actions {
    gap: 13px;
  }
  .hero .primary {
    width: 100%;
    text-align: center;
  }
  .hero-secondary {
    padding-left: 2px;
  }
  .hero-card {
    min-height: 350px;
    padding: 23px;
  }
  .hero-card-bottom {
    left: 23px;
    right: 23px;
    bottom: 25px;
  }
  .hero-card h2 {
    font-size: 25px;
  }
  .hero-card-number {
    font-size: 195px;
  }
  .agent-section,
  .overview {
    padding-left: 20px;
    padding-right: 20px;
  }
  .agent-tile {
    padding: 23px;
  }
  .overview article {
    min-height: 0;
  }
  .overview article p {
    min-height: 0;
  }
  .workspace-head {
    margin-top: 28px;
  }
}
@media (max-width: 420px) {
  .hero-card {
    min-height: 390px;
  }
  .hero-device-preview {
    top: 50px;
    right: 28px;
    width: 80px;
  }
}
@media (max-width: 420px) {
  .site-header {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 2px;
    padding: 11px 15px 0;
  }
  .site-header .brand {
    padding-bottom: 7px;
  }
  .site-header nav {
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
  .site-header nav button {
    padding: 10px 2px 12px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  .site-header nav button.nav-home {
    display: none;
  }
  .site-header nav button:nth-child(n+3) {
    display: block;
  }
  .site-header nav button.active {
    border-bottom: 2px solid #174f3e;
  }
}
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
footer {
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.notice {
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
.token-modal {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
@media (max-width: 420px) {
  .site-header {
    padding-top: calc(11px + env(safe-area-inset-top, 0px));
  }
}
@media (max-width: 850px) {
  .photo-actions button {
    min-height: 48px;
  }
}
@media (max-width: 420px) {
  .site-header nav button {
    min-height: 44px;
  }
}
@media (max-width: 420px) {
  .site-header .brand {
    gap: 14px;
    font-size: 22px;
  }
  .brand-symbol {
    width: 28px;
    height: 33px;
  }
  .brand-symbol i:first-child {
    width: 10px;
    height: 32px;
    border-radius: 6px 6px 2px 2px;
  }
  .brand-symbol i:last-child {
    left: 17px;
    top: 12px;
    width: 8px;
    height: 21px;
    border-radius: 2px 2px 5px 5px;
  }
}
.recognized-lines .confidence {
  color: #9b4e31;
  font-size: 12px;
  font-weight: 700;
}
.recognized-lines [data-problem] {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  line-height: 1.5;
}
.recognized-lines [data-problem][aria-pressed=true] {
  border-color: #1c654e;
  background: #eaf3e9;
  box-shadow: inset 3px 0 #1c654e;
}
.recognized-lines [data-problem] span {
  white-space: pre-wrap;
}
.recognized-lines [data-problem] small {
  font-size: 12px;
  color: #687d70;
}
@media (max-width: 850px) {
  .recognized-lines {
    max-height: min(44vh, 350px);
    overflow: auto;
    overscroll-behavior: contain;
  }
  .recognized-lines [data-problem] {
    min-height: 48px;
  }
}
#photo-unclear-warning:not([hidden]) {
  padding: 10px 12px;
  border: 1px solid #e8ba9c;
  border-radius: 9px;
  background: #fff7f1;
  color: #8e402b;
}
.photo-suggestion:not([hidden]) {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #d9e5d7;
  border-radius: 10px;
  background: #f4f8f0;
}
.photo-suggestion p {
  margin: 0 0 10px;
  color: #3b6250;
  font-size: 13px;
  line-height: 1.6;
}
.photo-suggestion strong {
  color: #123d31;
}
.machine .machine-key.physical-key {
  background: #222426;
  box-shadow: inset 0 2px 4px #0009;
  isolation: isolate;
}
.machine-cw2 .machine-key.physical-key {
  background: #a4a19a;
}
.machine-key .key-face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-repeat: no-repeat;
  transform-origin: 50% 55%;
  transition: transform 55ms ease-out, filter 55ms ease-out;
  box-shadow: 0 1px 2px #0005;
}
.machine-cnx .key-face {
  background-image: url(/calculator/assets/calculator-cnx-labeled-v3.png);
}
.machine-cw .key-face {
  background-image: url(/calculator/assets/calculator-cw-labeled-v2.png);
}
.machine-cw2 .key-face {
  background-image: url(/calculator/assets/calculator-cwii-labeled-v2.png);
}
.machine:not(.machine-cnx) .physical-key[data-key=pageup] {
  border-radius: 50% 50% 10% 10%;
}
.machine:not(.machine-cnx) .physical-key[data-key=pagedown] {
  border-radius: 10% 10% 50% 50%;
}
.key-pressed > .key-face {
  transform: translateY(1.5px) scale(.955);
  filter: brightness(.82);
  box-shadow: inset 0 2px 4px #0007;
}
.machine .physical-key.key-shift-active {
  box-shadow: 0 0 0 2px #4ab8fa, 0 0 12px #9fe2ff;
}
.machine .physical-key.key-alpha-active {
  box-shadow: 0 0 0 2px #db6992, 0 0 12px #db699277;
}
.machine .physical-key.key-highlight {
  box-shadow: 0 0 0 3px #2ab565, 0 0 18px #62ec91;
  outline: 2px solid #e5ffdf;
  outline-offset: 2px;
}
.machine .physical-key:focus-visible {
  outline: 2px solid #81d9fb;
  outline-offset: 3px;
}
.touch-key-face {
  width: 100%;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  border-radius: inherit;
  background: #edf2ea;
  pointer-events: none;
  transition: transform 55ms ease-out, filter 55ms ease-out;
}
.touch-key.key-highlight .touch-key-face {
  background: #8de09d;
}
.touch-key.key-shift-active .touch-key-face {
  background: #c2e3f5;
}
@media (prefers-reduced-motion: reduce) {
  .key-face {
    transition: none;
  }
  .key-pressed > .key-face {
    transform: none;
  }
}
.workspace .side-panel {
  height: var(--machine-height,900px);
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: start;
}
.side-panel > .tabs {
  flex: none;
  display: flex;
  margin: 0;
  width: 100%;
  padding: 12px 14px 0;
  gap: 4px;
  border-bottom: 1px solid #e4e7dc;
}
.side-panel > .tabs button {
  flex: 1;
  padding: 14px 5px;
  white-space: nowrap;
  font-size: 14px;
}
.panel-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 28px;
  scrollbar-gutter: stable;
}
.exit-guide {
  flex: none;
  margin: 12px 24px 0;
}
.workspace-ask .panel-content {
  position: relative;
  padding-bottom: 0;
}
.qa-composer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 14px 0 22px;
  margin-top: 16px;
  border-top: 1px solid #e4e7dc;
}
.qa-composer textarea {
  display: block;
  width: 100%;
  resize: vertical;
  max-height: 160px;
}
.mobile-workspace-switch {
  display: none;
}
@media (max-width: 850px) {
  .mobile-workspace-switch {
    display: flex;
    gap: 6px;
    margin: 12px 15px;
    background: #e9eee6;
    border-radius: 12px;
    padding: 4px;
  }
  .mobile-workspace-switch button {
    flex: 1;
    border: 0;
    border-radius: 9px;
    padding: 11px;
    background: transparent;
    color: #234b3b;
  }
  .mobile-workspace-switch button[aria-pressed=true] {
    background: #fff;
    box-shadow: 0 2px 6px #17372f15;
  }
  .workspace,
  .workspace:not(.workspace-calculator) {
    grid-template-areas: "device" "panel";
    gap: 0;
  }
  .workspace.mobile-show-panel .device-column,
  .workspace.mobile-show-device .side-panel {
    display: none;
  }
  .workspace .side-panel {
    height: min(760px, 75dvh);
    min-height: 420px;
  }
  .panel-content {
    padding: 20px 18px;
  }
  .side-panel > .tabs {
    padding: 8px 8px 0;
  }
  .side-panel > .tabs button {
    font-size: 13px;
  }
}
.workspace-ask .panel-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.qa-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 28px;
}
.qa-composer {
  position: static;
  flex: none;
  margin: 0;
  padding: 16px 28px 22px;
}
.focus-step {
  display: none;
}
@media (max-width: 850px) {
  body.calculator-focus {
    overflow: hidden;
  }
  .calculator-focus .site-header,
  .calculator-focus footer,
  .calculator-focus .workspace-head,
  .calculator-focus main > .model-picker,
  .calculator-focus main > .compat-note {
    display: none;
  }
  .calculator-focus main {
    position: fixed;
    inset: 0;
    height: 100dvh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex;
    flex-direction: column;
    background: #f6f5ee;
    z-index: 20;
  }
  .calculator-focus .mobile-workspace-switch {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 4px);
    left: 8px;
    right: 8px;
    z-index: 5;
    margin: 0;
    padding: 3px;
    background: #edf1e64d;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    box-shadow: 0 2px 12px #17372f12;
  }
  .calculator-focus .mobile-workspace-switch button {
    padding: 9px 5px;
    font-size: 13px;
  }
  .calculator-focus .workspace {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
    position: relative;
    touch-action: pan-y;
    overflow: hidden;
    --page-base:0%;
  }
  .calculator-focus .workspace .device-column {
    position: absolute;
    inset: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
  }
  .calculator-focus .device-caption,
  .calculator-focus .mobile-keypad-toggle,
  .calculator-focus .mobile-keypad {
    display: none;
  }
  .calculator-focus .machine {
    --fit-height:calc(100dvh - 4px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    flex: none;
    width: min(100%, calc(var(--fit-height)*.4923));
    max-width: none;
    max-height: 100%;
    margin: 0;
  }
  .calculator-focus .machine-cnx {
    width: min(100%, calc(var(--fit-height)*.473));
  }
  .calculator-focus .workspace .side-panel {
    position: absolute;
    inset: 0;
    display: flex;
    height: 100%;
    min-height: 0;
    width: 100%;
    border-radius: 0;
    padding-top: 50px;
  }
  .calculator-focus .workspace.mobile-show-panel {
    --page-base:-100%;
  }
  .calculator-focus .workspace .device-column {
    transform: translateX(calc(var(--page-base) + var(--drag-x,0px)));
  }
  .calculator-focus .workspace .side-panel {
    transform: translateX(calc(100% + var(--page-base) + var(--drag-x,0px)));
  }
  .calculator-focus .workspace > .device-column,
  .calculator-focus .workspace > .side-panel {
    transition: transform 280ms cubic-bezier(.22, .7, .2, 1);
    will-change: transform;
  }
  .calculator-focus .workspace.is-dragging > .device-column,
  .calculator-focus .workspace.is-dragging > .side-panel {
    transition: none;
  }
  .calculator-focus .focus-step {
    display: block;
    position: absolute;
    z-index: 6;
    top: calc(env(safe-area-inset-top) + 50px);
    left: 10px;
    right: 10px;
    max-height: 40px;
    overflow: auto;
    margin: 0;
    padding: 4px 10px;
    background: #e6efe2ed;
    border-radius: 8px;
    font-size: 12px;
    line-height: 17px;
    touch-action: pan-y;
  }
  .calculator-focus .qa-body {
    padding: 18px;
  }
  .calculator-focus .qa-composer {
    padding: 10px 16px 14px;
  }
  .calculator-focus .qa-composer textarea {
    max-height: 110px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .calculator-focus .workspace > .device-column,
  .calculator-focus .workspace > .side-panel {
    transition: none;
  }
}
@media (max-width: 850px) {
  .calculator-focus main,
  .calculator-focus .mobile-workspace-switch,
  .calculator-focus .panel-content,
  .calculator-focus .qa-body {
    touch-action: pan-y;
  }
}
@media (max-width: 850px) {
  .calculator-focus .mobile-workspace-switch button[aria-pressed=true] {
    background: #ffffff70;
    box-shadow: 0 1px 5px #17372f10;
  }
}
.machine-key:has(> .ios-key-switch),
.touch-key:has(> .ios-key-switch) {
  overflow: hidden;
  position: relative;
}
.machine .machine-key:has(> .ios-key-switch) {
  position: absolute;
}
.ios-key-switch {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  z-index: 3;
  cursor: pointer;
  touch-action: pan-y;
}
.machine-key:has(> .ios-key-switch:focus-visible),
.touch-key:has(> .ios-key-switch:focus-visible) {
  outline: 2px solid #81d9fb;
  outline-offset: 3px;
}
.function-picker {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #dae4d7;
  border-radius: 14px;
  background: #f5f8f1;
}
.function-picker h3 {
  margin: 0 0 8px;
}
.function-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.function-options button {
  padding: 9px 12px;
  font-size: 14px;
}
.function-options [aria-pressed=true] {
  background: #185340;
  color: white;
}
.function-picker summary {
  cursor: pointer;
  padding: 8px 0;
}
.guide-summary {
  white-space: pre-wrap;
}
.recognized-lines {
  max-height: none;
  overflow: visible;
  flex: none;
}
.recognized-lines [data-problem] {
  flex: none;
  min-width: 0;
  height: auto;
  overflow-wrap: anywhere;
}
.recognized-lines [data-problem] span {
  white-space: normal;
}
.photo-crop {
  position: fixed;
  inset: 0;
  width: min(100vw, 760px);
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  border: 0;
  padding: 16px;
  background: #f6f5ee;
  color: #17372f;
  z-index: 1000;
}
.photo-crop[open] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photo-crop::backdrop {
  background: #102920b8;
}
.photo-crop header,
.photo-crop footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  flex: none;
}
.photo-crop button {
  border: 0;
  border-radius: 9px;
  padding: 12px;
  background: #e3e9df;
  color: #17372f;
}
.photo-crop button.primary {
  background: #164d3d;
  color: white;
}
.photo-crop p {
  font-size: 14px;
  margin: 0;
  flex: none;
}
.crop-stage {
  flex: 1;
  min-height: 100px;
  overflow: hidden;
  background: #25342f;
  touch-action: none;
}
.crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.photo-crop footer {
  padding-bottom: env(safe-area-inset-bottom);
}
.crop-error {
  color: #a34028;
}
.photo-status {
  padding: 12px;
  background: #eef4e9;
  border-radius: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  flex: none;
}
.photo-transcript {
  margin: 12px 0;
  flex: none;
}
.photo-transcript pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.6;
}
.math-review {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #dca367;
  border-radius: 14px;
  background: #fff5e8;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.math-review math {
  font-size: 30px;
  color: #3b2817;
  margin: 20px 0;
  min-width: max-content;
}
.math-review p {
  font-size: 14px;
  line-height: 1.6;
}
.math-review strong {
  color: #925013;
}
#question {
  font-size: 24px;
  line-height: 1.6;
  background: #fffaf2;
  border-color: #dca367;
}
.math-editor {
  width: min(95vw, 650px);
  max-height: 92dvh;
  border: 0;
  border-radius: 16px;
  background: #fffaf2;
  color: #3b2817;
  padding: 20px;
}
.math-editor::backdrop {
  background: #14271faa;
}
.math-editor fieldset {
  min-width: 0;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #dbb688;
  border-radius: 8px;
}
.math-editor input,
.math-editor select {
  font-size: 20px;
  padding: 8px;
  max-width: 100%;
  width: 100%;
  margin: 4px 0;
}
.math-editor footer {
  position: sticky;
  bottom: -20px;
  padding: 12px;
  background: #fffaf2;
  gap: 8px;
}
.math-editor button {
  padding: 12px;
}
.math-editor math {
  overflow: auto;
}
.machine {
  container-type: inline-size;
}
.solar-helper {
  position: absolute;
  z-index: 4;
  left: 45.3%;
  top: 3.85%;
  width: 42.7%;
  height: 8.6%;
  box-sizing: border-box;
  border-radius: 9%;
  padding: 5px 7px;
  background:
    linear-gradient(
      150deg,
      #203c34f5,
      #10251ff5);
  box-shadow: inset 0 1px 5px #0008;
  color: #e8f5d7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  touch-action: pan-y;
  font-size: clamp(10px, 3cqw, 14px);
  line-height: 1.3;
}
.machine-cnx .solar-helper {
  left: 44%;
  top: 3.5%;
  width: 42%;
  height: 8.5%;
}
.machine-cw2 .solar-helper {
  left: 45%;
  top: 3.7%;
  width: 43%;
  height: 8.7%;
}
.solar-help-copy {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  flex: 1;
  align-content: center;
}
.solar-help-copy strong,
.solar-help-copy small {
  display: block;
}
.solar-help-copy strong {
  font-weight: 650;
}
.solar-help-copy small {
  font-size: .8em;
  line-height: 1.25;
  color: #b9d6c0;
}
.solar-helper button {
  flex: none;
  align-self: stretch;
  min-height: 24px;
  border: 1px solid #b9d6c065;
  border-radius: 5px;
  padding: 2px 4px;
  background: #cce7c3;
  color: #18382b;
  font-size: .85em;
  line-height: 1.2;
  touch-action: manipulation;
}
.solar-helper button:disabled {
  opacity: .5;
}
.machine .physical-key.key-menu-available {
  box-shadow: 0 0 0 1.5px #8db6a2, 0 0 7px #9bcab044;
}
.touch-key.key-menu-available .touch-key-face {
  background: #dcebdd;
  box-shadow: inset 0 0 0 1px #8db6a2;
}
.expanded-helper {
  background: #173b30;
  color: #e8f5d7;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.expanded-helper button {
  flex: none;
  border: 0;
  border-radius: 6px;
  background: #cce7c3;
  color: #173b30;
  padding: 10px;
}
.menu-step-help {
  padding: 12px;
  border: 1px solid #cee0cf;
  border-radius: 10px;
  background: #f1f7ed;
  font-size: 14px;
  line-height: 1.5;
}
.menu-step-help p {
  margin: 0 0 10px;
}
@media (max-width: 850px) {
  .calculator-focus .mobile-workspace-switch {
    top: env(safe-area-inset-top);
    padding: 0;
    background: #edf1e626;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .calculator-focus .mobile-workspace-switch button {
    font-size: 11px;
    padding: 4px;
    min-height: 24px;
  }
  .calculator-focus .mobile-workspace-switch button[aria-pressed=true] {
    background: #ffffff55;
  }
  .solar-helper {
    padding: 3px 5px;
  }
  .solar-menu .solar-help-copy small:last-child {
    display: none;
  }
}
.panel-kicker .beta-note {
  font-size: .8em;
  font-weight: 400;
  letter-spacing: normal;
}
.member-gate {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 950px;
  margin: 36px auto;
  padding: 28px;
  background: white;
  border-radius: 24px;
}
.member-gate img {
  width: 220px;
  max-height: 460px;
  object-fit: contain;
}
.member-gate .primary {
  display: inline-block;
  text-decoration: none;
}
.member-gate h1 {
  font-size: 28px;
}
.member-gate p {
  line-height: 1.8;
}
.member-gate .text-link {
  display: block;
  margin-top: 16px;
}
@media (max-width: 650px) {
  .member-gate {
    flex-direction: column;
    gap: 16px;
    margin: 16px auto;
    padding: 24px;
  }
  .member-gate img {
    height: 190px;
    width: auto;
  }
  .member-gate h1 {
    font-size: 24px;
  }
}
