/* One Fitness Hub public tools; use the established marketing tokens. */
.tool-workspace { scroll-margin-top: 100px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.tool-layout > *, .tool-output, .tool-table { min-width: 0; }
.tool-output { padding-top: 16px; }
.tool-output .num { display: block; font-size: clamp(1.8rem, 4.2vw, 3.3rem); line-height: 1.2; margin: 8px 0 20px; overflow-wrap: anywhere; }
.tool-output p { margin-bottom: 14px; }
.tool-output h3 { margin-top: 24px; font-size: 1.1rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.tool-actions .btn, .tool-search .btn { min-height: 44px; }
.tool-workspace [hidden], .tool-workspace [hidden] *, .tool-search [hidden] { display: none !important; }
.tool-workspace fieldset { border: 1px solid var(--rule); padding: 18px; margin: 18px 0; min-width: 0; }
.tool-workspace legend { padding: 0 8px; font-weight: 700; }
.tool-workspace .field input, .tool-workspace .field select { min-height: 44px; min-width: 0; width: 100%; }
.tool-workspace .field select { text-overflow: ellipsis; }
.tool-workspace .field input:focus-visible, .tool-workspace .field select:focus-visible, .tool-workspace button:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.tool-workspace button:disabled { opacity: .5; cursor: not-allowed; }
.tool-workspace .tool-table { overflow-x: auto; margin-bottom: 20px; }
.tool-workspace table { font-size: .9rem; width: 100%; }
.tool-workspace th, .tool-workspace td { padding: 12px 8px; white-space: normal; overflow-wrap: anywhere; }
.tool-workspace th { font-family: var(--body); }
.tool-workspace td:last-child, .tool-workspace th:last-child { min-width: 75px; }
.tool-workspace .recipe-tool-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--rule); }
.recipe-tool-item > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.recipe-tool-item > .calc-grid { grid-template-columns: minmax(0, 1fr) 90px; gap: 12px; }
.recipe-tool-item .field { margin-bottom: 0; }
.recipe-tool-item > [data-custom-fields] { grid-column: 1 / -1; }
.recipe-tool-item > button { align-self: end; padding: 10px 12px; }
.recipe-tool-item .field > span { font-size: .76rem; }
.recipe-tool-item + [data-add-ingredient] { margin-top: 18px; }
.tool-share-status { white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-search { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.tool-search .field { flex: 1 1 280px; margin: 0; }
.tool-search + .link-list { margin: 16px 0; }
.tool-search + .link-list:empty { display: none; }
#route-map { height: 500px; min-height: 320px; border: 1px solid var(--rule); z-index: 1; background: var(--platform); }
.route-marker { background: var(--brand); border: 2px solid var(--chalk); border-radius: 50%; color: var(--chalk); text-align: center; font: 700 14px/40px var(--body); box-shadow: 0 1px 5px var(--iron); }
.route-points { padding-left: 24px; }
.route-points li { border-bottom: 1px solid var(--rule); padding: 12px 0; overflow-wrap: anywhere; }
.route-points .tool-actions { margin: 8px 0; gap: 8px; }
.route-points .btn { padding: 8px 12px; }
.tool-workspace .leaflet-control-zoom a { min-width: 44px; min-height: 44px; line-height: 44px; }
.tool-workspace .leaflet-control-attribution a { color: #004b73; }
.tool-goals { margin-top: 24px; }
.tool-rules-summary { border-left: 3px solid var(--brand); padding-left: 20px; }
.tool-embedded .masthead, .tool-embedded .site-menu, .tool-embedded .site-foot, .tool-embedded .demo-flag, .tool-embedded .demo-panel, .tool-embedded .band:not(.tool-workspace), .tool-embedded .page-hero .crumb { display: none !important; }
.tool-embedded .page-hero { padding: 24px 0; }
.tool-embedded .page-hero h1 { font-size: 2rem; }
.tool-embedded .tool-workspace { padding-top: 12px; }
.tool-attribution { display: block; margin: 24px auto; padding: 12px 20px; max-width: 1180px; }
@media (max-width: 800px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  #route-map { height: 400px; }
  .tool-search .btn { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .tool-workspace fieldset { padding: 12px; }
  .tool-workspace .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-workspace .recipe-tool-item { grid-template-columns: minmax(0, 1fr); }
  .tool-workspace .recipe-tool-item > .calc-grid { grid-template-columns: minmax(0, 1fr) 85px; }
  .recipe-tool-item > button { justify-self: start; }
}
@media print {
  body { background: white; color: black; }
  .masthead, .site-menu, .site-foot, .demo-flag, .demo-panel, .tool-actions, .store-badge, .tool-search, .leaflet-control-zoom, [data-place-results], [data-route-point], .tool-workspace button, form[data-calc="club"] { display: none !important; }
  .tool-workspace, .tool-output, .page-hero, .band { color: black; background: white; padding: 16px 0; }
  .tool-layout { display: block; }
  .tool-workspace .num, .tool-workspace p, .tool-workspace td, .tool-workspace th { color: black; }
  .tool-workspace input, .tool-workspace select { color: black; background: white; border-color: #888; }
  .tool-table { overflow: visible; }
  .shell { width: 100%; max-width: none; }
  .tool-output::before { content: 'One Fitness Hub · onefitnesshub.com'; display: block; font-weight: bold; margin-bottom: 16px; }
  .band:has(.closer), .band:has(.browser-frame), .band:has(.device) { display: none; }
  #route-map { break-inside: avoid; }
}
