/* OTW redesign. Wordmark shown in the header, sidebar, and footer is /assets/otw-logo.png
   (380x72, from otw-logo.svg). Header box is 190x36; footer box is 148x28.
   Tab and home-screen icons are the square horizon mark (favicon.ico, apple-touch-icon, assets/icons). */
:root {
  --otw-ink: #10203a;
  /* Shared OTW theme, sampled from the owner screenshot.
     Discipline icons and the buttons that match them are not these variables.
     White on #6846BA is 6.62:1 (WCAG AA). #895CF5 is the lighter mark and the
     focus ring (4.27:1 on white, above the 3:1 non-text minimum; not used for
     small text). #4A2D86 is the hover fill (white text 10.44:1). */
  --otw-primary: #6846BA;
  --otw-primary-light: #895CF5;
  --otw-primary-dark: #4A2D86;
  --otw-focus: var(--otw-primary-light);
  --otw-blue: var(--otw-primary);
  --otw-blue-d: var(--otw-primary-dark);
  --otw-muted: #5c6c82;
  --otw-line: #e3eaf3;
  --otw-bg: #f5f7fb;
  --otw-soft: #f4effb;
  --otw-soft-line: #d4c6f3;
  --otw-wash: #efe8fb;
  --otw-card: #fff;
  --otw-warn: #8a5a12;
  --otw-warn-bg: #fff6e6;
  --otw-shadow: 0 10px 30px rgba(16, 32, 64, .06);
}
html { height: 100%; }
body.otw-redesign {
  background: #fff;
  color: var(--otw-ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  /* The soft-launch banner is taken out of flow. This padding is its slot, so showing it does not push the page. */
  padding-top: 40px;
  /* Short pages: header stays at the top, footer at the bottom of the visible viewport.
     100dvh tracks the mobile browser address bar, so showing or hiding it does not leave a gap. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.otw-redesign > main,
body.otw-redesign > #app {
  flex: 1 0 auto;
  min-width: 0;
  max-width: 100%;
}
body.otw-redesign > header.otw-bar,
body.otw-redesign > footer.otw-foot,
body.otw-redesign .otw-calc,
body.otw-redesign .otw-work,
body.otw-redesign .otw-review,
body.otw-redesign .otw-stepper,
body.otw-redesign .m-tags,
body.otw-redesign #app h1,
body.otw-redesign #app h1 small {
  min-width: 0;
  max-width: 100%;
}
body.otw-redesign #app.wrap { box-sizing: border-box; overflow-x: auto; }
body.otw-redesign #app[hidden] { display: block !important; }
body.otw-redesign #app[data-otw-shell] .m-grid { display: none; }
body.otw-redesign .skip { position: absolute; left: -999px; top: 8px; }
body.otw-redesign > .wrap:has(> .gate) { display: none !important; }
#otw-reset { display: none !important; }
.howto-slot, .howto-row { min-height: 44px; }
body.otw-redesign > header.otw-bar {
  position: sticky;
  top: 0;
  flex: none;
}
#otw-preview { position: absolute; top: 0; left: 0; right: 0; z-index: 45; box-sizing: border-box; }
#otw-offline-banner { display: none; }
#otw-offline-banner.is-on { display: flex; }
html.otw-banner-off body.otw-redesign { padding-top: 0; }
body.otw-redesign img { max-width: 100%; }
body.otw-redesign .otw-logo-img { height: 36px; width: 190px; max-width: 190px; max-height: 36px; display: block; object-fit: contain; }
body.otw-redesign .otw-logo-img.otw-logo-img-foot { height: 28px; width: 148px; max-width: 148px; max-height: 28px; }
body.otw-redesign .otw-hit img { width: 36px; height: 36px; max-height: 36px; }

/* Header */
body.otw-redesign header.otw-bar {
  display: block;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--otw-line);
  box-shadow: none;
  padding: 0;
  height: auto;
  gap: 0;
}
.otw-bar-in {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 68px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.otw-logo { display: flex; align-items: center; flex: none; }
.otw-navdetails { flex: 1 1 auto; min-width: 0; }
.otw-menu {
  display: none;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--otw-line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--otw-ink);
}
.otw-menu::-webkit-details-marker { display: none; }
.otw-nav { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.otw-nav a, .otw-drop > summary {
  color: var(--otw-ink);
  text-decoration: none;
  font-weight: 650;
  font-size: .98rem;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: normal;
}
.otw-nav a:hover, .otw-drop > summary:hover { background: var(--otw-bg); }
.otw-nav-search { display: inline-flex; align-items: center; gap: 8px; }
.otw-nav-search svg { flex: none; }
.otw-drop { position: relative; }
.otw-drop:not([open]) > .otw-drop-panel { display: none !important; }
.otw-drop > summary { list-style: none; cursor: pointer; }
.otw-drop > summary::-webkit-details-marker { display: none; }
.otw-drop-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--otw-line);
  border-radius: 14px;
  min-width: 240px;
  padding: 8px;
  box-shadow: var(--otw-shadow);
}
.otw-drop-panel a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--otw-ink); text-decoration: none; font-weight: 650; }
.otw-drop-panel a:hover { background: var(--otw-soft); }
.otw-signin {
  margin-left: 0;
  border: 1.5px solid var(--otw-blue);
  color: var(--otw-blue) !important;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.otw-signin:hover { background: var(--otw-soft); }
@media (min-width: 861px) {
  .otw-bar-in { flex-wrap: nowrap; }
  .otw-navdetails { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
  .otw-menu { display: none !important; }
  .otw-navdetails > .otw-nav { display: flex !important; flex-direction: row; flex-wrap: nowrap; align-items: center; width: auto; min-width: max-content; }
  .otw-signin { margin-left: 12px; }
}
@media (max-width: 860px) {
  .otw-bar-in { padding: 8px 14px; min-height: 56px; flex-wrap: wrap; }
  .otw-logo { order: 1; }
  .otw-signin { order: 2; margin-left: auto; }
  .otw-navdetails { display: contents; }
  .otw-menu { display: inline-flex; align-items: center; order: 3; }
  .otw-navdetails:not([open]) > .otw-nav { display: none; }
  .otw-navdetails[open] > .otw-nav { display: flex; flex: 1 1 100%; order: 4; flex-direction: column; align-items: stretch; padding: 4px 0 10px; }
  .otw-drop-panel { position: static; box-shadow: none; border: 0; padding: 0 0 0 8px; min-width: 0; }
}

/* Footer */
body.otw-redesign footer.otw-foot {
  background: transparent;
  color: var(--otw-muted);
  text-align: left;
  margin-top: auto;
  margin-bottom: 0;
  padding: 8px 24px 28px;
  border-top: 0;
  flex: none;
}
.otw-foot-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}
.otw-foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.otw-foot-links a { color: var(--otw-blue); font-weight: 700; text-decoration: none; }
.otw-foot-note { margin: 0 0 0 auto; color: var(--otw-muted); font-size: .92rem; }
@media (max-width: 800px) {
  .otw-foot-note { margin-left: 0; flex: 1 1 100%; }
}

/* Home */
.otw-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 28px;
  align-items: center;
}
.otw-kicker {
  margin: 0 0 12px;
  color: var(--otw-blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.otw-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--otw-ink);
  font-weight: 800;
}
.otw-hero h1 .otw-blue { color: var(--otw-blue); display: inline; }
.otw-lede { margin: 16px 0 0; font-size: 1.2rem; color: #3d4d63; }
.otw-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 22px; }
.otw-btn, button.otw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--otw-blue);
  color: #fff !important;
  border: 0;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.otw-btn:hover:not(:disabled):not([disabled]):not([aria-disabled="true"]) { background: var(--otw-primary-dark); }
