.bed-page { padding-top: 0; }
.bed-header { max-width: 800px; margin: 44px 0 42px; }
.bed-header h1 { max-width: 760px; margin: 18px 0 24px; font-size: clamp(42px, 5vw, 64px); }
.bed-header .intro { max-width: 740px; color: var(--muted); font-size: 18px; }
.bed-workspace { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: start; }
.bed-form { min-width: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.bed-form fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.bed-form legend { width: 100%; padding: 0; font-size: 15px; line-height: 1.6; font-weight: 650; color: var(--ink); }
.bed-form legend.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.bed-form .bed-controls > fieldset { margin-top: 28px; }
.bed-help { color: #596252; font-size: 12px; line-height: 1.75; }
.bed-shapes > div { display: flex; gap: 10px; margin-top: 12px; }
.bed-shapes label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid #bfc9b6; cursor: pointer; font-size: 14px; }
.bed-shapes label:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.bed-shapes input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.bed-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bed-field { min-width: 0; margin-top: 14px; }
.bed-field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.bed-field > label span { font-weight: 400; }
.bed-field > input { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #aab69f; border-radius: 0; background: white; color: var(--ink); font-size: 16px; }
.bed-field > input::placeholder { color: #6b736b; opacity: 1; }
.bed-field > input[aria-invalid="true"] { border: 2px solid #a13d26; }
.bed-field .bed-help { margin-top: 7px; }
.bed-depth { margin-top: 20px; }
.bed-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 29px; }
.bed-actions .button { gap: 20px; }
.bed-reset { padding: 12px 0; min-height: 46px; border: 0; background: none; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); font-size: 12px; }
.bed-reset:hover { color: var(--accent); }
.bed-status { font-size: 12px; line-height: 1.7; color: var(--ink); }
.bed-status:not(:empty) { padding-top: 16px; }
.bed-private { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 16px; }
.bed-errors { color: #7b2c1b; background: #fff0e8; border-left: 3px solid #a13d26; padding: 15px 17px; margin: 20px 0; font-size: 13px; line-height: 1.75; }
.bed-errors p { font-weight: 600; }
.bed-errors ul { padding-left: 18px; margin: 8px 0 0; }
.bed-errors a { text-decoration: underline; text-underline-offset: 3px; }
.bed-result-column { min-width: 0; }
.bed-placeholder, .bed-result { padding: 31px; background: var(--soft); }
.bed-placeholder h2, .bed-result h2 { font-size: clamp(30px, 3vw, 39px); line-height: 1.15; margin: 17px 0 22px; }
.bed-placeholder > p:last-child { color: #596252; font-size: 14px; line-height: 1.85; }
.bed-result-input { font-size: 12px; color: #596252; line-height: 1.8; }
.bed-result dl { margin: 25px 0 21px; }
.bed-result dl > div { padding: 17px 0; border-top: 1px solid #c5ceb9; }
.bed-result dt { font-size: 12px; }
.bed-result dd { margin: 5px 0 0; color: var(--ink); font: 32px/1.15 var(--serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.bed-result .bed-primary-result dd:first-of-type { font-size: clamp(34px, 3.7vw, 46px); }
.bed-result dd.bed-volume-small { margin-top: 8px; font: 14px/1.7 var(--sans); letter-spacing: 0; }
.bed-advice { padding: 28px 0 0; }
.bed-advice h2 { font-size: 27px; margin-bottom: 15px; }
.bed-advice p { color: var(--muted); font-size: 13px; line-height: 1.85; margin-bottom: 17px; }
.bed-reading { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; margin-top: 66px; padding-top: 44px; border-top: 1px solid var(--line); }
.bed-reading h2 { font-size: 32px; margin: 15px 0 22px; }
.bed-reading p, .bed-limits p { font-size: 14px; line-height: 1.85; }
.bed-formulas { margin: 0 0 22px; }
.bed-formulas > div { margin-top: 17px; }
.bed-formulas dt { color: var(--ink); font-size: 13px; font-weight: 650; }
.bed-formulas dd { margin: 4px 0 0; font-size: 13px; line-height: 1.85; }
.bed-example { padding: 26px 29px; border: 1px solid var(--line); align-self: start; }
.bed-example ol { padding-left: 19px; margin: 22px 0; font-size: 14px; line-height: 1.85; }
.bed-example li { padding-left: 4px; margin-top: 10px; }
.bed-example p.bed-help { font-size: 12px; }
.bed-limits { margin-top: 60px; padding-top: 39px; border-top: 1px solid var(--line); }
.bed-limits > h2 { max-width: 680px; font-size: 34px; margin-bottom: 28px; }
.bed-limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 44px; }
.bed-limits h3 { font-size: 23px; margin-bottom: 12px; }
.bed-limits p { color: #596252; }
.bed-next { margin-top: 30px; }
.bed-next a, .bed-feedback a { text-decoration: underline; text-underline-offset: 3px; }
.bed-feedback { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .bed-header { margin-top: 31px; }
  .bed-workspace, .bed-reading { grid-template-columns: 1fr; gap: 27px; }
  .bed-form, .bed-placeholder, .bed-result { padding: 24px; }
  .bed-placeholder h2 br { display: none; }
  .bed-advice { padding-top: 24px; }
  .bed-reading { margin-top: 42px; padding-top: 32px; }
  .bed-limits { margin-top: 39px; }
}
@media (max-width: 430px) {
  .bed-form, .bed-placeholder, .bed-result, .bed-example { padding: 20px; }
  .bed-fields { gap: 12px; }
  .bed-shapes > div { gap: 8px; }
  .bed-shapes label { padding: 12px 10px; gap: 7px; font-size: 13px; }
  .bed-limits-grid { grid-template-columns: 1fr; gap: 25px; }
  .bed-header h1 { font-size: 42px; }
  .bed-actions { gap: 10px 16px; }
  .bed-actions .button { width: 100%; }
}
