/* Scoped original tool layout; shared chrome and manual advertising removed. */
body.tool-scientific-calculator main {
  --bg: #070a0f;
  --surface: #0d121a;
  --surface2: #111821;
  --surface3: #151e29;
  --line: #2b3746;
  --line2: #202b38;
  --text: #f3f6fa;
  --muted: #8e9aaa;
  --muted2: #6f7c8e;
  --accent: #38d6a2;
  --accent2: #23a8ff;
  --danger: #ff647c;
  --warning: #f5a623;
  --shadow: rgba(0, 0, 0, 0.42);
  --header-bg: rgba(7, 10, 15, 0.86);
  --focus: #55c8ff;
}
body.tool-scientific-calculator main * {
  box-sizing: border-box;
}
body.tool-scientific-calculator main button,
body.tool-scientific-calculator main input {
  font: inherit;
}
body.tool-scientific-calculator main button {
  touch-action: manipulation;
}
body.tool-scientific-calculator main a {
  color: inherit;
}
body.tool-scientific-calculator main .container {
  width: min(1240px, calc(100% - 32px));
  margin: auto;
}
body.tool-scientific-calculator main :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
body.tool-scientific-calculator main .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
body.tool-scientific-calculator main .breadcrumb {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted2);
  font-size: 12px;
  padding-top: 24px;
}
body.tool-scientific-calculator main .breadcrumb a {
  text-decoration: none;
}
body.tool-scientific-calculator main .breadcrumb a:hover {
  color: var(--text);
}
body.tool-scientific-calculator main .intro-hero {
  text-align: center;
  padding: 38px 0 24px;
}
body.tool-scientific-calculator main .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #263342;
  border-radius: 999px;
  padding: 7px 12px;
  color: #8debd0;
  background: rgba(56, 214, 162, 0.05);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