.otw-btn.alt { background: #fff; color: var(--otw-primary) !important; border: 1.5px solid var(--otw-primary); }
.otw-btn.alt:hover:not(:disabled):not([disabled]):not([aria-disabled="true"]) { background: var(--otw-soft); }
.otw-btn:focus-visible,
.otw-signin:focus-visible,
.otw-textlink:focus-visible {
  outline: 3px solid var(--otw-focus);
  outline-offset: 2px;
}
.otw-btn:disabled,
.otw-btn[disabled],
.otw-btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}
.otw-textlink { color: var(--otw-primary); font-weight: 750; text-decoration: none; }
.otw-textlink:hover { text-decoration: underline; }
/* Generic navy buttons on pages that are not a discipline. Discipline pages
   keep body[data-discipline] .btn colors from styles.css. */
body.otw-redesign:not([data-discipline]) .btn:not(.ghost):not(.alt):not(.sky),
body.otw-redesign:not([data-discipline]) nav a.btn,
body.otw-redesign:not([data-discipline]) .actions #go {
  background: var(--otw-primary);
  border-color: var(--otw-primary);
  color: #fff;
}
body.otw-redesign:not([data-discipline]) .btn:not(.ghost):not(.alt):not(.sky):hover:not(:disabled),
body.otw-redesign:not([data-discipline]) nav a.btn:hover,
body.otw-redesign:not([data-discipline]) .actions #go:hover:not(:disabled) {
  background: var(--otw-primary-dark);
  border-color: var(--otw-primary-dark);
  color: #fff;
}
body.otw-redesign:not([data-discipline]) .btn.alt {
  background: #fff;
  color: var(--otw-primary);
  border-color: var(--otw-primary);
}
body.otw-redesign:not([data-discipline]) .btn.alt:hover:not(:disabled) {
  background: var(--otw-soft);
  color: var(--otw-primary);
}
body.otw-redesign :focus-visible {
  outline: 3px solid var(--otw-focus);
  outline-offset: 2px;
}
.otw-hero-art { position: relative; min-width: 0; container-type: inline-size; }
.otw-hero-art img { width: 100%; height: auto; max-width: 100%; display: block; }
.otw-flow {
  position: absolute;
  right: 2%;
  bottom: 2%;
  margin: 0;
  max-width: 96%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--otw-shadow);
  padding: 0.78em 1.05em;
  font-size: clamp(0.88rem, 4.35cqi, 1.08rem);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.25;
  color: var(--otw-ink);
}
.otw-flow small { display: block; font-size: 1em; font-weight: 600; letter-spacing: 0; color: var(--otw-muted); margin-top: 0.22em; }
.otw-home { max-width: 1180px; margin: 0 auto; padding: 12px 24px 8px; }
.otw-home h2 { margin: 8px 0 18px; font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.03em; }
.otw-eyebrow { margin: 18px 0 0; color: var(--otw-muted); font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.otw-dgrid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.otw-drow {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--otw-line);
  text-decoration: none;
  color: inherit;
}
.otw-drow strong { display: block; font-size: 1.05rem; }
.otw-drow small { display: block; color: var(--otw-muted); font-size: .92rem; }
.otw-dico { color: var(--otw-blue); display: grid; place-items: center; }
.otw-dico svg { width: 28px; height: 28px; }
.otw-go { color: var(--otw-blue); font-size: 1.2rem; }
.otw-specialty { margin-top: 28px; }
.otw-specialty h2 { font-size: 1.3rem; }
.otw-spec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.otw-spec-list a { color: var(--otw-ink); font-weight: 700; text-decoration: none; }
.otw-spec-list a:hover { color: var(--otw-blue); }
@media (max-width: 800px) {
  .otw-hero, .otw-dgrid, .otw-spec-list { grid-template-columns: 1fr; }
  .otw-hero { padding-top: 18px; }
  .otw-flow { position: static; margin-top: 12px; display: inline-block; max-width: 100%; }
}

