* { box-sizing: border-box; }
body { line-height: 1.55; }
#header, #contentout, #footerin { width: min(100% - 32px, 1100px); margin-inline: auto; }
#header { height: auto; min-height: 64px; }
#logo { padding: 15px 0; width: auto; float: none; }
#logo img { max-width: 100%; height: auto; }
#contentout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; overflow: visible; padding-top: 20px; }
#content, #right { float: none; width: auto; min-width: 0; }
#content { overflow-wrap: anywhere; }
.topnav { font-size: .875rem; line-height: 1.6; margin-bottom: 12px; }
h1 { line-height: 1.25; font-size: clamp(1.5rem, 3vw, 2rem); }
input, select, button { font: inherit; }
input, select { max-width: 100%; }
.ucinput, .ucdcinput, .uchomeinput, .ucselect { width: 100%; min-width: 0; box-shadow: none; border: 1px solid #6b7c8f; padding: 10px; }
.ucdcsubmit { box-shadow: none; min-height: 44px; margin: 3px; }
#uctable, #qcvt table, #undctable > table { width: 100%; table-layout: fixed; }
#undctable > table td:first-child { width: 15%; }
#undctable > table td:nth-child(2) { width: 40%; }
#undctable > table td:nth-child(3) { width: 35%; }
#undctable > table td:nth-child(4) { width: 10%; }
.uccell { width: 50%; padding: 8px; }
#undctable, #qcvt { border: 1px solid #d2dce8; border-radius: 8px; background: #f5f8fc; padding: 12px; }
#ucresult, #calResults { color: #173b60; font-weight: 600; overflow-wrap: anywhere; }
.related-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.related-links div { width: auto; }
.related-links a { display: block; padding: 8px; }
.datatable { border-collapse: collapse; width: 100%; overflow-wrap: anywhere; }
.datatable th, .datatable td { padding: 9px; }
.datatable th { background: #173b60; }
.calculator-toggle { float: right; background: transparent; border: 1px solid #d2dce8; border-radius: 6px; min-width: 44px; min-height: 44px; cursor: pointer; }
:focus-visible { outline: 3px solid #b85c00; outline-offset: 3px; }
.skip-link { position: absolute; left: 8px; top: -100px; background: white; padding: 8px; z-index: 10; }
.skip-link:focus { top: 8px; }
#menu { margin: 0; padding: 0; }
#menu ul { display: flex; flex-wrap: wrap; gap: 4px; }
#menu li { display: block; }
#menu #menuon { width: auto; margin: 0; padding: 0; border: 0; }
#qcvt table td:first-child, #qcvt table td:last-child { width: 48%; }
#qcvt table td:nth-child(2) { width: 4%; }
#menu a, #menu button { display: block; padding: 9px; background: #003366; color: white; border: 1px solid #003366; border-radius: 4px; cursor: pointer; }
#menuon button { background: #e6f0fa; color: #003366; }
#sciInPut { min-width: 0; width: 100%; }
.calculator-wrapper { box-shadow: none; }
.row { flex-wrap: wrap; }
.row button { min-height: 44px; }
.rate-warning { padding: 12px; background: #fff3d6; border: 1px solid #a46a00; border-radius: 6px; }
.home-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-categories a { display: block; padding: 14px; border: 1px solid #d2dce8; border-radius: 6px; }
@media (max-width: 960px) {
  #contentout { grid-template-columns: minmax(0, 1fr); }
  #right { text-align: left; }
}
@media (max-width: 600px) {
  #header, #contentout, #footerin { width: calc(100% - 24px); }
  #undctable > table, #undctable > table > tbody, #undctable > table > tbody > tr, #undctable > table > tbody > tr > td { display: block; width: 100%; text-align: left; }
  #undctable > table td:nth-child(n) { width: 100%; }
  #undctable td:empty { display: none; }
  .uclabel { display: block; }
  .related-links { grid-template-columns: minmax(0, 1fr); }
  .ucselect { font-size: 14px; padding: 4px; }
  #qcvt td, .uccell { padding: 4px; }
}
