/* ==========================================================================
   LEGACY / COMPATIBILITY
   Retained compact and coral-era cascade layers. Do not delete or reorder
   during structural cleanup; scoped page overrides intentionally win later.
   ========================================================================== */
/* ONDO Compact Utility UI refinement */
body {
  background:
    radial-gradient(circle at 12% 5%, rgba(37, 99, 235, .10), transparent 28%),
    radial-gradient(circle at 92% 6%, rgba(249, 115, 91, .12), transparent 24%),
    linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 48%, #fff 100%);
}
.container { width: min(var(--container), calc(100% - 40px)); }
.header-inner { min-height: 64px; }
.brand-mark { width: 38px; height: 38px; border-radius: 14px; box-shadow: 0 12px 26px rgba(255, 107, 107, .18); }
.brand-text { font-size: 21px; }
.brand-sub { font-size: 10px; }
.site-nav a { min-height: 36px; padding: 7px 12px; font-size: 13px; }

.home-hero-compact { padding: 58px 0 46px; }
.compact-hero-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 34px; }
.hero-copy h1 { max-width: 680px; font-size: clamp(38px, 5vw, 62px); letter-spacing: -0.06em; }
.hero-copy p { max-width: 620px; font-size: 17px; }
.hero-search-mobile { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.compact-finder { padding: 26px; border-radius: 22px; box-shadow: var(--shadow-md); }
.search-label { font-size: 19px; }
.search-field { min-height: 58px; border-radius: 18px; }
.compact-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-metrics div { padding: 11px 10px; border-radius: 14px; }
.compact-metrics strong { font-size: 18px; }
.compact-section { padding: 42px 0; }
.compact-section-heading { margin-bottom: 18px; }
.section-heading h2, .section-card-head h2, .panel-heading h2 { font-size: clamp(24px, 2.8vw, 34px); }
.compact-featured-grid { gap: 14px; }
.tool-grid { gap: 14px; }
.tool-card { min-height: 96px; padding: 14px; border-radius: 16px; box-shadow: var(--shadow-xs); }
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool-icon { width: 42px; height: 42px; border-radius: 15px; box-shadow: 0 10px 24px rgba(255, 107, 107, .16); }
.tool-card strong { font-size: 16px; }
.tool-card small { font-size: 12px; line-height: 1.38; }
.compact-category-block { padding: 18px; border-radius: 18px; }
.category-block + .category-block { margin-top: 18px; }
.category-heading { margin-bottom: 14px; }
.category-heading h3 { font-size: 22px; }

.tool-page { padding: 28px 0 58px; }
.tool-hero-compact { grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; margin-bottom: 16px; }
.tool-title-card, .tool-side-card, .calculator-panel, .section-card { border-radius: 20px; box-shadow: var(--shadow-sm); }
.tool-title-card { padding: clamp(22px, 4vw, 34px); }
.tool-hero h1 { margin: 6px 0 12px; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -0.055em; }
.tool-title-card p { max-width: 760px; font-size: 16px; line-height: 1.58; }
.tool-breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.tool-breadcrumb a { color: var(--primary-dark); }
.tool-meta-row { gap: 8px; margin-bottom: 10px; }
.tool-meta-row span, .tool-hero-note, .meta-chip { min-height: 28px; padding: 5px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 900; }
.meta-primary { background: var(--primary); color: #fff; }
.tool-hero-note { margin-top: 16px; }
.tool-quick-actions { gap: 8px; margin-top: 14px; }
.tool-quick-link { min-height: 36px; padding: 7px 12px; font-size: 12px; }
button.tool-quick-link { border: 1px solid var(--line-strong); background: rgba(255,255,255,.78); color: var(--ink); box-shadow: var(--shadow-xs); }
.tool-check-card { padding: 22px; background: #111827; }
.side-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.side-card-icon { width: 46px; height: 46px; margin: 0; border-radius: 16px; font-size: 12px; }
.side-card-label { color: #fda4af; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.tool-side-card strong { font-size: 18px; }
.side-check-list { display: grid; gap: 8px; margin: 12px 0 16px; padding: 0; list-style: none; }
.side-check-list li { position: relative; padding-left: 18px; color: #dbe7f3; font-size: 13px; line-height: 1.45; }
.side-check-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.side-card-link { display: inline-flex; justify-content: center; width: fit-content; padding: 8px 12px; border-radius: var(--pill); background: #fff; color: var(--ink); font-size: 13px; font-weight: 950; }

.calculator-panel { margin-top: 16px; padding: clamp(22px, 3vw, 32px); }
.compact-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.panel-badge { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border-radius: var(--pill); background: var(--success-bg); border: 1px solid #bbf7d0; color: var(--success); font-size: 12px; font-weight: 950; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
label { gap: 6px; font-size: 14px; }
input, select, textarea { min-height: 50px; padding: 11px 13px; border-radius: 14px; }
textarea { min-height: 210px; }
button { min-height: 50px; padding: 11px 18px; }
.button-row { margin-top: 18px; }
.result-box { margin-top: 18px; padding: 18px; border-radius: 16px; font-size: 16px; line-height: 1.62; }
.result-metric-grid { gap: 10px; }
.result-metric { min-height: 82px; padding: 12px; border-radius: 13px; }
.result-metric strong { font-size: 20px; }
.result-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.06); }
.result-table { width: 100%; min-width: 640px; border-collapse: collapse; color: #fff; font-size: 13px; }
.result-table th, .result-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: right; white-space: nowrap; }
.result-table th:first-child, .result-table td:first-child { text-align: center; }
.result-table th { color: #cbd5e1; font-weight: 950; background: rgba(255,255,255,.08); }
.result-table tr:last-child td { border-bottom: 0; }
.result-download { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 14px; padding: 10px 16px; border-radius: var(--pill); background: #fff; color: var(--ink); font-size: 14px; font-weight: 950; box-shadow: var(--shadow-xs); }
.result-download:hover, .result-download:focus-visible { color: var(--primary-dark); outline: 0; }
.mask-canvas-shell { margin-top: 18px; padding: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); }
.mask-canvas-shell canvas { display: block; width: min(100%, 1000px); height: auto; margin: 0 auto; border-radius: 12px; background: #fff; box-shadow: var(--shadow-xs); touch-action: none; }
.result-actions { margin-top: 12px; }
.result-action-button { min-height: 42px; padding: 9px 14px; font-size: 13px; }

.result-box {
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.result-box .result-summary {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.result-box .result-main-grid,
.result-box .result-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.result-box .result-metric {
  min-height: 62px;
  padding: 9px 10px;
  border-radius: 11px;
}

.result-box .result-metric span {
  font-size: 11px;
}

.result-box .result-metric strong {
  font-size: 17px;
}

.result-box .result-metric small {
  font-size: 10.5px;
}

.result-box .result-table-wrap {
  margin-top: 9px;
  border-radius: 11px;
}

.result-box .result-table th:first-child,
.result-box .result-table td:first-child {
  text-align: left;
}

.result-box .result-note {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.45;
}

.result-box .result-list,
.result-box .result-compact-list {
  margin-top: 9px;
  padding: 9px 11px;
  border-radius: 11px;
}

.result-box .result-list strong,
.result-box .result-compact-list strong {
  margin-bottom: 5px;
  font-size: 12px;
}

.result-box .result-list ul,
.result-box .result-compact-list ul {
  gap: 3px;
}

.result-box .result-list li,
.result-box .result-compact-list li {
  font-size: 12px;
  line-height: 1.35;
}

