/* =========================================
   HR CALCULATOR - COMMON STYLES
   Base: Desktop-first, Mobile-responsive
   ========================================= */

/* CSS Variables for Consistency */
:root {
    --hrc-color-primary: #2e7d32;
    --hrc-color-primary-hover: #1b5e20;
    --hrc-color-error: #d32f2f;
    --hrc-color-text: #0f172a;
    --hrc-color-text-muted: #64748b;
    --hrc-color-border: #e9ecef;
    --hrc-color-bg: #fff;
    --hrc-color-bg-light: #f8fafc;
    --hrc-color-shadow: rgba(0, 0, 0, 0.03);
    --hrc-space-xs: 6px;
    --hrc-space-sm: 8px;
    --hrc-space-md: 12px;
    --hrc-space-lg: 16px;
    --hrc-border-radius: 6px;
    --hrc-font-size-base: 14px;
    --hrc-font-weight-bold: 700;
  }
  
  /* Main Container */
  .hr-calc {
    border: 1px solid var(--hrc-color-border);
    padding: var(--hrc-space-md);
    border-radius: var(--hrc-border-radius);
    position: relative;
    max-width: 100%;
  }
  
  .hr-calc-form {
    display: grid;
    gap: var(--hrc-space-sm);
  }
  
  .hr-calc button {
    background: var(--hrc-color-primary);
    color: #fff;
    border: none;
    padding: var(--hrc-space-sm) var(--hrc-space-md);
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
  }
  
  .hr-calc-result { margin-top: var(--hrc-space-sm); }
  
  /* Result Layout Overrides */
  .hr-calc .hrc-result {
    display: block !important;
    grid-template-columns: none !important;
  }
  
  .hr-calc .hrc-result .hrc-outcome,
  .hr-calc .hrc-outcome > *,
  .hr-calc .hrc-result > * {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .hr-calc .hrc-outcome,
  .hr-calc .hrc-result > .hrc-subtitle,
  .hr-calc .hrc-result > .hrc-outcome,
  .hr-calc .hrc-result > .hrc-table {
    grid-column: 1 / -1 !important;
  }
  
  /* Spinner */
  .hr-calc-spinner {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  
  .hr-calc-spinner .spin {
    width: 28px;
    height: 28px;
    border: 3px solid #cfd8dc;
    border-top-color: var(--hrc-color-primary);
    border-radius: 50%;
    animation: hr-rot 0.8s linear infinite;
  }
  
  @keyframes hr-rot { to { transform: rotate(360deg); } }
  
  /* Toast Notifications */
  #hr-calc-toast {
    position: fixed;
    top: 5%;
    right: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: end;
    z-index: 9999;
  }
  
  #hr-calc-toast .toast {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    padding: var(--hrc-space-sm);
    border-radius: 4px;
    color: #fff;
    min-width: 220px;
  }
  
  #hr-calc-toast .toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  #hr-calc-toast .toast.error { background: var(--hrc-color-error); }
  #hr-calc-toast .toast.success { background: var(--hrc-color-primary); }
  
  /* Header */
  .hrc-header {
    background: #f6f7f7;
    border: 1px solid #e3e3e3;
    padding: var(--hrc-space-md);
    border-radius: var(--hrc-border-radius);
    margin-bottom: var(--hrc-space-md);
  }
  
  .hrc-header h3 {
    margin: 0 0 var(--hrc-space-xs) 0;
    font-size: 28px;
    color: var(--hrc-color-primary);
  }
  
  .hrc-period {
    display: flex;
    gap: var(--hrc-space-lg);
    margin-bottom: var(--hrc-space-xs);
  }
  
  .hrc-notes {
    margin: 0;
    padding-left: 18px;
    color: #666;
    font-size: 13px;
  }
  
  /* Cards Grid */
  .hrc-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hrc-space-md);
    margin-bottom: var(--hrc-space-md);
  }
  
  .hrc-card {
    background: var(--hrc-color-bg);
    border: 1px solid var(--hrc-color-border);
    border-radius: var(--hrc-border-radius);
    padding: var(--hrc-space-md);
    min-width: 0;
  }
  
  .hrc-card-title {
    color: #777;
    font-size: 16px;
    margin-bottom: var(--hrc-space-xs);
  }
  
  .hrc-card-value {
    color: var(--hrc-color-primary);
    font-weight: var(--hrc-font-weight-bold);
    font-size: 18px;
  }
  
  /* General Grid & Inputs */
  .hrc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--hrc-space-md);
  }
  
  .hrc-field.full { grid-column: 1 / -1; }
  
  .hrc-input {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: var(--hrc-border-radius);
    padding: 0 var(--hrc-space-sm);
    background: var(--hrc-color-bg);
  }
  
  .hrc-input .ico {
    color: var(--hrc-color-primary);
    margin-right: var(--hrc-space-xs);
    display: inline-flex;
    align-items: center;
    min-width: 18px;
  }
  
  .hrc-input .unit {
    margin-left: var(--hrc-space-xs);
    color: #777;
    font-size: 12px;
  }
  
  .hrc-input input,
  .hrc-input select {
    border: 0;
    outline: none;
    flex: 1;
    min-width: 0;
    font-size: var(--hrc-font-size-base);
    background: transparent;
    box-sizing: border-box;
    padding: 0 var(--hrc-space-xs);
    height: 44px;
    line-height: normal;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
  
  .hrc-input:focus-within {
    border-color: var(--hrc-color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.08);
  }
  
  .hrc-input input:disabled,
  .hrc-input select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
  }
  
  /* Input Theme Compatibility */
  .hr-calc input[type="text"],
  .hr-calc input[type="number"],
  .hr-calc input[type="email"],
  .hr-calc input[type="tel"],
  .hr-calc select {
    width: 100%;
    box-shadow: none;
    background: transparent;
    border: 0;
    font: inherit;
    margin-bottom: 0;
  }
  
  .hr-calc input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
  }
  
  .hr-calc input[type="number"]::-webkit-outer-spin-button,
  .hr-calc input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  
  .hr-calc select { appearance: none; }
  
  .hr-calc ::placeholder { color: #9aa3af; opacity: 1; }
  
  /* Radio Buttons */
  .hrc-radio {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hrc-space-md);
    align-items: center;
  }
  
  .hrc-radio .inline { display: flex; align-items: center; }
  
  .hrc-radio-col {
    display: flex;
    flex-direction: column;
    gap: var(--hrc-space-sm);
    align-items: flex-start;
  }
  
  .hrc-radio-col .hrc-radio-item {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hrc-space-sm);
    align-items: center;
    width: 100%;
    align-items: baseline;
  }
  
  .hrc-radio-col .hrc-radio-item > label { margin-right: var(--hrc-space-xs); }
  
  .hrc-radio-col .hrc-radio-item .inline {
    min-width: 220px;
    max-width: 340px;
    flex: 1;
    min-inline-size: 0;
  }
  
  .hrc-radio-col .hrc-radio-item .inline input { width: 100%; }
  
  /* Screen Reader Only */
  .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
  /* Actions & Buttons */
  .hrc-actions {
    display: flex;
    gap: var(--hrc-space-md);
    align-items: center;
    margin: 0 auto;
  }
  
  .hrc-actions.full {
    grid-column: 1 / -1;
    justify-content: center;
  }
  
  .hr-calc .hrc-btn {
    background: var(--hrc-color-bg);
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: var(--hrc-space-sm) var(--hrc-space-md);
    border-radius: var(--hrc-border-radius);
    cursor: pointer;
    transition: background 0.2s ease;
  }
  
  .hr-calc .hrc-btn:hover { background: #f8fafc; }
  
  .hr-calc .hrc-btn.primary,
  .hr-calc .hrc-btn.is-active {
    background: var(--hrc-color-primary);
    color: #fff;
    border-color: var(--hrc-color-primary);
  }
  
  .hr-calc .hrc-btn.is-active:hover { opacity: 0.95; }
  
  /* Result Section */
  .hrc-result {
    margin-top: var(--hrc-space-lg);
    display: block;
    clear: both;
    overflow-x: auto;
  }
  
  .hr-calc .hrc-result > * {
    display: block;
    width: 100%;
    clear: both;
  }
  
  .hr-calc .hrc-result * { float: none !important; }
  
  .hrc-subtitle {
    margin: var(--hrc-space-lg) 0 var(--hrc-space-md);
    font-weight: var(--hrc-font-weight-bold);
    color: var(--hrc-color-text);
    display: block;
    clear: both;
  }
  
  .hrc-subtitle + .hrc-table { margin-top: var(--hrc-space-xs); padding: var(--hrc-space-lg);}
  
  /* Summary Grid */
  .hr-calc .hrc-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hrc-space-md);
    margin: var(--hrc-space-md) 0 var(--hrc-space-lg);
    width: 100%;
    grid-column: 1 / -1 !important;
  }
  
  .hr-calc .hrc-summary > * {
    flex: none !important;
    float: none !important;
    width: auto !important;
  }
  
  .hr-calc .hrc-summary .sum-item {
    background: var(--hrc-color-bg);
    border: 1px solid var(--hrc-color-border);
    border-radius: 8px;
    padding: var(--hrc-space-md);
    box-shadow: 0 1px 2px var(--hrc-color-shadow);
  }
  
  .hr-calc .hrc-summary .sum-title {
    color: var(--hrc-color-text-muted);
    font-size: 12px;
    letter-spacing: 0.2px;
    margin-bottom: var(--hrc-space-xs);
  }
  
  .hr-calc .hrc-summary .sum-value {
    font-weight: 800;
    color: var(--hrc-color-text);
    font-size: 18px;
    line-height: 1.2;
  }
  
  .hr-calc .hrc-summary .sum-item.highlight .sum-value { color: var(--hrc-color-primary); }
  
  /* Tables (General) */
  .hrc-table {
    display: table;
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--hrc-color-bg);
    border: 1px solid var(--hrc-color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px var(--hrc-color-shadow);
    clear: both;
    table-layout: fixed;
    padding: var(--hrc-space-lg);
  }
  
  .hrc-table th,
  .hrc-table td {
    padding: var(--hrc-space-md) var(--hrc-space-md);
    border-bottom: 1px solid #eef2f4;
  }
  
  .hrc-table td {
    width: 50%;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  
  .hrc-table tbody tr:nth-child(odd) td { background: #fcfcfd; }
  
  .hrc-table tr:last-child td { border-bottom: 0; }
  
  .hrc-table td strong {
    color: var(--hrc-color-text);
    font-size: 16px;
  }
  
  /* 3-Column Table Variant */
  .hr-calc .hrc-table.hrc-table-3col { table-layout: auto; }
  
  .hr-calc .hrc-table.hrc-table-3col th,
  .hr-calc .hrc-table.hrc-table-3col td {
    width: auto;
    text-align: left;
  }
  
  .hr-calc .hrc-table.hrc-table-3col td:nth-child(2),
  .hr-calc .hrc-table.hrc-table-3col td:nth-child(3),
  .hr-calc .hrc-table.hrc-table-3col th:nth-child(2),
  .hr-calc .hrc-table.hrc-table-3col th:nth-child(3) { text-align: right; }
  
  .hr-calc .hrc-table tbody th {
    text-align: left;
    color: var(--hrc-color-text);
    font-weight: 600;
    line-height: 1.6;
  }
  
  .hr-calc .hrc-table .hrc-emph th,
  .hr-calc .hrc-table .hrc-emph td {
    background: var(--hrc-color-bg-light);
    font-weight: var(--hrc-font-weight-bold);
  }
  
  .hr-calc .hrc-table .hrc-emph td strong { color: var(--hrc-color-primary); }
  
  .hr-calc .hrc-table tbody th em { color: var(--hrc-color-text-muted); font-weight: 500; font-style: italic; }
  
  .hrc-table tfoot td {
    background: #f1f5f9;
    font-weight: var(--hrc-font-weight-bold);
  }
  
  /* 5-Column Table Variant (e.g., BHTN Summary) */
  .hr-calc .hrc-table.hrc-table-5col {
    table-layout: fixed;
    margin-bottom: var(--hrc-space-sm);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  }
  
  .hr-calc .hrc-table.hrc-table-5col thead th {
    background: var(--hrc-color-bg-light);
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
  }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    color: var(--hrc-color-text);
    border-right: 1px solid #eef2f7;
    white-space: nowrap;
  }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:last-child { border-right: 0; }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:first-child { text-align: left; }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:nth-last-child(2) {
    background: #f0fdf4;
    color: #166534;
    font-weight: var(--hrc-font-weight-bold);
  }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:nth-last-child(2) strong,
  .hr-calc .hrc-table.hrc-table-5col tbody td:nth-child(4) strong,
  .hr-calc .hrc-table.hrc-table-5col tbody td:nth-child(5) strong { color: var(--hrc-color-primary); }
  
  .hr-calc .hrc-table.hrc-table-5col tbody td:has(> strong),
  .hr-calc .hrc-table.hrc-table-5col tbody td:has(> span.badge) { white-space: nowrap; }
  
  /* One-time Table Variant */
  .hr-calc .hrc-table.hrc-table-onetime thead th {
    background: var(--hrc-color-bg-light);
    color: #334155;
    font-weight: var(--hrc-font-weight-bold);
    text-align: center;
    padding: 8px 10px;
    white-space: nowrap;
  }
  
  .hr-calc .hrc-table.hrc-table-onetime tbody td {
    padding: 8px 10px;
    vertical-align: middle;
  }
  
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(1),
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(2),
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(3) { text-align: center; }
  
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(4),
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(5),
  .hr-calc .hrc-table.hrc-table-onetime tbody td:nth-child(6) {
    text-align: right;
    white-space: nowrap;
  }
  
  .hr-calc .hrc-table.hrc-table-onetime tfoot th { padding: 8px 10px; }
  
  /* Bullets */
  .hr-calc .hrc-bullets {
    list-style: disc;
    margin: var(--hrc-space-xs) 0 0 1.25rem;
    padding-left: 1.25rem;
  }
  
  .hr-calc .hrc-bullets li { margin: var(--hrc-space-xs) 0; }
  
  /* Utilities: Error, Disabled, Help */
  .hr-calc .is-error,
  .hr-calc .hrc-input input.is-error,
  .hr-calc select.is-error {
    border-color: var(--hrc-color-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08) !important;
  }
  
  .hr-calc .hrc-input input.is-error { outline: none; }
  
  .hr-calc .hrc-field.is-disabled { opacity: 0.6; }
  
  .hr-calc .hrc-field.is-disabled input[disabled] { cursor: not-allowed; }
  
  .hrc-help {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px dotted #2563eb;
  }
  
  .hrc-help:hover { opacity: 0.9; }
  
  .hr-calc .badge { display: initial; }
  
  /* Text Transform Reset */
  .hr-calc .uppercase,
  .hr-calc h6,
  .hr-calc span.widget-title,
  .hr-calc th,
  .hr-calc .hrc-table th,
  .hr-calc .hrc-table td,
  .hr-calc .hrc-card-title {
    text-transform: none;
    letter-spacing: normal;
  }
  
  /* BHTN Switch Panels */
  .hr-calc .js-bhtn-switch {
    position: relative;
    width: 100%;
  }
  
  .hr-calc .js-bhtn-switch > .js-bhtn-fixed,
  .hr-calc .js-bhtn-switch > .js-bhtn-changed {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 0;
  }
  
  .hr-calc .js-bhtn-switch > .is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
  }
  
  /* Header Tool Desc */
  .hr-calc .hrc-header .hrc-tool-desc p[class*="lh-"] { line-height: inherit !important; }
  .hr-calc .hrc-header .hrc-tool-desc ul { margin: var(--hrc-space-sm) 0 var(--hrc-space-sm) 1.25rem; }
  .hr-calc .hrc-header .hrc-tool-desc li { margin: 2px 0; }
  .hr-calc .hrc-header .hrc-tool-desc a { color: #2563eb; text-decoration: underline; }
  .hr-calc .hrc-header .hrc-tool-desc strong { font-weight: 600; }
  
  .hr-calc .hrc-header .hrc-notes.hrc-tool-desc {
    color: var(--hrc-color-text);
    font-size: 16px;
  }
  
  .hr-calc .hrc-header .hrc-notes.hrc-tool-desc p { margin-bottom: 0; }
  
  /* Modal */
  .hrc-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2 !important;
  }
  
  .hrc-modal.show { display: block; }
  
  .hrc-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
  }
  
  .hrc-modal .dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--hrc-color-bg);
    border-radius: 8px;
    width: max(750px, 65vw);
    max-height: 70vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2;
    display: flex;
    flex-direction: column;
  }
  
  .hrc-modal .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--hrc-space-md) var(--hrc-space-lg);
    border-bottom: 1px solid #e5e7eb;
    flex: 0 0 auto;
    background: var(--hrc-color-bg);
  }
  
  .hrc-modal .header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--hrc-color-primary);
  }
  
  .hrc-modal .header .close {
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    margin: 0 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    min-height: auto;
  }
  
  .hrc-modal .body {
    padding: var(--hrc-space-lg);
    color: var(--hrc-color-text);
    flex: 1 1 auto;
    overflow: auto;
  }
  
  .hrc-modal .body ul { margin: 0 0 var(--hrc-space-md) 1.25rem; }
  .hrc-modal .body ol { margin: 0 0 var(--hrc-space-xs) 1.25rem; }
  
  .hrc-modal .body p { margin: 0 0 1em; line-height: 1.6; }
  .hrc-modal .body h1,
  .hrc-modal .body h2,
  .hrc-modal .body h3,
  .hrc-modal .body h4,
  .hrc-modal .body h5,
  .hrc-modal .body h6 {
    margin: 1em 0 0.5em;
    font-weight: 700;
    line-height: 1.25;
  }
  
  .hrc-modal .body li { margin: 0.25em 0; }
  .hrc-modal .body a { color: #2563eb; text-decoration: underline; }
  .hrc-modal .body img,
  .hrc-modal .body video { max-width: 100%; height: auto; }
  .hrc-modal .body blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 3px solid #e2e8f0;
    background: var(--hrc-color-bg-light);
  }
  
  .hrc-modal .footer {
    padding: var(--hrc-space-md) var(--hrc-space-lg);
    border-top: 1px solid #e5e7eb;
    text-align: right;
    flex: 0 0 auto;
    background: var(--hrc-color-bg);
  }
  
  .hrc-modal .footer .btn {
    background: var(--hrc-color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--hrc-border-radius);
    padding: 0 var(--hrc-space-md);
    cursor: pointer;
    margin: 0 auto 0 0;
  }
  
  html.hrc-modal-open,
  body.hrc-modal-open {
    overflow: hidden;
    height: 100%;
  }
  
  /* Responsive: Mobile-First Structure */
  /* Base: Mobile (≤639px) */
  @media (max-width: 639px) {
    .hrc-cards,
    .hrc-grid,
    .hr-calc .hrc-summary {
      grid-template-columns: 1fr !important;
    }
  
    .hrc-period {
      flex-wrap: wrap;
      gap: var(--hrc-space-sm) var(--hrc-space-md);
    }
  
    .hrc-period label {
      display: inline-flex;
      align-items: center;
      width: 100%;
      line-height: 1.4;
    }
  
    .hrc-radio-col .hrc-radio-item .inline,
    .hrc-actions.full .hrc-btn {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
    }
    .hrc-actions.full{
        margin-top: var(--hrc-space-lg);
    }
  
    .hrc-table {
      table-layout: auto !important;
      display: block;
      overflow-x: auto;
    }
  
    .hrc-table col,
    .hrc-table col[style] { width: auto !important; }
  
    .hrc-table th,
    .hrc-table td {
      white-space: normal;
      /* word-break: break-word; */
    }
  
    .hrc-table.hrc-table-5col thead { display: none; }
    .hrc-table.hrc-table-5col,
    .hrc-table.hrc-table-5col tbody,
    .hrc-table.hrc-table-5col tr,
    .hrc-table.hrc-table-5col td {
      display: block;
      width: 100%;
    }
  
    .hrc-table.hrc-table-5col tr { border: 0; }
    .hrc-table.hrc-table-5col tbody td {
      text-align: center;
      border-right: 0;
      white-space: normal;
      background: transparent;
      padding: 10px 8px;
      margin: 0;
      border: 0;
    }
  
    .hrc-table.hrc-table-5col tbody td::before {
      content: attr(data-label);
      display: block;
      margin-bottom: 4px;
      color: var(--hrc-color-text-muted);
      font-weight: 600;
      font-size: 16px;
      text-align: center;
    }
  
    .hrc-table.hrc-table-5col tbody td strong { font-size: 16px; display: inline-block; }
  
    .hr-calc .hrc-header .hrc-tool-desc { padding: 10px 12px; font-size: 15px !important; line-height: 1.75 !important; }
    .hr-calc .hrc-header .hrc-notes.hrc-tool-desc { font-size: 15px !important; }
  
    .hrc-modal { padding-top: 0; }
    .hrc-modal .dialog { width: min(96vw, 720px); }
  }
  
  /* Tablet (640px - 899px) */
  @media (min-width: 640px) and (max-width: 899px) {
    .hrc-cards,
    .hr-calc .hrc-summary {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
  
    .hrc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  
    .hrc-radio-col .hrc-radio-item .inline { max-width: 100%; }
  }
  
  /* Desktop Small (900px+) - Base already covers */
  @media (min-width: 900px) {
    /* No changes needed; base is desktop-first */
  }