.tool-hero,
.tool-directory,
.tool-calculator-section {
  --white: var(--surface);
  --gold-dark: var(--gold-strong);
  --field-border: var(--line);
  --field-label: var(--ink);
  --muted: var(--ink-soft);
  --success: #16724c;
  --danger: #b42318;
}

html[data-theme="dark"] .tool-calculator-section {
  --success: #62d39b;
  --danger: #ff938c;
}

.tool-hero { position: relative; overflow: clip; padding: 72px 0 66px; border-bottom: 1px solid var(--line); background: linear-gradient(115deg, var(--paper) 0 72%, color-mix(in srgb, var(--gold) 7%, var(--paper)) 72%); }
.tool-hero::before { content: ""; position: absolute; width: 500px; height: 500px; top: -330px; right: -250px; border: 1px solid rgba(199,155,59,.28); border-radius: 50%; box-shadow: 0 0 0 72px rgba(199,155,59,.04), 0 0 0 144px rgba(199,155,59,.025); }
.tool-breadcrumb { position: relative; margin-bottom: 24px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.tool-breadcrumb a { text-decoration: none; }
.tool-hero-grid { position: relative; display: grid; grid-template-columns: 1fr .48fr; gap: 70px; align-items: end; }
.tool-hero h1 { max-width: 880px; margin: 0; font: 400 clamp(46px,5.6vw,76px)/1.02 "DM Serif Display",Georgia,serif; letter-spacing: -.03em; text-wrap: balance; }
.tool-hero h1 span { color: var(--gold-strong, var(--gold-dark)); }
.tool-hero p { max-width: 760px; margin: 23px 0 0; color: var(--ink-soft); font-size: 17px; }
.tool-source { position: relative; padding: 23px 0 23px 22px; border-block: 1px solid var(--line); border-left: 3px solid var(--gold); }
.tool-source small, .tool-source strong { display: block; }
.tool-source small { color: var(--gold-strong, var(--gold-dark)); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tool-source strong { margin-top: 7px; font-size: 14px; line-height: 1.45; }
.tool-source a { display: inline-flex; min-height: 38px; align-items: center; margin-top: 8px; color: var(--ink); font-size: 13px; font-weight: 800; text-underline-offset: 3px; }

.tool-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.tool-hero-actions .button { min-height: 52px; padding-inline: 21px; }
.button-primary { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.button-secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button.gold { border-color: var(--gold); color: var(--navy); background: var(--gold); box-shadow: 0 12px 28px color-mix(in srgb, var(--gold) 22%, transparent); }
.button-primary:hover, .button-secondary:hover { border-color: var(--gold); transform: translateY(-2px); }

.tool-directory { padding: 66px 0 96px; }
.tool-directory-head { display: grid; grid-template-columns: 1fr .66fr; gap: 50px; align-items: end; margin-bottom: 34px; }
.tool-directory-head h2 { margin: 0; font: 400 clamp(36px,4vw,56px)/1.07 "DM Serif Display",Georgia,serif; }
.tool-directory-head p { margin: 0; color: var(--ink-soft); }
.tool-grid { display: grid; grid-template-columns: repeat(2,1fr); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 22px 60px rgba(15,29,47,.07); counter-reset: highbrow-tool; }
.tool-card { position: relative; min-height: 290px; padding: 34px 66px 32px 34px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--surface); text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; }
.tool-card { counter-increment: highbrow-tool; }
.tool-card:nth-child(even) { padding-left: 34px; border-left: 1px solid var(--line); }
.tool-card:nth-last-child(-n+2) { border-bottom: 0; }
.tool-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold); opacity: 0; transition: opacity .2s; }
.tool-card::after { content: "0" counter(highbrow-tool); position: absolute; top: 28px; right: 30px; color: color-mix(in srgb, var(--gold) 42%, var(--line)); font: 400 28px/1 "DM Serif Display",Georgia,serif; }
.tool-card:hover, .tool-card:focus-visible { z-index: 1; background: color-mix(in srgb, var(--gold) 5%, var(--surface)); box-shadow: 0 18px 45px rgba(15,29,47,.1); transform: translateY(-3px); outline: none; }
.tool-card:hover::before, .tool-card:focus-visible::before { opacity: 1; }
.tool-card small { color: var(--gold-strong, var(--gold-dark)); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tool-card h3 { max-width: 470px; margin: 40px 0 13px; font: 400 33px/1.12 "DM Serif Display",Georgia,serif; text-wrap: balance; }
.tool-card p { max-width: 500px; margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.tool-card b { position: absolute; right: 30px; bottom: 27px; color: var(--gold-strong, var(--gold-dark)); font-size: 12px; }
.tool-card:nth-child(even) b { right: 0; }

.home-tools { padding: 94px 0; background: color-mix(in srgb, var(--gold-pale) 24%, var(--paper)); }
.home-tools .section-head { margin-bottom: 36px; }
.home-tool-grid { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.home-tool-card { position: relative; min-height: 270px; padding: 27px 24px; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.home-tool-card:last-child { border-right: 0; }
.home-tool-card small { display: block; color: var(--gold-dark); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.home-tool-card strong { display: block; margin-top: 45px; font: 400 28px/1.12 "DM Serif Display",Georgia,serif; }
.home-tool-card p { margin: 12px 0 0; color: var(--ink-soft); font-size: 13px; }
.home-tool-card span { position: absolute; right: 22px; bottom: 21px; color: var(--gold-dark); font-size: 18px; transition: transform .2s; }
.home-tool-card:hover span { transform: translateX(5px); }
.home-tool-legacy { display: none !important; }

.tool-calculator-section { padding: 74px 0 100px; }
.tool-calculator-section .crs-calculator,
.tool-calculator-section .australia-calculator { padding: 0; background: transparent; }
.tool-calculator-section .crs-calculator::before,
.tool-calculator-section .australia-calculator::before { display: none; }
.tool-calculator-section .crs-intro,
.tool-calculator-section .aus-intro,
.tool-calculator-section .aus-round { display: none; }
.tool-calculator-section .pnp-workspace { margin-bottom: 0; }
.tool-calculator-section .program-calculator-grid { grid-template-columns: repeat(4,1fr); }
.tool-calculator-section .program-calculator-card:last-child { border-right: 0; }
.tool-calculator-section input:not([type="checkbox"]),
.tool-calculator-section select,
.tool-calculator-section textarea { width: 100%; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 3px; color: var(--ink); background: var(--surface); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.tool-calculator-section input:not([type="checkbox"]):hover,
.tool-calculator-section select:hover,
.tool-calculator-section textarea:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--field-border)); }
.tool-calculator-section input:not([type="checkbox"]):focus,
.tool-calculator-section select:focus,
.tool-calculator-section textarea:focus { border-color: var(--gold-strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.tool-calculator-section .pnp-field > label:not(.crs-check) { display: block; margin-bottom: 7px; color: var(--field-label); font-size: 13px; font-weight: 800; }
.tool-calculator-section .pnp-field input:not([type="checkbox"]),
.tool-calculator-section .pnp-field select { min-height: 54px; font-size: 14px; }

.calculator-section-head { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 25px; }
.calculator-section-head h2,
.tool-calculator-section,
.pnp-workspace { scroll-margin-top: 170px; }
.calculator-section-head h2 { margin: 0; color: var(--ink); font: 400 clamp(36px,4.5vw,54px)/1.05 "DM Serif Display",Georgia,serif; letter-spacing: -.02em; }
.calculator-section-head p:not(.eyebrow) { max-width: 710px; margin: 13px 0 0; color: var(--ink-soft); font-size: 15px; }
.calculator-meta { display: flex; flex: 0 0 auto; gap: 8px; padding-bottom: 3px; }
.calculator-meta span { display: inline-flex; min-height: 34px; align-items: center; padding: 0 11px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); font-size: 11px; font-weight: 800; white-space: nowrap; }

.section-heading { max-width: 820px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font: 400 clamp(36px,4.5vw,55px)/1.07 "DM Serif Display",Georgia,serif; letter-spacing: -.02em; text-wrap: balance; }
.section-heading > p:last-child { max-width: 720px; margin: 15px 0 0; color: var(--ink-soft); font-size: 16px; }
.section-muted { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--gold) 5%, var(--paper)); }
.pnp-workspace-empty { display: grid; min-height: 190px; place-content: center; gap: 8px; padding: 38px; text-align: center; }
.pnp-workspace-empty::before { content: "01 — CHOOSE A PROGRAM"; color: var(--gold-strong); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.pnp-workspace-empty strong { color: var(--ink); font: 400 29px/1.15 "DM Serif Display",Georgia,serif; }
.pnp-workspace-empty span { color: var(--ink-soft); font-size: 14px; }
.calculator-source-note { margin-top: 18px; padding: 18px 20px; border-left: 3px solid var(--gold); color: var(--ink-soft); background: color-mix(in srgb, var(--gold) 6%, var(--surface)); font-size: 13px; }
.calculator-source-note strong { color: var(--ink); }

.tool-note { padding: 24px 0; border-block: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.tool-note strong { color: var(--ink); }

@media (max-width: 980px) {
  .tool-hero-grid, .tool-directory-head { grid-template-columns: 1fr; gap: 28px; }
  .calculator-section-head { display: block; }
  .calculator-meta { margin-top: 18px; }
  .home-tool-grid { grid-template-columns: repeat(2,1fr); }
  .home-tool-card { border-bottom: 1px solid var(--line); }
  .home-tool-card:nth-child(2n) { border-right: 0; }
  .tool-calculator-section .program-calculator-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 700px) {
  .tool-hero { padding: 50px 0 52px; background: var(--paper); }
  .tool-breadcrumb { margin-bottom: 19px; }
  .tool-hero h1 { font-size: clamp(40px,12.5vw,58px); }
  .tool-hero p { margin-top: 18px; font-size: 16px; line-height: 1.7; }
  .tool-source { padding-left: 17px; }
  .tool-hero-actions { display: grid; }
  .tool-hero-actions .button { width: 100%; }
  .tool-directory { padding: 56px 0 72px; }
  .tool-grid, .home-tool-grid { grid-template-columns: 1fr; }
  .tool-card, .tool-card:nth-child(even) { min-height: 245px; padding: 28px 26px 62px; border-left: 0; border-bottom: 1px solid var(--line); }
  .tool-card:nth-child(even) b { right: 30px; }
  .tool-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tool-card:last-child { border-bottom: 0; }
  .home-tool-card, .home-tool-card:nth-child(2n) { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-tool-card:last-child { border-bottom: 0; }
  .tool-calculator-section { padding: 54px 0 76px; }
  .calculator-section-head h2, .section-heading h2 { font-size: clamp(35px,11vw,48px); }
  .calculator-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .calculator-meta span { justify-content: center; white-space: normal; text-align: center; }
  .pnp-workspace-empty { min-height: 170px; padding: 28px 20px; }
  .tool-calculator-section .program-calculator-grid { grid-template-columns: 1fr; }
  .tool-calculator-section input:not([type="checkbox"]),
  .tool-calculator-section select,
  .tool-calculator-section textarea { min-width: 0; max-width: 100%; min-height: 52px; font-size: 16px; box-sizing: border-box; }
  .tool-calculator-section textarea { min-height: 120px; padding-block: 13px; }
}
