:root {
  font-family: Inter, system-ui, sans-serif;
  color: #102642;
  background: #f2f5f9;
  line-height: 1.55;
  --line: #d4e1ef;
  --blue: #0879f9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: #164d91; text-underline-offset: .16em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #136bc9;
  outline-offset: 3px;
}
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 5; background: white; padding: .6rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header {
  min-height: 68px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding: .55rem max(1rem, calc((100% - 1160px) / 2));
}
.brand img { display: block; width: 150px; height: auto; }
.header-links, .breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.header-links a { display: inline-flex; align-items: center; min-height: 44px; }
.wrap { max-width: 1192px; margin: auto; padding: 1rem 1rem 3rem; }
.breadcrumbs { font-size: .9rem; margin: 0 0 1rem; }
.calculator-heading { margin: 0 0 1rem; }
.calculator-heading h1 { margin: 0 0 .35rem; font-size: clamp(1.75rem, 4vw, 2.8rem); line-height: 1.15; }
.calculator-heading p { margin: 0; color: #455e77; }
h2 { margin: 0 0 .6rem; font-size: clamp(1.15rem, 2.8vw, 1.55rem); line-height: 1.2; }
p { margin: .55rem 0 .85rem; }
.settings, .reading { background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 44px rgba(24,61,104,.07); }
.settings, .reading, .result { padding: clamp(16px, 2.8vw, 30px); margin-bottom: .75rem; scroll-margin-top: 1rem; }
.settings-section + .settings-section { margin-top: 24px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .85rem; }
.settings-actions button { flex: 0 1 auto; }
#mode .choices { max-width: 34rem; }
.choices, .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: .3rem; font-weight: 650; }
input, button, summary { font: inherit; min-height: 44px; }
input, button { border: 1px solid #a5b6c9; border-radius: 14px; padding: 10px 12px; }
input { min-width: 0; width: 100%; color: #17314f; background: white; }
button { cursor: pointer; background: #f7faff; color: #173d69; }
button[aria-pressed="true"] { border-color: var(--blue); background: #ddebfb; box-shadow: inset 0 0 0 1px var(--blue); font-weight: 700; }
summary { cursor: pointer; padding-block: .55rem; color: #164d91; }
details { margin: .5rem 0; }
#volume-field { max-width: 17rem; }
.result { background: linear-gradient(145deg, #143a68, #214f84); color: white; border-radius: 24px; }
.result strong { display: block; font-size: clamp(1.8rem, 6vw, 3.2rem); overflow-wrap: anywhere; }
.result p:empty { display: none; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .35rem; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child { text-align: left; }
thead { background: #edf3fa; }
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .breadcrumbs { margin-bottom: .7rem; }
  .fields.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-section label { font-size: .88rem; }
  .settings-section input { font-size: 1rem; }
  .choices button { padding-inline: .35rem; font-size: .9rem; }
}
html { scroll-padding-bottom: 86px; }
input[data-origin="example"] { background: #fff4c2; border-color: #b99b42; }
input[data-origin="manual"] { background: #e5f6ec; border-color: #6ba888; }
.input-legend { display: flex; flex-wrap: wrap; gap: .5rem; margin: .55rem 0 0; font-size: .8rem; }
.input-legend span { padding: .15rem .5rem; border-radius: .4rem; background: #fff4c2; }
.input-legend span + span { background: #e5f6ec; }
#lumber-form { margin-bottom: 1.75rem; }
.result { margin-bottom: .65rem; }
.faq details + details { border-top: 1px solid var(--line); }
.wrap .gh-related-calculators__links { flex-wrap: wrap; overflow-x: visible; margin-right: 0; padding-right: 0; }
.wrap .gh-related-calculators__links a { min-height: 44px; }

.size-presets { margin: 0 0 20px; }

.preset-options { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .25rem; }
.preset-options button { min-width: 5.4rem; font-size: .9rem; }

td button[data-table-size] { width: 100%; min-width: 44px; min-height: 44px; padding: .3rem; color: #164d91; background: #eef5ff; border-color: #b3cce9; }
td button[data-table-size]:hover { background: #dcecff; }


.settings { background: linear-gradient(180deg, #eef3f8, #eaf1f8); }
.settings h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.3; }
.settings h2 { margin-bottom: 12px; font-size: 20px; }
.field-hint, .input-legend { font: 400 13px/1.55 Inter, Arial, sans-serif; letter-spacing: normal; }
.field-hint { margin: 4px 0 12px; color: #53647a; }
.preset-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preset-options button, .choices button { min-height: 48px; font-size: 14px; font-weight: 700; }
.fields { gap: 16px; }
.fields label, #volume-field { font-size: 15px; font-weight: 700; }
.settings input { min-height: 56px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.own-dimensions-title { padding-top: 18px; border-top: 1px solid #c9d9eb; }
.settings-actions { margin-top: 20px; }
.settings-actions button { min-height: 48px; font-weight: 700; }
#calculation-ready { padding: 12px 14px; margin: 16px 0 0; background: #e5f1fd; border-radius: 14px; }
.input-legend { gap: 8px 12px; margin-top: 12px; }
.result h2 { color: #dce9f6; font-size: 18px; }
.result strong { margin: 8px 0 16px; font-size: clamp(34px, 5vw, 54px); line-height: 1.15; }
#result-origin, #result-formula { font-size: 13px; line-height: 1.55; color: #c5d8ec; }
#result-formula { padding: 12px 0; border-block: 1px solid #48678b; }
@media (max-width: 420px) {
  .fields.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fields.three label:last-child { grid-column: 1 / -1; }
  .preset-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices button { font-size: 13px; }
  .settings-section label { font-size: 14px; }
}

.result #result-caption { margin: 0 0 22px; max-width: 36rem; color: #dce9f6; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.result-metrics > div { min-width: 0; padding: 14px; background: rgb(7 27 57 / 25%); border: 1px solid rgb(197 216 236 / 20%); border-radius: 14px; }
.result-metrics dt { color: #c5d8ec; font-size: 13px; line-height: 1.4; }
.result-metrics dd { margin: 8px 0 0; color: white; font-size: clamp(19px, 2.8vw, 26px); font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.purchase-result { margin-top: 20px; padding-top: 20px; border-top: 1px solid #48678b; }
#purchase-heading { color: #dce9f6; font-size: 14px; margin: 0; }
.result #purchase-count { font-size: 30px; margin: 8px 0 16px; }
.result-method { margin-top: 20px; border-top: 1px solid #48678b; padding-top: 8px; }
.result-method summary { color: #dce9f6; font-size: 14px; }
.result #result-formula { border: 0; padding: 0; margin: 10px 0; }
@media(max-width:359px) {
 .result-metrics { grid-template-columns: minmax(0, 1fr); }
}

/* Full mobile acceptance fixes, 20261117. */
#table th:first-child { white-space: nowrap; }
#table th, #table td { padding-inline: 4px; }
.settings label .field-hint { margin: 2px 0 0; font-weight: 400; }
.result.is-party .purchase-metrics { grid-template-columns: minmax(0, 1fr); }
body[data-calculator="adaptive-lumber-article"] .calculator-global-brand {
 display: inline-flex; align-items: center; min-height: 44px;
}
@media(max-width:660px) {
 body[data-calculator="adaptive-lumber-article"] .gh-site-header .gh-site-menu {
  width:44px!important;min-width:44px!important;min-height:44px!important;
 }
}

.reading h3 { margin: 24px 0 10px; font-size: 18px; line-height: 1.3; }
.reading .method-formula { padding: 16px; border: 1px solid #c9d9eb; border-radius: 14px; background: #eef5fd; line-height: 1.7; overflow-wrap: anywhere; }
