:root {
  color-scheme: light;
  --berry: #67253a;
  --raspberry: #9c3855;
  --plum: #50253a;
  --blush: #fff1ef;
  --cream: #fffaf6;
  --rose-paper: #f5e2e6;
  --paper: #fff;
  --ink: #35262b;
  --muted: #66565c;
  --line: #e6d8d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 94% 9%, rgba(248, 169, 186, .17), transparent 24rem), var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}
a { color: var(--berry); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 5; top: -80px; left: 16px; padding: 10px 16px; background: var(--paper); }
.skip-link:focus { top: 12px; }

.site-header { padding-top: 20px; }
.nav-shell {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; border: 1px solid rgba(103, 37, 58, .13); border-radius: 999px;
  background: var(--cream); box-shadow: 0 10px 28px rgba(80, 37, 58, .07);
}
@supports (backdrop-filter: blur(12px)) {
  .nav-shell { background: rgba(255, 250, 246, .86); backdrop-filter: blur(12px); }
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: auto; height: 38px; }
.nav-label { padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); font-size: .88rem; font-weight: 700; }
.nav-link { margin-left: auto; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 700; }
.nav-link:hover { background: var(--rose-paper); }

.intro { padding-block: clamp(35px, 3.5vw, 50px) 24px; }
.eyebrow, .card-kicker { margin: 0 0 16px; color: var(--raspberry); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--plum); font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.035em; line-height: 1.06; }
h1 { max-width: 950px; font-size: clamp(3.1rem, 5.7vw, 5.2rem); }
h2 { font-size: clamp(2.1rem, 3.1vw, 3.1rem); }
p { margin-top: 0; }
.intro-copy { max-width: 670px; margin: 16px 0 10px; color: var(--muted); font-size: clamp(1.1rem, 1.7vw, 1.28rem); line-height: 1.6; }
.intro-note { margin: 0; color: var(--berry); font-size: .9rem; font-weight: 700; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-bottom: 92px; }
.tool-card {
  display: flex; flex-direction: column; min-width: 0; padding: clamp(24px, 2.4vw, 30px);
  border: 1px solid var(--line); border-radius: 26px; background: var(--paper);
  box-shadow: 0 14px 32px rgba(80, 37, 58, .045);
}
.card-heading { min-height: 118px; }
.card-kicker { margin-bottom: 6px; }
.card-heading h2 { font-size: clamp(2rem, 3vw, 2.75rem); }
.card-heading p:last-child { max-width: 460px; margin: 10px 0 8px; color: var(--muted); font-size: .93rem; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { min-width: 0; margin-bottom: 15px; }
.field label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--ink); font-size: .88rem; font-weight: 700; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select {
  display: block; width: 100%; height: 54px; min-width: 0; padding: 10px 14px;
  border: 1px solid #cdbec2; border-radius: 12px; background: #fff; color: var(--ink);
  font-size: 1.1rem;
}
.field select { font-size: 1rem; }
.field input:hover, .field select:hover { border-color: var(--raspberry); }
.field input[aria-invalid="true"] { border-color: #a61e36; background: #fff6f7; }
.result-panel { display: flex; flex-direction: column; gap: 5px; min-height: 117px; margin-top: auto; padding: 17px 20px; border-radius: 17px; background: var(--rose-paper); }
.result-label { color: var(--berry); font-size: .75rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.result-panel strong { color: var(--plum); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 400; line-height: 1.2; }
.result-detail { color: var(--muted); font-size: .85rem; }
.field-note { margin: 14px 0 0; color: var(--muted); font-size: .82rem; }

.reference-section { padding-block: 76px 90px; background: var(--blush); }
.reference-layout { display: grid; grid-template-columns: .82fr 1.18fr; align-items: start; gap: clamp(32px, 5vw, 78px); }
.reference-heading p:last-child { max-width: 370px; margin: 20px 0 0; color: var(--muted); }
.table-card { min-width: 0; padding: 14px 22px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 7px; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
thead th { color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
tbody th { color: var(--ink); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-note { margin: 10px 7px 0; color: var(--muted); font-size: .8rem; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 26px 38px; color: var(--muted); font-size: .85rem; }
.site-footer p { margin: 0; }
.site-footer a { font-weight: 700; }

@media (max-width: 760px) {
  .tool-grid, .reference-layout { grid-template-columns: 1fr; }
  .card-heading { min-height: 0; }
  .intro { padding-block: 54px 36px; }
  .tool-grid { padding-bottom: 64px; }
  .reference-section { padding-block: 62px 68px; }
}
@media (max-width: 520px) {
  .wrap { width: min(100% - 32px, 1120px); }
  .nav-shell { flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; border-radius: 24px; padding: 13px 15px; }
  .brand img { height: 34px; }
  .nav-label { order: 3; width: 100%; margin-top: 3px; padding: 0; border: 0; font-size: .75rem; }
  .nav-link { margin-left: 0; padding-right: 0; font-size: .8rem; }
  .intro { padding-top: 48px; }
  h1 { font-size: clamp(3rem, 12vw, 4.2rem); }
  .tool-card { border-radius: 22px; }
  .input-grid { gap: 10px; }
  .field label { display: block; }
  .field label span { display: block; }
  .field input, .field select { height: 52px; }
  .table-card { padding-inline: 14px; }
  th, td { padding-inline: 4px; font-size: .82rem; }
  thead th { font-size: .65rem; }
  .site-footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
