.sc-page {
  min-height: 100vh;
}
.sc-hero {
  padding: 56px 20px 28px;
  text-align: center;
}
.sc-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}
.sc-eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(139, 92, 246, .35);
  border-radius: 999px;
  color: #a78bfa;
  background: rgba(139, 92, 246, .08);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sc-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
}
.sc-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted, #a7a4b5);
  line-height: 1.7;
}
.sc-tool-wrap {
  width: min(980px, calc(100% - 32px));
  margin: 18px auto 44px;
}
.sc-calculator {
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, .24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 15% 0%, rgba(139,92,246,.12), transparent 32%),
    #17161f;
  box-shadow: 0 28px 70px rgba(0,0,0,.25);
}
.sc-display {
  padding: 22px 24px 20px;
  min-height: 150px;
  background: #101017;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sc-display-top {
  display: flex;
  justify-content: space-between;
  color: #a78bfa;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.sc-memory-label {
  color: #8f8c9d;
}
.sc-expression {
  min-height: 28px;
  margin-top: 18px;
  color: #9b98a8;
  text-align: right;
  font-size: .95rem;
  overflow-wrap: anywhere;
}
.sc-result {
  margin-top: 6px;
  color: #faf8ff;
  text-align: right;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.sc-toolbar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sc-toolbar button,
.sc-key,
.sc-history-head button {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.sc-toolbar button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  color: #c4c0ce;
  background: #211f2a;
}
.sc-toolbar .active {
  color: #fff;
  border-color: rgba(139,92,246,.65);
  background: rgba(139,92,246,.2);
}
.sc-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px;
}
.sc-key {
  min-height: 58px;
  border-radius: 14px;
  color: #f5f2fb;
  background: #25232e;
  border: 1px solid rgba(255,255,255,.055);
  font-size: 1.05rem;
  font-weight: 650;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.sc-key:hover {
  transform: translateY(-1px);
  border-color: rgba(139,92,246,.42);
  background: #2b2936;
}
.sc-key:active {
  transform: translateY(1px) scale(.98);
}
.sc-function {
  color: #cbbcff;
  background: #211e2d;
}
.sc-operator {
  color: #d5c7ff;
  background: #241f32;
}
.sc-danger {
  color: #ffb7bd;
  background: rgba(239,68,68,.10);
}
.sc-control {
  color: #b9b5c4;
}
.sc-equals {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d3fd1);
  box-shadow: 0 12px 28px rgba(139,92,246,.22);
}
.sc-zero {
  grid-column: span 2;
}
.sc-history {
  margin: 0 16px 16px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.sc-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sc-history-head h2 {
  margin: 0;
  font-size: 1rem;
}
.sc-history-head button {
  padding: 7px 10px;
  border-radius: 9px;
  color: #c5b7ff;
  background: rgba(139,92,246,.1);
}
.sc-history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.sc-history-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}
.sc-history-expression {
  color: #8f8c9d;
  font-size: .82rem;
}
.sc-history-result {
  margin-top: 3px;
  color: #eeeaf7;
  font-weight: 700;
}
.sc-history-empty {
  margin: 0;
  color: #777484;
  font-size: .9rem;
}
.sc-info {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 70px;
  display: grid;
  gap: 18px;
}
.sc-info-card {
  padding: 26px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  background: rgba(255,255,255,.025);
}
.sc-info-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}
.sc-info-card p,
.sc-info-card li {
  color: var(--muted, #a7a4b5);
  line-height: 1.75;
}
.sc-info-card ol {
  margin: 0;
  padding-left: 22px;
}
.sc-info-card details {
  padding: 13px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sc-info-card details:first-of-type {
  border-top: 0;
}
.sc-info-card summary {
  cursor: pointer;
  color: #eeeaf7;
  font-weight: 650;
}
.sc-info-card details p {
  margin: 9px 0 0;
}
.sc-related {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sc-related a {
  padding: 13px;
  border-radius: 12px;
  color: #c9baff;
  background: rgba(139,92,246,.08);
  text-decoration: none;
}
@media (max-width: 700px) {
  .sc-toolbar {
    grid-template-columns: repeat(3, 1fr);
  }
  .sc-related {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .sc-hero {
    padding-top: 38px;
  }
  .sc-tool-wrap,
  .sc-info {
    width: min(100% - 20px, 980px);
  }
  .sc-display {
    padding: 18px;
  }
  .sc-keypad {
    gap: 7px;
    padding: 10px;
  }
  .sc-key {
    min-height: 52px;
    border-radius: 11px;
    font-size: .94rem;
  }
  .sc-history {
    margin: 0 10px 10px;
  }
  .sc-info-card {
    padding: 20px;
  }
}