body.tool-scientific-calculator main .eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
body.tool-scientific-calculator main h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 18px 0 12px;
}
body.tool-scientific-calculator main .grad {
  background: linear-gradient(90deg, #fff 20%, #8eead5 50%, #55bfff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.tool-scientific-calculator main .subtitle {
  max-width: 760px;
  margin: auto;
  color: var(--muted);
  line-height: 1.65;
  font-size: 16px;
}
body.tool-scientific-calculator main .badges {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 20px;
}
body.tool-scientific-calculator main .badge {
  border: 1px solid #202b38;
  background: rgba(13, 18, 26, 0.7);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  color: #a7b2c1;
  font-weight: 650;
}
body.tool-scientific-calculator main .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 26px 0 14px;
}
body.tool-scientific-calculator main .stat {
  background: rgba(13, 18, 26, 0.9);
  border: 1px solid #202b38;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
}
body.tool-scientific-calculator main .stat small {
  display: block;
  color: #748093;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
body.tool-scientific-calculator main .stat strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tool-scientific-calculator main .calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}
body.tool-scientific-calculator main .panel,
body.tool-scientific-calculator main .card {
  background: rgba(13, 18, 26, 0.94);
  border: 1px solid #26313e;
  border-radius: 18px;
  box-shadow: 0 22px 70px var(--shadow);
}
body.tool-scientific-calculator main .calc-panel {
  overflow: hidden;
}
body.tool-scientific-calculator main .calc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #222d39;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
body.tool-scientific-calculator main .indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.tool-scientific-calculator main .indicator {
  border: 1px solid var(--line2);
  background: var(--surface2);
  border-radius: 999px;
  padding: 5px 9px;
  color: #9cabbc;
}
body.tool-scientific-calculator main .indicator.active {
  color: #8debd0;
  border-color: #276557;
  background: rgba(56, 214, 162, 0.06);
}
body.tool-scientific-calculator main .calc-display {
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.95), rgba(13, 18, 26, 0.95));
  border-bottom: 1px solid #222d39;
}
body.tool-scientific-calculator main .expression-wrap {
  position: relative;
}
body.tool-scientific-calculator main .expression {
  width: 100%;
  border: 0;
  background: transparent;
  color: #d5deea;
  font:
    500 clamp(18px, 3vw, 24px) ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  text-align: right;
  padding: 6px 2px 8px;
  min-height: 46px;
  caret-color: var(--accent2);
}
body.tool-scientific-calculator main .expression:focus {
  outline: none;
}
body.tool-scientific-calculator main .expression::placeholder {
  color: #566274;
}
body.tool-scientific-calculator main .result-line {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  min-height: 66px;
  overflow: hidden;
}
body.tool-scientific-calculator main .result {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 850;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
body.tool-scientific-calculator main .result.error {
  color: #ff9bad;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.01em;
}
body.tool-scientific-calculator main .result-label {
  color: var(--muted2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  flex: none;
}
body.tool-scientific-calculator main .calc-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid #202a35;
  background: rgba(11, 16, 23, 0.78);
}
body.tool-scientific-calculator main .tool-btn {
  border: 1px solid #2a3745;
  background: #111a24;
  color: #c9d4e2;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
body.tool-scientific-calculator main .tool-btn:hover {
  background: #182431;
  border-color: #42566c;
}
body.tool-scientific-calculator main .tool-btn.active {
  border-color: #2b806d;
  color: #8debd0;
  background: rgba(56, 214, 162, 0.08);
}
body.tool-scientific-calculator main .keys {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}
body.tool-scientific-calculator main .key {
  min-height: 52px;
  border: 1px solid #283543;
  border-radius: 11px;
  background: #111821;
  color: #e9eff6;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.015);
  transition:
    transform 0.08s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
body.tool-scientific-calculator main .key:hover {
  background: #18222e;
  border-color: #415268;
}
body.tool-scientific-calculator main .key:active {
  transform: translateY(1px);
}
body.tool-scientific-calculator main .key.function {
  color: #a6cfff;
  background: #101a25;
}
body.tool-scientific-calculator main .key.memory {
  color: #9ce8d1;
  background: #0f1b1c;
}
body.tool-scientific-calculator main .key.operator {
  color: #87e8cc;
  background: #11201f;
}
body.tool-scientific-calculator main .key.control {
  color: #ffb3c0;
  background: #20151a;
}
body.tool-scientific-calculator main .key.equal {
  color: #06110d;
  background: linear-gradient(145deg, #3bd5a5, #2aa984);
  border-color: #55e9bd;
  font-size: 19px;
}
body.tool-scientific-calculator main .key.equal:hover {
  background: linear-gradient(145deg, #49e0b2, #33b892);
}
body.tool-scientific-calculator main .key.wide {
  grid-column: span 2;
}
body.tool-scientific-calculator main .key sup {
  font-size: 0.68em;
}
body.tool-scientific-calculator main .calc-note {
  padding: 0 15px 15px;
  color: #718094;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}
body.tool-scientific-calculator main .side-panel {
  padding: 17px;
  min-height: 100%;
}
body.tool-scientific-calculator main .side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
body.tool-scientific-calculator main .side-head h2 {
  font-size: 14px;
  margin: 0;
  letter-spacing: -0.01em;
}
body.tool-scientific-calculator main .clear-history {
  border: 0;
  background: transparent;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  padding: 5px;
}
body.tool-scientific-calculator main .clear-history:hover {
  color: var(--text);
}
body.tool-scientific-calculator main .history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 542px;
  overflow: auto;
  padding-right: 2px;
}
body.tool-scientific-calculator main .history-empty {
  border: 1px dashed #26313e;
  border-radius: 12px;
  padding: 18px;
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
body.tool-scientific-calculator main .history-item {
  width: 100%;
  text-align: right;
  border: 1px solid #202b38;
  background: #101720;
  border-radius: 11px;
  padding: 10px 11px;
  cursor: pointer;
  color: var(--text);
}
body.tool-scientific-calculator main .history-item:hover {
  border-color: #3a4c60;
  background: #141e29;
}
body.tool-scientific-calculator main .history-expr {
  display: block;
  color: #7f8b9b;
  font:
    11px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tool-scientific-calculator main .history-result {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tool-scientific-calculator main .session-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1b2530;
  color: var(--muted2);
  font-size: 11px;
  line-height: 1.55;
}
body.tool-scientific-calculator main .info-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 40px;
}
body.tool-scientific-calculator main .card {
  padding: 21px;
  box-shadow: none;
  border-radius: 15px;
}
body.tool-scientific-calculator main .card h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
body.tool-scientific-calculator main .card h3 {
  font-size: 15px;
  margin: 18px 0 7px;
}
body.tool-scientific-calculator main .card p {
  color: #8f9bab;
  font-size: 13.5px;
  line-height: 1.72;
  margin: 0 0 12px;
}
body.tool-scientific-calculator main .card p:last-child {
  margin-bottom: 0;
}
body.tool-scientific-calculator main .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
body.tool-scientific-calculator main .feature-box {
  border: 1px solid #202b38;
  background: #101720;
  border-radius: 12px;
  padding: 14px;
}
body.tool-scientific-calculator main .feature-box strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}
body.tool-scientific-calculator main .feature-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
body.tool-scientific-calculator main .example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
body.tool-scientific-calculator main .example-btn {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #24313f;
  background: #101720;
  border-radius: 11px;
  color: var(--text);
  padding: 11px 13px;
  cursor: pointer;
  text-align: left;
}
body.tool-scientific-calculator main .example-btn:hover {
  border-color: #3d536a;
  background: #141e29;
}
body.tool-scientific-calculator main .example-btn code {
  color: #8debd0;
  font-size: 12px;
}
body.tool-scientific-calculator main .example-btn span {
  color: var(--muted);
  font-size: 11px;
}
body.tool-scientific-calculator main table.function-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
body.tool-scientific-calculator main table.function-table th,
body.tool-scientific-calculator main table.function-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #1b2530;
  vertical-align: top;
}
body.tool-scientific-calculator main table.function-table th {
  color: #7f8b9b;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
body.tool-scientific-calculator main table.function-table td {
  color: #c6ceda;
  line-height: 1.55;
}
body.tool-scientific-calculator main table.function-table td:first-child {
  font-weight: 750;
  color: #e0e6ee;
  width: 28%;
}
body.tool-scientific-calculator main table.function-table tr:last-child td {
  border-bottom: none;
}
body.tool-scientific-calculator main .faq details {
  border-bottom: 1px solid #1b2530;
  padding: 12px 0;
}
body.tool-scientific-calculator main .faq details:last-child {
  border-bottom: none;
}
body.tool-scientific-calculator main .faq summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 13.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
body.tool-scientific-calculator main .faq summary::-webkit-details-marker {
  display: none;
}
body.tool-scientific-calculator main .faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 18px;
  font-weight: 400;
}
body.tool-scientific-calculator main .faq details[open] summary::after {
  content: "–";
}
body.tool-scientific-calculator main .faq p {
  margin: 10px 0 0;
}
body.tool-scientific-calculator main .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
body.tool-scientific-calculator main .tool-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 22px var(--shadow);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
body.tool-scientific-calculator main .tool-card:hover,
body.tool-scientific-calculator main .tool-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}
body.tool-scientific-calculator main .tool-card strong {
  font-size: 13.5px;
}
body.tool-scientific-calculator main .tool-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
body.tool-scientific-calculator main .tool-card small {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted2);
}
@media (max-width: 980px) {
  body.tool-scientific-calculator main .calc-layout {
    grid-template-columns: 1fr;
  }
  body.tool-scientific-calculator main .history {
    max-height: 260px;
  }
  body.tool-scientific-calculator main .side-panel {
    min-height: 0;
  }
}
@media (max-width: 860px) {
  body.tool-scientific-calculator main .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  body.tool-scientific-calculator main .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  body.tool-scientific-calculator main .container {
    width: min(100% - 20px, 1240px);
  }
  body.tool-scientific-calculator main .intro-hero {
    padding-top: 30px;
  }
  body.tool-scientific-calculator main .subtitle {
    font-size: 14px;
  }
  body.tool-scientific-calculator main .keys {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
  }
  body.tool-scientific-calculator main .key {
    min-height: 49px;
    font-size: 13px;
  }
  body.tool-scientific-calculator main .key.wide {
    grid-column: span 2;
  }
  body.tool-scientific-calculator main .calc-display {
    padding: 15px 13px 11px;
  }
  body.tool-scientific-calculator main .calc-toolbar {
    padding: 10px;
  }
  body.tool-scientific-calculator main .example-grid,
  body.tool-scientific-calculator main .feature-grid {
    grid-template-columns: 1fr;
  }
  body.tool-scientific-calculator main .breadcrumb {
    padding-top: 16px;
  }
}
@media (max-width: 390px) {
  body.tool-scientific-calculator main .stats {
    grid-template-columns: 1fr 1fr;
  }
  body.tool-scientific-calculator main .stat {
    padding: 12px;
  }
  body.tool-scientific-calculator main .stat strong {
    font-size: 17px;
  }
  body.tool-scientific-calculator main .keys {
    gap: 6px;
  }
  body.tool-scientific-calculator main .key {
    min-height: 47px;
    padding: 5px;
  }
  body.tool-scientific-calculator main .calc-toolbar {
    gap: 6px;
  }
  body.tool-scientific-calculator main .tool-btn {
    padding: 7px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.tool-scientific-calculator main *,
  body.tool-scientific-calculator main *::before,
  body.tool-scientific-calculator main *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
body.tool-scientific-calculator main .key,
body.tool-scientific-calculator main .tool-btn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 860px) {
  body.tool-scientific-calculator main .tool-btn {
    min-height: 40px;
  }
}
body.tool-scientific-calculator main [hidden] {
  display: none !important;
}
body.tool-scientific-calculator main .card p,
body.tool-scientific-calculator main .note,
body.tool-scientific-calculator main .hint {
  color: #aab5c4;
}
body.tool-scientific-calculator main button:focus-visible,
body.tool-scientific-calculator main input:focus-visible,
body.tool-scientific-calculator main select:focus-visible {
  outline: 3px solid #79caff;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  body.tool-scientific-calculator main .container {
    width: calc(100% - 20px);
  }
  body.tool-scientific-calculator main input,
  body.tool-scientific-calculator main select {
    font-size: 16px;
  }
}