/* Discipline + search */
.otw-page { max-width: 1180px; margin: 0 auto; padding: 18px 24px 28px; }
.otw-crumb { color: var(--otw-muted); font-size: .92rem; margin: 0 0 10px; }
.otw-crumb a { color: var(--otw-blue); text-decoration: none; font-weight: 700; }
.otw-page-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.otw-page h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; }
.otw-page .otw-sub { margin: 6px 0 0; color: #3d4d63; max-width: 40rem; }
.otw-example-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--otw-line);
  border-radius: 14px;
  padding: 10px 12px 10px 16px;
  background: #fff;
}
/* Filters sit in a sticky right column. Below 900px they collapse behind a Filters button above the list. */
.otw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; margin-top: 22px; align-items: start; }
.otw-layout > aside {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100dvh - 100px);
  overflow: auto;
  min-width: 0;
  padding-right: 2px;
}
.otw-layout > :not(aside) { grid-column: 1; grid-row: 1; min-width: 0; }
.otw-filter-toggle { display: none; }
.otw-filter-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--otw-blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}
.otw-filter-badge[hidden] { display: none !important; }
.otw-filter-chev {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex: none;
}
.otw-filter-toggle[aria-expanded="false"] .otw-filter-chev { transform: rotate(135deg); }
.otw-layout > aside select { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.otw-side-label { margin: 0 0 8px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: var(--otw-muted); }
.otw-filters { display: flex; flex-direction: column; gap: 4px; }
.otw-filters button, .otw-filters a.otw-chip {
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--otw-ink);
}
.otw-filters button[aria-pressed="true"], .otw-filters label.is-on {
  background: var(--otw-soft);
  color: var(--otw-blue);
  font-weight: 750;
}
.otw-check { display: flex; gap: 8px; align-items: flex-start; padding: 6px 2px; font-weight: 650; }
.otw-check input { margin-top: 3px; accent-color: var(--otw-blue); }
.otw-hit {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid var(--otw-line);
  text-decoration: none;
  color: inherit;
}
.otw-hit.is-feature { background: var(--otw-soft); border: 1px solid var(--otw-soft-line); border-radius: 16px; padding: 16px; margin-bottom: 8px; }
.otw-hit h3 { margin: 0; font-size: 1.05rem; }
.otw-hit h3 a { color: inherit; text-decoration: none; }
.otw-method { display: block; color: var(--otw-muted); font-size: .86rem; font-weight: 650; }
.otw-desc { margin: 4px 0 0; color: #3d4d63; }
.otw-open { color: var(--otw-blue); font-weight: 800; text-decoration: none; white-space: nowrap; }
.otw-need { display: none; grid-column: 2 / -1; flex-wrap: wrap; gap: 8px 18px; color: var(--otw-muted); font-size: .9rem; }
.otw-hit.is-feature .otw-need { display: flex; }
.otw-need b { color: var(--otw-ink); }
.otw-badge { display: inline-block; margin-left: 8px; background: #fff4d6; color: #6a4a00; border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 2px 8px; vertical-align: middle; }
.otw-plan { display: inline-block; margin-top: 4px; color: var(--otw-blue); font-size: .82rem; font-weight: 750; }
.otw-search-hero { text-align: center; padding: 28px 16px 8px; }
.otw-search-hero h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.03em; }
.otw-search-hero h1 span { color: var(--otw-blue); }
.otw-searchbox { max-width: 720px; margin: 18px auto 0; display: flex; gap: 8px; }
.otw-searchbox input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  min-height: 52px;
  padding: 0 14px;
  font: inherit;
  font-size: 1rem;
}
.otw-help { text-align: center; margin-top: 18px; background: var(--otw-soft); border-radius: 14px; padding: 14px 16px; }
@media (min-width: 1024px) {
  body.otw-has-sb .otw-layout > aside { top: 16px; max-height: calc(100dvh - 32px); }
}
@media (max-width: 900px) {
  .otw-layout { grid-template-columns: 1fr; }
  .otw-layout > aside,
  .otw-layout > :not(aside) {
    grid-column: 1;
    position: static;
    max-height: none;
    overflow: visible;
  }
  .otw-layout > aside { grid-row: 1; }
  .otw-layout > :not(aside) { grid-row: 2; }
  .otw-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0 0 8px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #cfd8e6;
    background: #fff;
    color: var(--otw-ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
  }
  .otw-filter-toggle:hover { border-color: var(--otw-blue); color: var(--otw-blue); }
  .otw-filter-toggle:focus-visible { outline: 3px solid var(--otw-focus); outline-offset: 2px; }
  .otw-filter-toggle[aria-expanded="true"] { background: var(--otw-soft); border-color: var(--otw-soft-line); color: var(--otw-primary); }
  .otw-layout > aside:not(.is-open) > :not(.otw-filter-toggle) { display: none !important; }
  .otw-layout > aside.is-open {
    border: 1px solid var(--otw-line);
    border-radius: 16px;
    padding: 12px;
    background: var(--otw-bg);
  }
  .otw-filters { flex-direction: column; flex-wrap: nowrap; }
}
@media (min-width: 901px) {
  .otw-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    margin: 0 0 12px;
    padding: 4px 2px 8px;
    border: 0;
    border-bottom: 1px solid var(--otw-line);
    border-radius: 0;
    background: #fff;
    color: var(--otw-ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .otw-filter-toggle-label { order: 1; }
  .otw-filter-chev { order: 2; margin-left: auto; }
  .otw-filter-badge { order: 3; }
  .otw-filter-toggle:hover { color: var(--otw-blue); }
  .otw-filter-toggle:focus-visible { outline: 3px solid var(--otw-focus); outline-offset: 2px; }
  html.otw-filters-collapsed .otw-layout,
  .otw-layout.is-collapsed {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 12px;
  }
  html.otw-filters-collapsed .otw-layout > aside,
  .otw-layout.is-collapsed > aside {
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  html.otw-filters-collapsed .otw-layout > aside > :not(.otw-filter-toggle),
  .otw-layout.is-collapsed > aside > :not(.otw-filter-toggle) {
    display: none !important;
  }
  html.otw-filters-collapsed .otw-filter-toggle,
  .otw-layout.is-collapsed .otw-filter-toggle {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 48px;
    min-height: 148px;
    margin: 0;
    padding: 14px 0;
    gap: 12px;
    border: 1px solid var(--otw-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--otw-shadow);
    position: sticky;
    top: 16px;
  }
  html.otw-filters-collapsed .otw-filter-chev,
  .otw-layout.is-collapsed .otw-filter-chev { order: 1; margin-left: 0; }
  html.otw-filters-collapsed .otw-filter-toggle-label,
  .otw-layout.is-collapsed .otw-filter-toggle-label {
    order: 2;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: .08em;
    font-size: .82rem;
  }
  html.otw-filters-collapsed .otw-filter-badge,
  .otw-layout.is-collapsed .otw-filter-badge { order: 3; }
}
@media (max-width: 800px) {
  .otw-hit { grid-template-columns: 36px minmax(0, 1fr); }
  .otw-open { grid-column: 2; }
  .otw-searchbox { flex-direction: column; }
  .otw-page-head { align-items: stretch; }
  .otw-example-card { width: 100%; justify-content: space-between; }
}

/* App shell */
.otw-calc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.otw-stepper { display: flex; align-items: center; gap: 8px; list-style: none; margin: 8px 0 18px; padding: 0; flex-wrap: wrap; }
.otw-stepper button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; font: inherit; color: var(--otw-muted); cursor: pointer; padding: 4px;
}
.otw-stepper .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid #c5d0e0; font-weight: 800; font-size: .85rem;
}
.otw-stepper button[aria-current="step"] { color: var(--otw-blue); font-weight: 800; }
.otw-stepper button[aria-current="step"] .n, .otw-stepper button.is-done .n { background: var(--otw-blue); color: #fff; border-color: var(--otw-blue); }
.otw-stepper .rule { flex: 1 1 24px; height: 2px; background: #d5deea; min-width: 16px; }
.otw-calc[data-step="0"] [data-otw-step="1"],
.otw-calc[data-step="1"] [data-otw-step="0"],
.otw-calc[data-step="2"] .otw-formhost { display: none !important; }
.otw-calc:not([data-step="2"]) .otw-review { display: none !important; }
.otw-calc:not([data-step="2"]) #go { display: none !important; }
.otw-calc[data-step="0"] #otw-back, .otw-calc[data-step="2"] #otw-next, .otw-calc:not([data-step="0"]) #load { display: none !important; }
.otw-calc:not([data-step="2"]) .otw-report, .otw-calc[data-step="2"] .otw-summary { display: none !important; }
.otw-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.otw-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.otw-summary, .otw-report, .otw-result-hero {
  background: #f4f7fb;
  border-radius: 18px;
  padding: 16px 16px 18px;
}
.otw-summary h2, .otw-report h2 { margin: 0 0 10px; font-size: 1.25rem; }
.otw-kv { width: 100%; border-collapse: collapse; font-size: .92rem; }
.otw-kv th { text-align: left; color: var(--otw-muted); font-weight: 650; padding: 7px 8px 7px 0; }
.otw-kv td { text-align: right; padding: 7px 0; font-weight: 700; }
.otw-kv tr { border-top: 1px solid #e1e8f2; }
.otw-pending { text-align: center; color: var(--otw-muted); padding: 18px 8px 6px; }
.otw-pending strong { display: block; color: var(--otw-ink); font-size: 1.2rem; margin-top: 6px; }
.otw-result-hero { background: var(--otw-wash); margin-bottom: 14px; }
.otw-result-k { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: var(--otw-muted); }
.otw-result-num { margin: 4px 0; font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -.04em; color: var(--otw-blue); line-height: 1; font-weight: 800; overflow-wrap: anywhere; }
.otw-warn { background: var(--otw-warn-bg); color: var(--otw-warn); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.otw-acc { border-top: 1px solid var(--otw-line); }
.otw-acc summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.otw-acc .b { padding: 0 0 12px; color: #3d4d63; }
body.otw-redesign #app h1 { color: var(--otw-ink); letter-spacing: -.03em; }
body.otw-redesign #app h1 small { color: var(--otw-muted); font-weight: 650; }
body.otw-redesign .otw-calc .field { margin: 0 0 12px; min-width: 0; }
body.otw-redesign .otw-calc input, body.otw-redesign .otw-calc select, body.otw-redesign .otw-calc textarea {
  max-width: 100%;
  box-sizing: border-box;
}
body.otw-redesign #app[data-otw-shell] .m-grid { display: none; min-width: 0; }
body.otw-redesign #results { overflow-x: auto; max-width: 100%; }
.otw-formhost { position: relative; min-height: 34rem; }
.otw-skel { position: absolute; inset: 0; display: grid; gap: 10px; margin: 0; min-height: 0; }
.otw-review { min-height: 18rem; }
.otw-side { min-height: 22rem; }
.otw-result-hero { min-height: 8.5rem; }
.otw-skel i { display: block; height: 46px; border-radius: 10px; background: linear-gradient(90deg, #e7edf5 25%, #f7f9fc 50%, #e7edf5 75%); background-size: 200% 100%; animation: otw-shimmer 1.1s linear infinite; }
@keyframes otw-shimmer { to { background-position: -200% 0; } }
.otw-calc.has-fields .otw-skel { display: none; }
body.otw-redesign #results table { max-width: 100%; }
@media (max-width: 900px) {
  .otw-calc { grid-template-columns: 1fr; }
  .otw-side { position: static; }
  body.otw-redesign #app.wrap { padding-left: 16px; padding-right: 16px; }
}

/* Pricing: no horizontal overflow at 390px */
body.otw-redesign.pricing-page { background: #fff; overflow-x: clip; }
.otw-price-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 40px; min-width: 0; }
.otw-price-wrap h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; }
.otw-bill { display: flex; justify-content: center; margin: 18px 0; }
.otw-bill .toggle { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--otw-bg); border-radius: 999px; padding: 4px; max-width: 100%; }
.otw-bill button { border: 0; background: transparent; font: inherit; font-weight: 750; border-radius: 999px; padding: 8px 14px; cursor: pointer; color: var(--otw-ink); }
.otw-bill button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 4px rgba(16,32,64,.12); }
.otw-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; min-width: 0; }
.otw-plan-card {
  border: 1px solid var(--otw-line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.otw-plan-card.is-feature { border-color: var(--otw-soft-line); background: var(--otw-soft); }
.otw-plan-card h2 { margin: 0; font-size: 1.2rem; }
.otw-plan-card .amt { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.otw-plan-card .amt span { font-size: 1rem; font-weight: 650; color: var(--otw-muted); }
.otw-plan-card .otw-btn { width: 100%; }
.otw-plan-card ul { margin: 0; padding-left: 1.1rem; flex: 1; }
.otw-plan-card li { margin: 4px 0; }
.otw-wait { margin: 0; background: var(--otw-warn-bg); color: var(--otw-warn); border-radius: 10px; padding: 8px 10px; font-weight: 700; }
body.yearly .otw-mo, body:not(.yearly) .otw-yr { display: none; }
.otw-quote { border: 1px dashed var(--otw-line); border-radius: 16px; padding: 16px; margin-top: 18px; }
.otw-states { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.otw-states li { background: var(--otw-bg); border-radius: 6px; padding: 2px 8px; font-weight: 800; }
.otw-fine { color: var(--otw-muted); font-size: .92rem; }
.otw-err { color: #9b1c1c; min-height: 1.2em; }
@media (max-width: 480px) {
  body.otw-redesign header.otw-bar,
  body.otw-redesign header.otw-bar .otw-nav,
  body.otw-redesign .otw-nav a {
    flex-wrap: wrap !important;
    white-space: normal !important;
    height: auto !important;
  }
  .otw-price-wrap { padding-left: 12px; padding-right: 12px; }
  .otw-plan-card .amt { font-size: 1.7rem; }
  .otw-signin { padding: 8px 12px; }
}

/* Left sidebar. Width is reserved on the body before paint. Login has no sidebar. */
.otw-sb {
  position: fixed;
  z-index: 60;
  top: 40px;
  left: 0;
  bottom: 0;
  width: 280px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 1px 0 0 #eef0f3;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
html.otw-banner-off .otw-sb { top: 0; }
.otw-sb-logo { display: flex; align-items: center; height: 64px; padding: 0 16px; flex: none; }
.otw-sb-logo img { height: 36px; width: 190px; max-width: 100%; }
.otw-sb-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px 0 16px;
  color: #0d2340;
  font: 800 12px/1 system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.otw-sb-collapse, .otw-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #0d2340;
  border-radius: 8px;
  cursor: pointer;
  flex: none;
}
.otw-sb-nav { display: flex; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; padding-bottom: 20px; }
.otw-sb-nav > a.otw-sb-row, .otw-sb-sub > a.otw-sb-row { width: 100%; box-sizing: border-box; }
.otw-sb-group, .otw-sb-sub, .otw-sb-rowline { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.otw-sb-rowline { display: flex; align-items: stretch; min-height: 64px; }
.otw-sb-rowline > a { flex: 1 1 auto; min-width: 0; }
.otw-sb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 16px;
  color: #1c2430;
  text-decoration: none;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}
.otw-sb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otw-sb-sub .otw-sb-label {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}
.otw-sb-row[aria-current="page"],
.otw-sb-rowline:has(> a[aria-current="page"]) { background: #eceef1; }
.otw-sb-row[aria-current="page"] { font-weight: 700; }
.otw-sb-row:hover { background: #f6f7f9; }
.otw-sb-chev {
  width: 44px;
  border: 0;
  background: transparent;
  color: #5c6c82;
  cursor: pointer;
  flex: none;
}
.otw-sb-chev::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.otw-sb-group.is-open > .otw-sb-rowline .otw-sb-chev::before { transform: rotate(45deg); }
.otw-sb-sub .otw-sb-row { min-height: 56px; padding-left: 20px; padding-right: 10px; gap: 8px; font-size: 15px; }
.otw-sb-sub .otw-ico { width: 24px; height: 24px; }
.otw-sb-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 55; }
.otw-sb-backdrop[hidden] { display: none !important; }
.otw-burger { display: none; }
.otw-related ul { list-style: none; padding-left: 0; margin: 0; }
.otw-related a, .otw-spec-list a { display: flex; align-items: center; gap: 10px; }
body[data-app] #app > h1 { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: center; }
body[data-app] #app > h1::before { grid-column: 1; grid-row: 1 / span 2; width: 48px; height: 48px; }
body[data-app] #app > h1 > span { grid-column: 2; grid-row: 1; }
body[data-app] #app > h1 small { grid-column: 2; grid-row: 2; display: block; }
@media (min-width: 1024px) {
  body.otw-has-sb { box-sizing: border-box; padding-left: 280px; }
  html.otw-sb-icons body.otw-has-sb { padding-left: 72px; }
  body.otw-has-sb > header.otw-bar { display: none !important; }
  html.otw-sb-icons .otw-sb { width: 72px; }
  html.otw-sb-icons .otw-sb-label,
  html.otw-sb-icons .otw-sb-chev,
  html.otw-sb-icons .otw-sb-all span,
  html.otw-sb-icons .otw-sb-sub { display: none !important; }
  html.otw-sb-icons .otw-sb-row,
  html.otw-sb-icons .otw-sb-rowline { justify-content: center; padding-left: 0; padding-right: 0; }
  html.otw-sb-icons .otw-sb-logo { justify-content: flex-start; width: 36px; height: 36px; margin: 14px auto; padding: 0; overflow: hidden; }
  /* Collapsed rail: O mark (logo px 4-58 x 2-56 of 380x72) shown at 32px, centered in the 36px box, nothing clipped (Nov 14 2026) */
  html.otw-sb-icons .otw-sb-logo img.otw-logo-img { width: 225.2px; height: 42.67px; max-width: none; max-height: none; object-fit: fill; transform: none; align-self: flex-start; margin: 0.8px 0 0; flex: none; }
  html.otw-sb-icons .otw-sb-all { justify-content: center; padding: 0; }
  body.otw-has-sb #otw-preview { left: 280px; }
  html.otw-sb-icons body.otw-has-sb #otw-preview { left: 72px; }
}
@media (max-width: 1023px) {
  body.otw-has-sb { padding-left: 0; }
  .otw-burger { display: inline-flex; }
  .otw-sb {
    top: 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform .18s ease;
    box-shadow: none;
  }
  .otw-sb.is-open { transform: none; box-shadow: 0 12px 40px rgba(16, 24, 40, .18); }
  body.otw-has-sb #otw-preview { left: 0; }
}
@media (max-width: 800px) {
  body[data-app] #app > h1 { grid-template-columns: 40px minmax(0, 1fr); }
  body[data-app] #app > h1::before { width: 40px; height: 40px; }
}
@media print {
  .otw-sb, .otw-sb-backdrop, .otw-burger { display: none !important; }
  body.otw-has-sb { padding-left: 0 !important; }
}

/* discipline-icons:start */
/* Icon sprite is in the page. Colors come from discipline-icons.json. */
.otw-ico{width:32px;height:32px;flex:none;display:inline-block;vertical-align:middle;color:inherit}
.otw-ico circle{fill:#0d2340}
.otw-dico{width:32px;height:32px;display:grid;place-items:center}
.otw-dico>svg:not(.otw-ico){display:none}
.otw-page-head h1{display:flex;align-items:center;gap:12px}
.otw-check:has(input[name="disc"]){align-items:center}
[data-discipline] [data-step-name="0"],[data-discipline] .otw-result-k,[data-discipline] .otw-report h2,[data-discipline] details:has(#otw-acc-method)>summary{display:flex;align-items:center;gap:8px}
body[data-app] #app>h1>.otw-ico{grid-column:1;grid-row:1 / span 2;width:48px;height:48px}
@media (max-width:800px){.otw-hit>.otw-ico,.otw-related .otw-ico,.otw-spec-list .otw-ico,.otw-dico,.otw-dico>.otw-ico,.otw-check>.otw-ico,.otw-page-head h1>.otw-ico{width:24px;height:24px}body[data-app] #app>h1>.otw-ico{width:40px;height:40px}}
.otw-c-civil-site{color:#3DDC97}.otw-c-structural{color:#7EB0FF}.otw-c-electrical{color:#FFE14A}.otw-c-mechanical{color:#2EE6C7}.otw-c-plumbing{color:#5CE1FF}.otw-c-fire-protection{color:#FF8A6A}.otw-c-home{color:#7EB0FF}.otw-c-search{color:#2EE6C7}.otw-c-pricing{color:#FFE14A}.otw-c-account{color:#5CE1FF}
/* discipline-icons:end */
/* Sidebar items that are not a calculator or a discipline: a purple glyph, no badge.
   Home, Search, About (otw-c-home), Pricing, and Account. Discipline and app icons keep their circles.
   The box stays 32px so alignment and the row hit area do not move. */
.otw-sb .otw-c-home,
.otw-sb .otw-c-search,
.otw-sb .otw-c-pricing,
.otw-sb .otw-c-account { color: var(--otw-primary); }
.otw-sb .otw-c-home circle,
.otw-sb .otw-c-search circle,
.otw-sb .otw-c-pricing circle,
.otw-sb .otw-c-account circle { fill: none; }
.otw-sb .otw-sb-row[aria-current="page"]:is(:has(.otw-c-home), :has(.otw-c-search), :has(.otw-c-pricing), :has(.otw-c-account)),
.otw-sb .otw-sb-row[aria-current="page"]:is(:has(.otw-c-home), :has(.otw-c-search), :has(.otw-c-pricing), :has(.otw-c-account)):hover {
  background: var(--otw-wash);
}
/* Dark app pages keep this rail on white so the purple glyph stays at 6.62:1. */
[data-theme="dark"] .otw-sb { background: #fff; color: #1c2430; }
[data-theme="dark"] .otw-sb .otw-c-home,
[data-theme="dark"] .otw-sb .otw-c-search,
[data-theme="dark"] .otw-sb .otw-c-pricing,
[data-theme="dark"] .otw-sb .otw-c-account,
[data-theme="dark"] .otw-sb-back-ar { color: var(--otw-primary); }
body[data-app] #app > h1::before { width: 48px; height: 48px; }
@media (max-width: 800px) {
  body[data-app] #app > h1::before { width: 40px; height: 40px; }
}
@media (min-width: 1024px) {
  body.otw-has-sb #otw-preview { left: 280px !important; right: 0 !important; width: auto !important; }
  html.otw-sb-icons body.otw-has-sb #otw-preview { left: 72px !important; }
}
@media (max-width: 1023px) {
  body.otw-has-sb #otw-preview { left: 0 !important; right: 0 !important; width: auto !important; }
}

/* ---- review r1 (2026-11-14): first-use path, one result summary, availability labels ---- */
/* Home: promise, worked example, how it works */
.otw-hero h1.otw-h1-promise { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.04; }
.otw-avail-line { margin: 16px 0 0; color: var(--otw-muted); font-size: .98rem; max-width: 40rem; }
.otw-avail-line a { color: var(--otw-primary); font-weight: 750; }
a.otw-example { display: flex; flex-direction: column; gap: 2px; text-decoration: none; letter-spacing: 0; font-weight: 600; border: 1.5px solid var(--otw-soft-line); }
a.otw-example:hover { border-color: var(--otw-primary); }
.otw-ex-k { font-size: .72em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--otw-primary); }
.otw-ex-t { font-weight: 750; color: var(--otw-ink); }
.otw-ex-num { font-size: 2em; font-weight: 800; color: var(--otw-primary); line-height: 1.05; letter-spacing: -.02em; }
.otw-ex-num small { font-size: .5em; color: var(--otw-muted); font-weight: 700; letter-spacing: 0; }
.otw-ex-in { font-size: .82em; color: var(--otw-muted); font-weight: 600; }
.otw-ex-go { font-size: .86em; color: var(--otw-primary); font-weight: 750; margin-top: 2px; }
.otw-explain { padding-top: 24px; padding-bottom: 24px; }
.otw-result-parts { list-style: none; counter-reset: rp; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.otw-result-parts li { counter-increment: rp; background: var(--otw-card); border: 1px solid var(--otw-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.otw-result-parts li::before { content: counter(rp); width: 26px; height: 26px; border-radius: 50%; background: var(--otw-wash); color: var(--otw-primary); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.otw-result-parts span { color: var(--otw-muted); font-size: .92rem; }
.otw-trust { margin: 16px 0 0; color: #3d4d63; max-width: 52rem; }
.otw-trust a { color: var(--otw-primary); font-weight: 750; }
.otw-plans-note { margin-top: 20px; background: var(--otw-soft); border: 1px solid var(--otw-soft-line); border-radius: 14px; padding: 16px 18px; }
.otw-plans-note h3 { margin: 0 0 6px; font-size: 1.1rem; }
.otw-plans-note ul { margin: 0; padding-left: 1.1rem; }
.otw-plans-note li { margin: 4px 0; }
.otw-plans-note p { margin: 10px 0 0; }
@media (max-width: 1000px) { .otw-result-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .otw-result-parts { grid-template-columns: 1fr; } }
/* Catalog: availability label instead of the repeated "You get" text */
.otw-avail { grid-column: 2 / -1; margin: 6px 0 0; }
.otw-avail-tag { display: inline-block; border-radius: 999px; font-size: .74rem; font-weight: 800; padding: 2px 9px; border: 1px solid; }
.otw-avail-tag.is-free { color: #1f6b5c; background: #e8f5f1; border-color: #b7dfd4; }
.otw-avail-tag.is-paid { color: var(--otw-primary-dark); background: var(--otw-soft); border-color: var(--otw-soft-line); }
/* Pricing: AI plans kept apart from the main choice */
.otw-ai-later { margin-top: 28px; }
.otw-ai-later h2 { font-size: 1.2rem; margin: 0 0 4px; }
/* Calculator shell: readable summary, one result summary, field checks */
body.otw-redesign .otw-kv th { background: transparent; color: #44546b; position: static; white-space: normal; }
body.otw-redesign .otw-kv td { color: var(--otw-ink); white-space: normal; overflow-wrap: anywhere; }
.otw-calc[data-step="2"] .otw-summary { display: block !important; }
.otw-calc[data-step="2"] .otw-summary .otw-pending { display: none; }
.otw-calc .otw-acc:has(#otw-acc-inputs) { display: none; }
.otw-calc.has-result #status.pass { display: none; }
.otw-calc.otw-hero-report #results #verdict { display: none; }
.otw-calc.otw-hero-value #results #gov { display: none; }
.otw-calc.otw-hero-text .otw-result-num { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; line-height: 1.15; }
.otw-result-hero #otw-result-sub { margin: 6px 0 0; color: #3d4d63; }
.otw-calc #otw-file-slot #downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.m-note-det > summary { cursor: pointer; color: var(--otw-primary); font-weight: 700; font-size: .9rem; margin-top: 6px; }
fieldset.fgroup.otw-empty-step { display: none !important; }
.otw-field-err { margin: 4px 0 0; color: #a3261b; font-size: .88rem; font-weight: 650; }
.otw-field-err::before { content: "\26A0\FE0E  "; }
body.otw-redesign .otw-calc input[aria-invalid="true"] { border-color: #a3261b; box-shadow: 0 0 0 2px rgba(163, 38, 27, .15); }
.otw-calc details.more-options > summary { font-weight: 750; }
.m-pdf-err { color: #a3261b; font-size: .88rem; font-weight: 650; margin: 6px 0 0; flex-basis: 100%; }

/* qa-ind r1: "Start a new calculation" is a text link, not a boxed button (it showed the browser default button border). */
.otw-calc #otw-restart { border: 0; padding: 4px 0; font: inherit; color: var(--otw-blue); text-decoration: underline; cursor: pointer; }
.otw-calc #otw-restart:focus-visible { outline: 3px solid var(--otw-blue); outline-offset: 2px; }

/* ===== b3 (Nov 14 2026) ===== */
/* Sidebar by context: flat discipline list on home and other pages; one discipline inside a calculator or discipline page */
.otw-sb.is-flat .otw-sb-chev, .otw-sb.is-disc .otw-sb-chev { display: none !important; }
.otw-sb.is-flat .otw-sb-sub { display: none !important; }
.otw-sb.is-disc .otw-sb-group[hidden] { display: none !important; }
.otw-sb.is-disc .otw-sb-sub { display: block; }
.otw-sb-back { color: #1c2430; font-weight: 600; }
.otw-sb-back-ar { display: inline-flex; width: 32px; justify-content: center; font-size: 18px; flex: none; color: var(--otw-primary); }
.otw-sb.is-disc .otw-sb-dhead .otw-sb-label { font-weight: 800; color: #4b2f93; }
.otw-sb.is-disc .otw-sb-dhead { cursor: pointer; }
html.otw-sb-icons .otw-sb-back { justify-content: center; }

/* Title row: name, How to use, Code reference */
.otw-titlebar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; }
.otw-titlebar > h1 { margin: 0 !important; flex: 0 1 auto; min-width: 0; }
.otw-title-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.otw-title-tools .howto-btn { margin: 0; min-height: 36px; padding: 6px 14px; }
.howto-row.otw-howto-moved { margin: 0 !important; padding: 0 !important; min-height: 0 !important; height: 0; }
.m-tags.otw-tags-moved { display: none !important; }
.otw-code-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1.5px solid #d9cff5; border-radius: 999px; background: #f6f2fe; color: #4b2f93; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
.otw-code-chip:hover { border-color: #895CF5; }
.otw-code-chip:focus-visible, .otw-title-tools .howto-btn:focus-visible { outline: 3px solid #895CF5; outline-offset: 2px; }
.otw-code-k { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6846BA; }

/* Overlays: How to use and Code reference */
html.otw-modal-open { overflow: hidden; }
.otw-ovl-back { position: fixed; inset: 0; z-index: 1000; background: rgba(28, 16, 60, .55); }
.otw-ovl, #otw-howto[aria-modal="true"]:not([hidden]) { position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; margin: 0; padding: 0 22px 20px; background: #fff; border: 2px solid #6846BA; border-radius: 16px; box-shadow: 0 24px 64px rgba(40, 20, 90, .35); box-sizing: border-box; }
.otw-ovl-head, #otw-howto .howto-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 -22px 8px; padding: 16px 22px 10px; background: #fff; border-bottom: 1px solid #eee8fb; }
.otw-ovl-head h2, #otw-howto .howto-head h2 { margin: 0; padding-right: 8px; font-size: 1.15rem; line-height: 1.3; color: #4b2f93; }
.otw-ovl-x, #otw-howto .howto-close { flex: none; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; border: 1.5px solid #d9cff5; background: #fff; color: #6846BA; font-size: 22px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.otw-ovl-x:hover, #otw-howto .howto-close:hover { background: #f3effc; border-color: #6846BA; }
.otw-ovl-x:focus-visible, #otw-howto .howto-close:focus-visible { outline: 3px solid #895CF5; outline-offset: 2px; }
.otw-ovl-body h3 { margin: 14px 0 6px; font-size: 1rem; color: #10203a; }
.otw-ovl-lead { margin: 4px 0 8px; font-weight: 600; }
@media (max-width: 600px) { .otw-ovl, #otw-howto[aria-modal="true"]:not([hidden]) { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: 16px 16px 0 0; border-width: 2px 0 0; } }

/* Related calculators card after the result */
.otw-related-card { margin: 18px 0 0; padding: 14px 16px; border: 1.5px solid var(--otw-line, #dfe3ea); border-radius: 14px; background: #fff; max-width: none; }
.otw-related-card h2 { margin: 0 0 8px; font-size: 1rem; }
.otw-related-card ul { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.otw-related-card li a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.otw-related-card .otw-ico { width: 22px; height: 22px; }

/* Area toggle */
.otw-area-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.otw-area-k { font-weight: 700; color: #10203a; }
.otw-area-toggle { display: inline-flex; }
.otw-area-hint { font-size: 12.5px; }
.otw-area-note { color: #4b2f93; }

/* Upload CSV */
.rows.is-drop { outline: 2px dashed #895CF5; outline-offset: 4px; border-radius: 10px; background: #faf8ff; }
.otw-csv-hint { font-size: 12.5px; }
.otw-csv-status { flex-basis: 100%; font-size: 14px; }
.otw-csv-status:empty { display: none; }
.otw-csv-status p { margin: 6px 0; }
.otw-csv-status.is-err { color: #9b1c1c; }
.otw-csv-status ul { margin: 4px 0; padding-left: 18px; }
.otw-csv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.otw-cf-custom { margin-top: 6px; }

/* Partial-area check */
.otw-pa { margin: 12px 0 0; border: 1.5px solid var(--otw-line, #dfe3ea); border-radius: 12px; padding: 8px 14px; background: #fff; }
.otw-pa > summary { cursor: pointer; font-weight: 700; color: #4b2f93; padding: 4px 0; }
.otw-pa-table select { max-width: 120px; }
.otw-pa-custom { width: 80px; margin-left: 6px; }
.otw-pa-out ul { margin: 6px 0; padding-left: 18px; }
.otw-pa-gov { padding: 8px 10px; border-radius: 8px; background: #fff4e5; border: 1px solid #f2c48d; font-weight: 600; }
.otw-pa-ok { color: #1f6f43; font-weight: 600; }
.otw-pa-warn { color: #9b1c1c; }

/* Steps fit one screen on desktop: compact spacing, wider inputs, row tables fit, sticky step actions */
.rowtable { table-layout: auto; }
.rowtable td input, .rowtable td select { width: 100%; min-width: 0; box-sizing: border-box; }
@media (min-width: 1024px) {
  body.otw-redesign #app { padding-top: 12px; }
  .otw-calc .otw-stepper { margin-bottom: 10px; }
  .otw-calc #otw-formhost fieldset.fgroup { padding-top: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  .otw-calc #otw-formhost .form2 { gap: 10px 16px; }
  .otw-calc #otw-formhost .field { margin: 0; }
  .otw-calc #otw-formhost .f-hint, .otw-calc #otw-formhost .f-code { font-size: 12.5px; margin-top: 2px; }
  .otw-calc #otw-formhost .f-note { margin: 0 0 6px; font-size: 13px; }
  .otw-calc .otw-actions { position: sticky; bottom: 0; z-index: 5; margin: 0; padding: 10px 0; background: linear-gradient(to bottom, rgba(255,255,255,.85), #fff 30%); border-top: 1px solid var(--otw-line, #e6e9ef); }
  .otw-calc .agree-line { margin-top: 6px; font-size: 12.5px; }
  .otw-calc .otw-side { position: sticky; top: 52px; align-self: start; max-height: calc(100vh - 64px); overflow: auto; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .otw-calc .otw-stepper { margin-bottom: 6px; }
  .otw-calc #otw-formhost fieldset.fgroup { padding-top: 6px; padding-bottom: 6px; margin-bottom: 6px; }
  .otw-calc #otw-formhost .form2 { gap: 8px 14px; }
  .otw-calc #otw-formhost .rowtable td { padding-top: 3px; padding-bottom: 3px; }
  .otw-calc #otw-formhost input, .otw-calc #otw-formhost select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
}
/* Mobile: Back / Next stay in a bar at the bottom of the screen */
@media (max-width: 1023px) {
  .otw-calc:not([data-step="2"]) .otw-actions { position: sticky; bottom: 0; z-index: 20; margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--otw-line, #e6e9ef); box-shadow: 0 -6px 18px rgba(16, 32, 58, .08); }
}
/* sticky step actions need #app not to be a scroll container; clip keeps sideways overflow hidden without one */
section#app[data-otw-shell] { overflow-x: clip !important; overflow-y: visible !important; }
/* b3: step counter. No icon beside the first step name; one-step calculators hide the second step. */
.otw-stepper [data-step-name] svg { display: none !important; }
.otw-calc.otw-one-step .otw-stepper li:nth-child(2), .otw-calc.otw-one-step .otw-stepper li:nth-child(3) { display: none !important; }
@media (min-width: 1024px) {
  .rows .rowtable:not(.stacked) { table-layout: fixed; width: 100%; }
  .rows .rowtable:not(.stacked) th:last-child, .rows .rowtable:not(.stacked) td.rt-rm { width: 88px; }
}
/* b3: account prompt and Save calculation */
.otw-acct-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.otw-acct-acts .otw-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 8px; font-weight: 700; text-decoration: none; background: #6846BA; color: #fff; border: 1px solid #6846BA; }
.otw-acct-acts .otw-btn.ghost { background: #fff; color: #6846BA; }
.otw-acct-acts .otw-btn:hover { background: #895CF5; border-color: #895CF5; color: #fff; }
#downloads .otw-save-calc { margin-left: auto; }
/* b3: auto-run. The Calculate button is gone from view; Review & results runs the calculation (the hidden button is the page's own handler). */
.otw-calc.otw-autorun #go, .otw-go-auto { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; white-space: nowrap !important; }
.otw-autorun-hint { font-size: 13px; margin: 4px 0 0; }
/* b3: Fire Protection had no accent colours, so its primary buttons rendered white on transparent (Hydrant Flow's Calculate was invisible). */
[data-discipline=fire-protection] { --acc: #A23B2C; --acc-fill: #B5432F; --acc-tint: #FBF0EE; --acc-line: #E1B0A8; --acc-strong: #7E2C20; }
body[data-discipline] .btn:not(.ghost):not(.alt), body[data-discipline] .m-btn:not(.ghost):not(.m-seeall) { background: var(--acc-strong, #6846BA); border-color: var(--acc-strong, #6846BA); }
/* t177u: the t172-t174 two-column results swap is reverted (live layout kept). Options lists stay in the results column. */
#results .otw-options { background: #f4f7fb; border-radius: 18px; padding: 16px; margin: 12px 0; }
#results .otw-options h2 { margin: 0 0 10px; font-size: 1.25rem; }
#results .otw-option-detail:not(:empty) { margin-top: 12px; }
.m-dc-key { margin: -4px 0 8px; font-size: .85rem; }
body[data-app] #app.otw-newcalc > h1 { display: block; }   /* b3: the newer single-page apps have no icon, so the 48px icon column squeezed the title */

/* t177u: code chips: a single "Code:" label, bubbles show only the code names */
.otw-code-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.otw-code-label { font-size: 13px; font-weight: 700; color: #4a4a5a; margin-right: 2px; }
.otw-code-chip { min-height: 32px; padding: 5px 12px; }
