:root {
  color-scheme: light;
  font-family: "Archivo", Arial, Helvetica, sans-serif;
  color: #09090b;
  background: #fbfaf6;
}

* { box-sizing: border-box; }

body.blog-page { margin: 0; background: #fbfaf6; line-height: 1.5; max-width: 100%; }

.hourly-floor-page a { color: inherit; text-underline-offset: 0.15em; }

.hourly-floor-page a:focus-visible, .hourly-floor-page button:focus-visible, .hourly-floor-page input:focus-visible, .hourly-floor-page select:focus-visible {
  outline: 3px solid #8cb8d1;
  outline-offset: 3px;
}

.page-width { width: min(100% - 32px, 1200px); margin-inline: auto; }

.tool-page { padding: 40px 0 48px; }
.intro { max-width: 880px; margin-bottom: 24px; }
.back-to-blog-top { margin-bottom: 24px; }
.hourly-floor-page .back-link { color: #f26247; font-family: "Archivo", Arial, sans-serif; font-size: 0.94rem; font-weight: 700; text-decoration: none; }
.hourly-floor-page .blog-meta { margin: 0 0 16px; padding: 0; border: 0; }
.prototype-notice { margin: 0 0 16px; padding: 12px; border-left: 5px solid #f26247; background: #ffffff; font-weight: 700; }
.hourly-floor-page h1, .hourly-floor-page h2, .hourly-floor-page h3, .hourly-floor-page button, .hourly-floor-page input, .hourly-floor-page legend, .hourly-floor-page label, .hourly-floor-page summary { font-family: "Archivo", Arial, Helvetica, sans-serif; }
.hourly-floor-page h1, .hourly-floor-page h2, .hourly-floor-page h3 { line-height: 1.15; }
.hourly-floor-page h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.hourly-floor-page h2 { margin: 0 0 16px; font-size: 1.45rem; }
.hourly-floor-page h3 { margin: 0 0 8px; font-size: 1.1rem; }
.lede { max-width: 700px; margin: 24px 0 0; font-family: "PT Serif", Georgia, Times, serif; font-size: 1.15rem; }
.planning-warning { margin: 16px 0 0; font-weight: 700; }
.blog-figure { margin: 24px 0 0; }
.blog-figure img { display: block; width: 100%; height: auto; border: 1px solid #e4e4e7; border-radius: 6px; }
.blog-hero-figure { position: relative; margin-top: 0; }
.blog-hero-figure img { aspect-ratio: 16 / 9; object-fit: cover; }
.hero-title { position: absolute; top: 50%; left: 50%; width: min(80%, 640px); transform: translate(-50%, -50%); color: #09090b; font: 700 clamp(1.6rem, 4vw, 3.8rem)/1.02 "PT Serif", Georgia, serif; text-align: center; }
.hero-title span { display: block; }

.calculator-section { margin-bottom: 40px; }
.calculator-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr); gap: 20px; align-items: start; min-width: 0; }
.hourly-floor-page form, .result-panel { min-width: 0; max-width: 100%; }
.hourly-floor-page form { background: #ffffff; border: 1px solid #d8d7d1; padding: 24px; }
.calculator-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.calculator-heading-row h2 { margin-bottom: 0; }
.currency-control { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.8rem; }
.hourly-floor-page select { min-height: 40px; padding: 7px 30px 7px 9px; border: 1px solid #77756f; border-radius: 0; background: #ffffff; color: #09090b; font: 500 0.82rem "Archivo", Arial, sans-serif; }
.input-section { border-top: 1px solid #d8d7d1; }
.input-section:last-of-type { border-bottom: 1px solid #d8d7d1; }
.input-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 1.15rem; font-weight: 700; }
.input-section > summary::-webkit-details-marker { display: none; }
.input-section > summary::after { content: "+"; color: #c54831; font: 600 1.4rem/1 "JetBrains Mono", monospace; }
.input-section[open] > summary::after { content: "-"; }
.section-body { padding: 0 0 18px; }
.hourly-floor-page fieldset { min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; }
.hourly-floor-page legend { margin-bottom: 16px; font-weight: 700; font-size: 1.1rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; min-width: 0; }
.field-group { min-width: 0; }
.money-field { grid-column: 1 / -1; }
.hours-field { grid-column: 1 / -1; }
.income-target-field { grid-column: 1 / -1; }
.income-tax-field { grid-column: 1 / -1; }
.field-group-wide { grid-column: 1 / -1; }
.input-with-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.input-with-toggle > input { min-width: 0; }
.money-input { position: relative; min-width: 0; }
.money-input input { padding-left: 30px; }
.currency-symbol { position: absolute; top: 50%; left: 11px; z-index: 1; transform: translateY(-50%); color: #5b5a54; font-family: "JetBrains Mono", monospace; pointer-events: none; }
.hourly-floor-page label { display: block; margin-bottom: 6px; font-weight: 700; }
.hourly-floor-page input { width: 100%; max-width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #77756f; border-radius: 0; color: #09090b; background: #ffffff; font: inherit; }
.hourly-floor-page input[aria-invalid="true"] { border: 2px solid #a51d16; }
.field-help, .field-error { margin: 6px 0 0; font-family: "PT Serif", Georgia, Times, serif; font-size: 0.92rem; }
.field-error { min-height: 1.5em; color: #a51d16; font-weight: 700; }
.period-toggle { display: flex; align-items: stretch; gap: 0; margin: 0; padding: 0; border: 1px solid #77756f; }
.period-toggle legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.period-toggle label { position: relative; display: inline-flex; align-items: center; min-height: 31px; margin: 0; padding: 0 7px; border-left: 1px solid #77756f; background: #ffffff; cursor: pointer; font-size: 0.68rem; white-space: nowrap; }
.period-toggle label:first-of-type { border-left: 0; }
.period-toggle label:has(input:checked) { background: #09090b; color: #ffffff; }
.period-toggle label:has(input:focus-visible) { outline: 3px solid #8cb8d1; outline-offset: -3px; }
.period-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.percent-input { position: relative; }
.percent-input input { padding-right: 30px; }
.percent-input span { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); color: #5b5a54; font-family: "JetBrains Mono", monospace; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.live-result-note { margin: 0 auto 0 0; color: #5b5a54; font-family: Georgia, Times, serif; font-size: 0.92rem; }
.hourly-floor-page button { min-height: 44px; padding: 10px 16px; border: 1px solid #09090b; border-radius: 0; cursor: pointer; font-weight: 700; }
.hourly-floor-page button:disabled { cursor: not-allowed; opacity: 0.65; }
.primary-action { background: #f26247; color: #09090b; }
.secondary-action { background: #ffffff; color: #09090b; }

.result-panel { position: sticky; top: 98px; z-index: 1; align-self: start; display: flex; flex-direction: column; background: #09090b; color: #ffffff; padding: 32px; min-height: 260px; }
.result-kicker, .cta-kicker { margin: 0 0 12px; color: #f26247; font: 600 0.75rem/1.2 "JetBrains Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.result-panel h2 { color: #ffffff; }
.result-panel > p { margin: 0; }
.result-lines { margin-top: 22px; font-family: "JetBrains Mono", ui-monospace, monospace; word-break: normal; }
.result-lines p { margin: 0; padding: 12px 0; border-top: 1px solid #38383a; }
.result-lines p:first-child { padding-top: 0; border-top: 0; }
.result-lines p:first-child { padding: 4px 0 20px; color: #f26247; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; }
.unavailable-message { color: #ffffff; }
.no-script-message { margin: 20px 0 0; padding: 12px; border: 1px solid #77756f; background: #ffffff; font-weight: 700; }

.content-section { max-width: 800px; min-width: 0; margin-bottom: 36px; font-family: "PT Serif", Georgia, Times, serif; }
.content-section h2, .content-section h3 { font-family: "Archivo", Arial, Helvetica, sans-serif; }
.hourly-floor-page code, .hourly-floor-page pre { font-family: "JetBrains Mono", ui-monospace, monospace; }
.hourly-floor-page code { overflow-wrap: anywhere; }
.hourly-floor-page pre { margin: 0; padding: 14px; overflow-wrap: anywhere; white-space: pre-wrap; background: #ffffff; border-left: 4px solid #d8d7d1; font-size: 0.9rem; }
.example + .example { margin-top: 20px; }
.example-breakdown { margin: 0; padding: 0; border: 1px solid #d8d7d1; background: #ffffff; }
.example-breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 10px 14px; border-top: 1px solid #e8e7e2; }
.example-breakdown > div:first-child { border-top: 0; }
.example-breakdown dt, .example-breakdown dd { margin: 0; }
.example-breakdown dt { color: #5b5a54; }
.example-breakdown dd { font-family: "JetBrains Mono", ui-monospace, monospace; text-align: right; }
.example-breakdown .example-total { font-weight: 700; }
.example-breakdown .example-result { background: #09090b; color: #ffffff; font-weight: 700; }
.example-breakdown .example-result dt { color: #ffffff; }
.example-breakdown .example-result dd { color: #f26247; font-size: 1.1rem; }
.hourly-floor-page li + li { margin-top: 10px; }
.roadbase-cta { max-width: 800px; margin-bottom: 40px; }
.cta-product-figure { margin-top: 0; }
.cta-product-figure figcaption { margin-top: 8px; color: #5b5a54; font: 0.92rem/1.45 "PT Serif", Georgia, serif; }
.blog-cta-box { margin-top: 28px; padding: 28px; background: #09090b; color: #ffffff; }
.blog-cta-box h3 { margin: 0 0 10px; color: #ffffff; }
.blog-cta-box p { max-width: 620px; margin: 0; font: 1.05rem/1.55 "PT Serif", Georgia, serif; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cta-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 15px; font-family: "Archivo", Arial, sans-serif; font-weight: 700; text-decoration: none; }
.cta-actions .primary { background: #f26247; color: #09090b; }
.cta-actions .secondary { border: 1px solid rgba(255,255,255,0.35); color: #ffffff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .result-panel { top: 90px; }
}

@media (max-width: 760px) {
  .calculator-workspace { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .input-with-toggle { grid-template-columns: minmax(0, 1fr); }
  .period-toggle { width: max-content; max-width: 100%; }
  .money-field { grid-column: auto; }
  .period-toggle label { padding-inline: 9px; }
  .field-group-wide { grid-column: auto; }
  .actions { flex-direction: column; align-items: stretch; }
  .hourly-floor-page h1 { font-size: 1.75rem; }
  .intro { margin-bottom: 10px; }
  .lede { margin: 10px 0; font-size: 1rem; }
  .planning-warning { margin-top: 10px; font-size: 0.9rem; }
  .calculator-section h2 { margin-bottom: 8px; }
  .hourly-floor-page form { padding: 16px; }
  .hourly-floor-page legend { margin-bottom: 10px; }
  .result-panel { top: 82px; }
}

@media (max-width: 220px) {
  .page-width { width: min(100% - 24px, 1200px); }
  .tool-page { padding-top: 8px; }
  .prototype-notice, .hourly-floor-page form, .result-panel { padding: 8px; }
  .intro { margin-bottom: 6px; }
  .prototype-notice, .lede, .planning-warning { font-size: 0.5rem; line-height: 1.15; }
  .prototype-notice { margin: 0 0 4px; border-left-width: 3px; }
  .hourly-floor-page h1 { font-size: 0.9rem; line-height: 1.05; }
  .lede { margin: 4px 0; }
  .planning-warning { margin-top: 4px; }
  .calculator-section h2 { margin-bottom: 4px; font-size: 0.8rem; }
  .hourly-floor-page legend { margin-bottom: 4px; font-size: 0.7rem; }
  .hourly-floor-page label { margin-bottom: 3px; font-size: 0.65rem; }
  .field-help, .field-error { margin-top: 3px; font-size: 0.55rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .hourly-floor-page button { width: 100%; }
  .period-toggle label { padding-inline: 8px; font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hourly-floor-page *, .hourly-floor-page *::before, .hourly-floor-page *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
