:root {
  --page-bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef6f5;
  --text: #15202b;
  --muted: #637083;
  --border: #dce5eb;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 16px 44px rgba(31, 41, 55, .10);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, .16), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .24);
  outline-offset: 2px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 30px 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.a,
.opcmain {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.home-btn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:15px 34px;
    background:#fff;
    color:#e04810;
    text-decoration:none;
    border-radius:50px;
    font-weight:600;
    transition:.35s;
    box-shadow:0 10px 25px rgba(0,0,0,.2);
}
.home-btn:hover{
    transform:translateY(-6px) scale(1.05);
    background:#632ce4;
    color:#fff;
    box-shadow:0 10px 25px rgba(0,0,0,.2);
    cursor:pointer;
}


a[aria-label="Go to Oracal Point home"],
a[aria-label="Go to Oracal Point home"]:hover,
a[aria-label="Go to Oracal Point home"]:focus,
a[aria-label="Go to Oracal Point home"]:visited {
  text-decoration: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: .98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-panel {
  display: grid;
  min-width: 190px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 41, 55, .06);
}

.calculator-card {
  grid-row: span 2;
}

.tool-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tool-heading h2 {
  margin-bottom: 5px;
  font-size: 19px;
  line-height: 1.2;
}

.tool-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tool-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 800;
}

.tool-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
}

input::placeholder {
  color: #9aa6b2;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-form button,
.calc-keys button {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.tool-form button {
  min-height: 46px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .22);
}

.tool-form button:hover,
.calc-keys .equals:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.result {
  display: block;
  min-height: 52px;
  margin-top: auto;
  padding: 13px 14px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.calc-display {
  display: grid;
  min-height: 112px;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #14213d;
  color: #fff;
  overflow: hidden;
}

#calcExpression {
  min-height: 20px;
  color: #a8b3c7;
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

#calcDisplay {
  display: block;
  color: #fff;
  font-size: 42px;
  line-height: 1.05;
  text-align: right;
  overflow-wrap: anywhere;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.calc-keys button {
  aspect-ratio: 1 / .74;
  background: #edf2f7;
  color: var(--text);
  font-size: 18px;
}

.calc-keys button:hover {
  background: #dce8f1;
  transform: translateY(-1px);
}

.calc-keys .ghost {
  background: #f5e8d0;
  color: #8a4d00;
}

.calc-keys .operator {
  background: #dff4f1;
  color: var(--primary-dark);
}

.calc-keys .equals {
  background: var(--primary);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
