:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: rgba(19, 26, 45, .88);
  --muted: #8b94ac;
  --white: #f6f7fb;
  --mint: #a8f0d1;
  --line: rgba(211, 224, 255, .1);
  font-family: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(ellipse at 76% 42%, rgba(53, 74, 126, .24), transparent 38%),
    radial-gradient(ellipse at 10% 88%, rgba(37, 97, 92, .12), transparent 34%),
    var(--bg);
}
button { font: inherit; }
.page-shell { width: min(1160px, calc(100% - 64px)); margin: auto; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--white); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.brand-dot { color: var(--mint); }
.brand-mark { width: 23px; height: 23px; display: flex; align-items: end; gap: 3px; }
.brand-mark span { width: 5px; border-radius: 4px; background: var(--mint); transform: skew(-25deg); }
.brand-mark span:nth-child(1) { height: 11px; opacity: .62; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 14px; opacity: .8; }
.topbar-note, .topbar-link { font-size: 9px; letter-spacing: .15em; color: var(--muted); }
.topbar-note { display: flex; align-items: center; gap: 9px; }
.live-dot, .display-indicator { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(168,240,209,.8); }
.topbar-link { color: #c2c8d7; text-decoration: none; letter-spacing: .04em; font-size: 11px; }
.topbar-link span { color: var(--mint); }
.hero { min-height: 716px; display: grid; grid-template-columns: 1fr 460px; gap: 62px; align-items: center; padding: 54px 3.5% 54px 4.5%; }
.hero-copy { align-self: center; padding-bottom: 14px; }
.eyebrow { color: #aeb6c9; font-size: 9px; font-weight: 700; letter-spacing: .17em; display: flex; align-items: center; gap: 13px; }
.eyebrow i { width: 26px; height: 1px; background: #61708c; }
h1 { margin: 27px 0 20px; font-size: clamp(58px, 7.1vw, 88px); line-height: .99; letter-spacing: -.075em; font-weight: 600; }
h1 span { color: var(--mint); }
.hero-copy p { max-width: 355px; margin: 0; color: #929bb0; font-size: 14px; line-height: 1.85; }
.hero-meta { display: flex; align-items: center; gap: 13px; margin-top: 57px; color: #7e899f; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.hero-meta > span:first-child { color: var(--mint); font-family: "DM Mono", monospace; font-size: 11px; }
.meta-line { width: 34px; height: 1px; background: #4b576e; }

.calculator-card { position: relative; padding: 25px 25px 18px; border: 1px solid rgba(207, 222, 255, .12); border-radius: 18px; background: linear-gradient(145deg, rgba(24,32,54,.96), rgba(15,21,38,.98)); box-shadow: 0 30px 90px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.035); }
.card-topline, .card-title, .mode-row, .display-label, .result-row { display: flex; align-items: center; }
.card-topline { justify-content: space-between; margin-bottom: 22px; }
.card-title { gap: 11px; }
.calculator-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(168,240,209,.18); border-radius: 11px; color: var(--mint); background: rgba(168,240,209,.055); font-family: Georgia, serif; font-size: 21px; }
.card-title strong { display: block; font-size: 13px; font-weight: 700; }
.card-title small { display: block; margin-top: 3px; color: #778198; font-size: 9px; }
.icon-button { border: 0; color: #8791a7; background: transparent; font-size: 19px; cursor: pointer; transition: color .2s, transform .3s; }
.icon-button:hover { color: var(--mint); transform: rotate(-35deg); }
.mode-row { justify-content: space-between; margin-bottom: 13px; }
.mode-switch { display: flex; padding: 3px; border: 1px solid rgba(255,255,255,.055); border-radius: 9px; background: rgba(5,9,20,.35); }
.mode-button { padding: 7px 11px; border: 0; border-radius: 7px; color: #808ba1; background: transparent; font-size: 9px; cursor: pointer; transition: .2s; }
.mode-button.active { color: #e8fff5; background: rgba(168,240,209,.12); box-shadow: inset 0 0 0 1px rgba(168,240,209,.1); }
.mode-spark { color: var(--mint); margin-left: 3px; }
.angle-toggle { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: #b7c0d2; background: transparent; font-family: "DM Mono", monospace; font-size: 9px; cursor: pointer; }
.angle-toggle:hover { border-color: rgba(168,240,209,.4); color: var(--mint); }
.display { height: 137px; margin-bottom: 12px; padding: 15px 17px; overflow: hidden; border: 1px solid rgba(220,230,255,.06); border-radius: 11px; background: linear-gradient(115deg, rgba(8,13,26,.82), rgba(12,18,33,.94)); }
.display-label { gap: 8px; color: #77849b; font-size: 8px; letter-spacing: .13em; font-weight: 700; }
.display-indicator { width: 5px; height: 5px; }
.expression { margin-top: 17px; min-height: 25px; overflow: hidden; color: #a6afc1; font-family: "DM Mono", monospace; font-size: 16px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.result-row { justify-content: flex-end; gap: 9px; margin-top: 3px; }
.result-equals { color: #59647a; font-family: "DM Mono", monospace; font-size: 16px; }
#result { max-width: 100%; overflow: hidden; color: var(--mint); font-family: "DM Mono", monospace; font-size: 30px; font-weight: 500; letter-spacing: -.06em; text-overflow: ellipsis; white-space: nowrap; }
.keypad { --columns: 4; }
.scientific-keys { display: none; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 8px; }
.basic-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.key { height: 49px; border: 1px solid rgba(226,234,255,.055); border-radius: 9px; color: #edf0f6; background: rgba(255,255,255,.045); font-family: "DM Mono", monospace; font-size: 16px; cursor: pointer; user-select: none; transition: background .14s, border-color .14s, transform .1s; }
.key:hover { border-color: rgba(168,240,209,.25); background: rgba(255,255,255,.085); }
.key:active { transform: scale(.96); }
.key-function { height: 37px; color: #aab4c8; background: rgba(123,148,195,.08); font-family: "Manrope", sans-serif; font-size: 10px; }
.key-utility { color: #c2cbdc; background: rgba(149,166,203,.1); font-family: "Manrope", sans-serif; font-size: 12px; font-weight: 600; }
.key-operator { color: var(--mint); background: rgba(168,240,209,.07); font-size: 19px; }
.key-zero { grid-column: span 2; text-align: left; padding-left: 20px; }
.key-equals { color: #10231c; border-color: transparent; background: var(--mint); font-size: 20px; font-weight: 700; }
.key-equals:hover { border-color: transparent; background: #c0f7df; }
.keypad.scientific { --columns: 5; }
.keypad.scientific .scientific-keys { display: grid; }
.keypad.scientific .basic-keys { grid-template-columns: repeat(5, 1fr); }
.keypad.scientific .key-zero { grid-column: span 2; }
.keypad.scientific .key-equals { grid-column: span 2; }
.card-footer { display: flex; justify-content: space-between; gap: 7px; margin-top: 14px; color: #727e94; font-size: 8px; }
.card-footer span { display: flex; align-items: center; gap: 5px; }
kbd { padding: 3px 4px; border: 1px solid rgba(255,255,255,.09); border-radius: 4px; color: #aab4c6; font: inherit; font-family: "DM Mono", monospace; }
.secure-label { letter-spacing: .07em; }
.secure-label i { color: var(--mint); font-size: 6px; font-style: normal; }
.page-footer { display: flex; justify-content: space-between; height: 57px; align-items: center; border-top: 1px solid var(--line); color: #6e788e; font-size: 8px; letter-spacing: .12em; }
.footer-center { color: #818ba0; }

@media (min-width: 1200px) { .hero { grid-template-columns: 1fr 460px; } }
@media (max-width: 850px) {
  .page-shell { width: min(600px, calc(100% - 36px)); }
  .topbar { height: 72px; }
  .topbar-note { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 37px; padding: 58px 0 55px; }
  .hero-copy { padding: 0 5px; }
  h1 { margin-top: 20px; font-size: clamp(58px, 13vw, 76px); }
  .hero-copy p { max-width: 410px; }
  .hero-meta { margin-top: 27px; }
  .calculator-card { width: 100%; }
  .page-footer .footer-center { display: none; }
}
@media (max-width: 430px) {
  .page-shell { width: calc(100% - 24px); }
  .topbar-link { font-size: 10px; }
  .hero { padding-top: 42px; gap: 28px; }
  .calculator-card { padding: 18px 14px 14px; border-radius: 15px; }
  .card-topline { margin-bottom: 17px; }
  .key { height: 47px; }
  .key-function { height: 35px; }
  .scientific-keys, .basic-keys { gap: 6px; }
  .card-footer { font-size: 7px; }
  #result { font-size: 27px; }
}
