/* Clear Step Math brand system. Cambridge-Isanti school colors (royal blue +
   white) as the palette; Bootstrap 5.3 bakes most component colors into each
   class's own local custom properties rather than the root --bs-* ones, so
   large parts of this file override those local variables directly instead
   of (or in addition to) the root tokens below. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/archivo-600.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/archivo-700.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/archivo-800.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/public-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/public-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/public-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/public-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-600.woff2") format("woff2");
}

:root {
  --csm-bg: #FAFBFD;
  --csm-bg-deep: #F1F4FA;
  --csm-fg: #0B1220;
  --csm-fg-muted: #5B6472;
  --csm-accent: #0033A0;
  --csm-accent-hover: #00287F;
  --csm-accent-rgb: 0, 51, 160;
  --csm-accent-ink: #FFFFFF;
  --csm-line: #E1E6EF;

  /* Secondary accent, from the teal half of the logo wordmark. The brand teal
     itself (#0592A3) is a mid-tone that clears neither AA threshold -- 3.6:1
     as text on --csm-bg, 3.7:1 under white text as a fill -- so --csm-accent-2
     is a darkened teal used wherever contrast is required, and the exact brand
     value lives in --csm-accent-2-mark for decorative shapes only. */
  --csm-accent-2: #05707E;
  --csm-accent-2-hover: #045A66;
  --csm-accent-2-ink: #FFFFFF;
  --csm-accent-2-mark: #0592A3;

  /* Equation panel keeps its own tokens rather than reusing --csm-accent as a
     background: in dark mode the accent lightens to stay legible as text, so
     using it as a fill would put light text on a light panel. */
  --csm-panel-bg: #0033A0;
  --csm-panel-fg: #FFFFFF;
  --csm-panel-dim: #BFD0FF;
  --csm-panel-tag: #9FB6F2;
  --csm-panel-rule: rgba(255, 255, 255, 0.22);
  --csm-panel-num-bg: rgba(255, 255, 255, 0.16);

  --csm-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --csm-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --csm-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --bs-body-bg: var(--csm-bg);
  --bs-body-color: var(--csm-fg);
  --bs-body-font-family: var(--csm-body);
  --bs-border-color: var(--csm-line);
  --bs-border-radius: 6px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 8px;
  --bs-link-color-rgb: var(--csm-accent-rgb);
  --bs-link-hover-color-rgb: 0, 40, 127;
  --bs-emphasis-color: var(--csm-fg);
  --bs-secondary-color: var(--csm-fg-muted);
}

@media (prefers-color-scheme: dark) {
  :root {
    --csm-bg: #0A0F1C;
    --csm-bg-deep: #121A2E;
    --csm-fg: #F2F5FA;
    --csm-fg-muted: #93A0B4;
    --csm-accent: #6E93FF;
    --csm-accent-hover: #93AEFF;
    --csm-accent-rgb: 110, 147, 255;
    --csm-accent-ink: #071023;
    --csm-line: #22304A;

    /* Teal lightens here for the same reason --csm-accent does: on #0A0F1C the
       darkened teal above would read as near-black. This value doubles as a
       fill, with dark ink on top. */
    --csm-accent-2: #3FC9D6;
    --csm-accent-2-hover: #6FDCE6;
    --csm-accent-2-ink: #071023;
    --csm-accent-2-mark: #35B7C4;

    /* Deep blue rather than the lightened accent -- see note on these tokens
       in :root. Text on the panel stays white in both themes. */
    --csm-panel-bg: #16306E;
    --csm-panel-dim: #C6D5FF;
    --csm-panel-tag: #A9BEF5;
  }
}

body {
  font-family: var(--csm-body);
  /* Guards the .bleed 100vw math below from producing sideways scroll. */
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--csm-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}

a {
  text-decoration-thickness: 1px;
}

/* ---------- Buttons ---------- */
.btn {
  font-weight: 700;
  font-family: var(--csm-body);
}
.btn-primary {
  --bs-btn-bg: var(--csm-accent);
  --bs-btn-border-color: var(--csm-accent);
  --bs-btn-color: var(--csm-accent-ink);
  --bs-btn-hover-bg: var(--csm-accent-hover);
  --bs-btn-hover-border-color: var(--csm-accent-hover);
  --bs-btn-hover-color: var(--csm-accent-ink);
  --bs-btn-active-bg: var(--csm-accent-hover);
  --bs-btn-active-border-color: var(--csm-accent-hover);
  --bs-btn-disabled-bg: var(--csm-accent);
  --bs-btn-disabled-border-color: var(--csm-accent);
  --bs-btn-focus-shadow-rgb: var(--csm-accent-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--csm-accent);
  --bs-btn-border-color: var(--csm-fg);
  --bs-btn-hover-bg: var(--csm-accent);
  --bs-btn-hover-border-color: var(--csm-accent);
  --bs-btn-hover-color: var(--csm-accent-ink);
  --bs-btn-active-bg: var(--csm-accent);
  --bs-btn-active-border-color: var(--csm-accent);
  --bs-btn-disabled-color: var(--csm-accent);
  --bs-btn-disabled-border-color: var(--csm-accent);
  --bs-btn-focus-shadow-rgb: var(--csm-accent-rgb);
}
.btn-outline-secondary {
  --bs-btn-color: var(--csm-fg-muted);
  --bs-btn-border-color: var(--csm-line);
  --bs-btn-hover-bg: var(--csm-fg-muted);
  --bs-btn-hover-border-color: var(--csm-fg-muted);
}
/* Destructive actions (cancel/void) intentionally keep Bootstrap's default
   red regardless of site theme. */

.form-control:focus,
.form-select:focus {
  border-color: var(--csm-accent);
  box-shadow: 0 0 0 0.2rem rgba(var(--csm-accent-rgb), 0.22);
}

.card {
  --bs-card-border-color: var(--csm-line);
  box-shadow: none;
}

.table {
  --bs-table-border-color: var(--csm-line);
}

.badge.bg-secondary {
  background-color: var(--csm-fg-muted) !important;
}

.alert-info {
  --bs-alert-color: var(--csm-fg);
  --bs-alert-bg: var(--csm-bg-deep);
  --bs-alert-border-color: var(--csm-line);
}
.alert-warning {
  --bs-alert-border-color: #E7C56B;
}

/* ---------- Site nav ---------- */
.site-nav {
  background: var(--csm-bg);
  border-bottom: 1px solid var(--csm-line);
}
.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
/* The wordmark carries the name, so the anchor holds no text of its own.
   26px tall renders ~165px wide, which still clears the toggler at 320px. */
.site-nav .navbar-brand img {
  height: 26px;
  width: auto;
}
.site-nav .navbar-brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .site-nav .navbar-brand .logo-light { display: none; }
  .site-nav .navbar-brand .logo-dark { display: block; }
}
.site-nav .nav-link {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--csm-fg) !important;
}
.site-nav .nav-link:hover { color: var(--csm-accent) !important; }
/* Teal rather than navy so the one conversion action in the nav separates from
   the navy links beside it. */
.site-nav .nav-cta {
  background: var(--csm-accent-2);
  color: var(--csm-accent-2-ink) !important;
  padding: 0.45rem 1rem !important;
  font-weight: 700;
}
.site-nav .nav-cta:hover { background: var(--csm-accent-2-hover); }
.site-nav .navbar-toggler {
  border-color: var(--csm-line);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--csm-bg);
  color: var(--csm-fg-muted);
  border-top: 1px solid var(--csm-line);
}
.site-footer a.footer-link {
  color: var(--csm-fg-muted) !important;
  text-decoration: none;
}
.site-footer a.footer-link:hover {
  color: var(--csm-accent) !important;
}

/* ---------- Hero (home page) ----------
   `.bleed` lets a section inside base.html's .container paint edge to edge
   (tinted hero band) while its content stays aligned to the container gutter.
   body has overflow-x:hidden so the 100vw math can't cause sideways scroll. */
.bleed {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(calc(50vw - 50%), 1rem);
  padding-right: max(calc(50vw - 50%), 1rem);
}

.hero-wrap {
  position: relative;
  background: linear-gradient(180deg, var(--csm-bg) 0%, var(--csm-bg-deep) 100%);
  border-bottom: 1px solid var(--csm-line);
  padding-top: clamp(2rem, 5vw, 3.75rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
/* Cancel base.html's .container py-4 top padding so the hero band meets the
   navbar. Scoped to :first-child so a flash message (rendered above the
   content block) pushes the hero back down instead of being overlapped. */
.hero-wrap:first-child { margin-top: -1.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow {
  font-family: var(--csm-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--csm-accent);
  margin-bottom: 0.9rem;
}
.hero-wrap h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin-bottom: 1.1rem;
}
.hero-wrap h1 .accent { color: var(--csm-accent); }
.hero-lede {
  font-size: 1.05rem;
  color: var(--csm-fg-muted);
  max-width: 46ch;
  margin-bottom: 1.75rem;
}
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Equation panel + photo read as one card: the panel keeps square inner
   corners where the two meet so the seam stays tight. */
.hero-showcase {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px -28px rgba(11, 18, 32, 0.55);
}
@media (max-width: 620px) {
  .hero-showcase { grid-template-columns: 1fr; }
}
/* Fills its half of the showcase card at whatever height the equation panel
   ends up; object-position favours the notebook over the window. */
.hero-photo {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  object-position: 50% 62%;
  display: block;
}
@media (max-width: 620px) {
  .hero-photo { min-height: 170px; }
}

/* Worked-equation panel */
.eq-panel {
  background: var(--csm-panel-bg);
  color: var(--csm-panel-fg);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  min-width: 0;
}
.eq-panel .eyebrow {
  font-family: var(--csm-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--csm-panel-dim);
}
.equation {
  font-family: var(--csm-mono);
  font-variant-numeric: tabular-nums;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.eq-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--csm-panel-rule);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  min-width: 0;
}
.eq-row:last-of-type { border-bottom: none; }
/* Connector between consecutive steps, drawn under the step number so the
   three rows read as one downward sequence. */
.eq-row + .eq-row { position: relative; }
.eq-row + .eq-row::before {
  content: "";
  position: absolute;
  left: 0.78rem;
  top: -0.62rem;
  width: 1px;
  height: 0.55rem;
  background: var(--csm-panel-dim);
}
.eq-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--csm-panel-num-bg);
  font-family: var(--csm-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}
.eq-row .tag {
  font-family: var(--csm-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--csm-panel-tag);
  white-space: nowrap;
}
.eq-row .expr { text-align: right; white-space: nowrap; }
.eq-row.is-answer .expr { color: var(--csm-panel-fg); font-weight: 700; }
.eq-row.is-answer .tag { color: var(--csm-panel-fg); }
.eq-row.is-answer .eq-num { background: var(--csm-panel-fg); color: var(--csm-panel-bg); }
.eq-caption {
  font-family: var(--csm-body);
  font-size: 0.85rem;
  color: var(--csm-panel-dim);
  margin-top: 1.1rem;
  max-width: 34ch;
}

/* Reassurance points under the hero */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  list-style: none;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding: 0;
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--csm-fg-muted);
  max-width: 17rem;
}
.trust-icon,
.col-icon,
.session-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--csm-accent);
  color: var(--csm-accent);
}
.trust-icon { width: 2.4rem; height: 2.4rem; }
.trust-icon svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Three-column info band ---------- */
.info-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) {
  .info-cols { grid-template-columns: 1fr; }
}
/* Hairline separators between columns, suppressed once they stack. */
@media (min-width: 861px) {
  .info-cols > section + section {
    border-left: 1px solid var(--csm-line);
    padding-left: clamp(1.75rem, 4vw, 3rem);
  }
}
.col-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.col-icon { width: 2.2rem; height: 2.2rem; border-width: 0; }
.col-icon svg { width: 1.6rem; height: 1.6rem; }

.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--csm-fg);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--csm-accent-2-mark);
}

.testimonial {
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  background: var(--csm-bg-deep);
  border-radius: 8px;
}
.testimonial-mark { display: block; color: var(--csm-accent-2-mark); opacity: 0.55; }
.testimonial-mark svg { width: 1.3rem; height: 1.3rem; }
.testimonial blockquote {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.testimonial figcaption { font-size: 0.82rem; color: var(--csm-fg-muted); }

.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th {
  font-weight: 400;
  font-family: var(--csm-body);
  text-align: left;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--csm-line);
}
.rate-table td {
  font-family: var(--csm-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  padding: 0.6rem 0 0.6rem 0.75rem;
  border-bottom: 1px solid var(--csm-line);
}
.rate-table .rate-duration {
  display: block;
  color: var(--csm-fg-muted);
  font-family: var(--csm-body);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
}
.rate-table tr:last-child th,
.rate-table tr:last-child td { border-bottom: none; }
.rate-more { display: inline-block; margin-top: 0.9rem; font-weight: 600; font-size: 0.92rem; }

/* ---------- Session-length callout ---------- */
.session-bar {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--csm-bg-deep);
  border: 1px solid var(--csm-line);
  border-radius: 10px;
}
.session-bar-icon { width: 2.8rem; height: 2.8rem; border-width: 0; }
.session-bar-icon svg { width: 1.8rem; height: 1.8rem; }
.session-bar p {
  flex: 1 1 18rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--csm-fg-muted);
}

/* ---------- Shared marketing-page bits ---------- */
.eyebrow {
  font-family: var(--csm-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--csm-accent-2);
}
.photo-slot {
  aspect-ratio: 4 / 5;
  background: var(--csm-bg-deep);
  border: 1px solid var(--csm-line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--csm-fg-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.25rem;
}
.pull-quote {
  font-family: var(--csm-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  line-height: 1.4;
  margin-bottom: 1.1rem;
}
.pull-quote .accent { color: var(--csm-accent); }

.step-tags { display: flex; flex-wrap: wrap; gap: 0.6rem 0.7rem; }
.step-tag {
  font-family: var(--csm-mono);
  font-size: 0.84rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--csm-line);
  border-radius: 5px;
  color: var(--csm-fg);
}

.price-num {
  font-family: var(--csm-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--csm-accent);
}
.price-num .unit {
  font-family: var(--csm-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--csm-fg-muted);
}

.placeholder-badge {
  font-size: 0.7rem;
  vertical-align: middle;
}

/* ---------- Booking calendar / slot picker ---------- */
.slot-btn { min-width: 6.5rem; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--csm-fg-muted);
  margin-bottom: 0.35rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.calendar-day {
  min-width: 0;
  min-height: 4.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.25rem;
  text-align: center;
}
.calendar-day-empty { background: transparent; border: none; }
.calendar-day-num { font-size: 1rem; font-weight: 600; }
.calendar-day-count { font-size: 0.65rem; line-height: 1.15; }
.calendar-day-available {
  background-color: var(--csm-bg-deep);
  border-color: var(--csm-accent);
  color: var(--csm-accent);
  cursor: pointer;
}
.calendar-day-available:hover { background-color: rgba(var(--csm-accent-rgb), 0.14); }
.calendar-day-unavailable {
  background-color: var(--csm-bg);
  border-color: var(--csm-line);
  color: var(--csm-fg-muted);
  cursor: not-allowed;
}
.legend-swatch {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 0.25rem;
}
.legend-available { background-color: var(--csm-bg-deep); border: 1px solid var(--csm-accent); }
.legend-unavailable { background-color: var(--csm-bg); border: 1px solid var(--csm-line); }
.legend-scheduled { background-color: rgba(var(--csm-accent-rgb), 0.2); border: 1px solid var(--csm-accent); }

.owner-schedule-shell #owner-calendar { max-width: 760px; }
.owner-calendar-day:not([disabled]) { cursor: pointer; }
.calendar-day-scheduled {
  background-color: rgba(var(--csm-accent-rgb), 0.2);
  border-color: var(--csm-accent);
  color: var(--csm-fg);
}
.calendar-day-scheduled:hover { background-color: rgba(var(--csm-accent-rgb), 0.3); }
.calendar-day-owner-empty {
  background-color: var(--csm-bg);
  border-color: var(--csm-line);
  color: var(--csm-fg-muted);
}
.calendar-day-owner-empty:hover { background-color: var(--csm-bg-deep); }
.calendar-count-scheduled { color: var(--csm-accent); font-weight: 700; }
.modal-dialog.modal-dialog-owner-schedule { max-width: 820px; }
.modal-dialog-owner-schedule .modal-content {
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
}
.modal-dialog-owner-schedule .modal-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.owner-day-list { display: grid; gap: 0.65rem; }
.owner-schedule-entry {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--csm-line);
  border-radius: 8px;
  background: var(--csm-bg);
}
.owner-schedule-open { border-left: 4px solid var(--csm-accent); }
.owner-schedule-block { border-left: 4px solid var(--csm-fg-muted); }
.owner-schedule-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.owner-schedule-time span,
.owner-schedule-details span { display: block; }
.owner-schedule-time span { color: var(--csm-fg-muted); font-size: 0.78rem; font-weight: 500; }
.owner-schedule-details { min-width: 0; }
.owner-schedule-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.owner-schedule-actions form { margin: 0; }
.owner-day-settings,
.owner-schedule-quick-edit {
  padding: 1rem;
  border: 1px solid var(--csm-line);
  border-radius: 8px;
  background: var(--csm-bg-deep);
}
.owner-schedule-quick-edit { grid-column: 1 / -1; }
.owner-quick-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.owner-quick-edit-grid > * { min-width: 0; }
.owner-quick-edit-location { grid-column: 1 / -1; }
.owner-quick-edit-grid .form-label { margin-bottom: 0; }
.owner-quick-edit-grid .form-control { min-width: 0; margin-top: 0.35rem; }

@media (max-width: 575.98px) {
  .owner-schedule-entry { grid-template-columns: 1fr; gap: 0.6rem; }
  .owner-schedule-actions { justify-content: flex-start; }
  .owner-quick-edit-grid { grid-template-columns: 1fr; }
  .owner-quick-edit-location { grid-column: auto; }
  .modal-dialog-owner-schedule .modal-content { max-height: calc(100vh - 2rem); }
}

/* ---------- Owner dashboard ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.stat,
.panel {
  background: var(--csm-bg);
  border: 1px solid var(--csm-line);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
}
.stat { display: flex; flex-direction: column; gap: 0.15rem; }
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--csm-fg-muted);
}
.stat-value {
  font-family: var(--csm-mono);
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--csm-accent);
}
.stat-note { font-size: 0.78rem; color: var(--csm-fg-muted); }

/* Single-series bar chart: one brand hue, no legend (the heading names it),
   value labels instead of a y-axis so the two don't repeat each other. */
.bar-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.75rem;
  align-items: end;
  height: 190px;
  border-bottom: 1px solid var(--csm-line);
  padding-bottom: 0.4rem;
}
.bar-col {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.3rem;
  height: 100%;
  text-align: center;
  min-width: 0;
}
.bar-value {
  font-family: var(--csm-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--csm-fg);
  line-height: 1.2;
}
/* Column flex so the value rides directly on top of its bar rather than
   floating at the top of the plot area. */
.bar-track {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}
.bar-fill {
  width: 100%;
  min-height: 2px;
  background: var(--csm-accent);
  /* Rounded data-end only; the baseline end stays square against the axis. */
  border-radius: 4px 4px 0 0;
}
.bar-col:hover .bar-fill { background: var(--csm-accent-hover); }
.bar-label { font-size: 0.75rem; color: var(--csm-fg-muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Owner guide ---------- */
.owner-guide h1 { font-size: 1.9rem; }
.owner-guide h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--csm-line);
}
.owner-guide h2:first-of-type { border-top: none; padding-top: 0; }
.owner-guide hr { display: none; }  /* the h2 rules already separate sections */
.owner-guide blockquote {
  border-left: 3px solid var(--csm-accent);
  background: var(--csm-bg-deep);
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}
.owner-guide blockquote p:last-child { margin-bottom: 0; }
.owner-guide ul { margin-bottom: 1rem; }
.owner-guide li { margin-bottom: 0.35rem; }
.owner-guide strong a { text-decoration: none; }
.owner-guide strong a:hover { text-decoration: underline; }

/* ---------- Legal docs ---------- */
.legal-doc h1 { font-size: 1.75rem; margin-top: 2rem; }
.legal-doc h2 { font-size: 1.25rem; margin-top: 1.75rem; }
.legal-doc h1:first-child,
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc p, .legal-doc ul, .legal-doc ol { margin-bottom: 1rem; }
.legal-doc blockquote {
  border-left: 3px solid var(--csm-accent);
  padding-left: 1rem;
  color: var(--csm-fg-muted);
  font-size: 0.9rem;
}
.legal-doc code {
  color: var(--csm-accent);
  background-color: var(--csm-bg-deep);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

/* ---------- Local layout primitives ----------
   The site deliberately keeps the small set of Bootstrap-shaped class names
   used in the templates local. That makes the booking flow and owner console
   remain styled when a visitor is offline or a CDN is unavailable. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--csm-bg);
  color: var(--csm-fg);
  line-height: 1.55;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}
.page-container { max-width: 1180px; }
.page-shell { max-width: 1120px; margin: 0 auto 2rem; }
.page-shell-narrow { max-width: 900px; }
.page-shell-auth { max-width: 560px; margin-top: 1rem; }
.auth-card { padding: 2rem; border: 1px solid var(--csm-line); border-radius: 10px; background: var(--csm-bg); box-shadow: 0 18px 35px -30px rgba(11, 18, 32, 0.7); }
.page-shell-booking { max-width: 900px; margin-top: 1rem; }
.booking-heading { margin-bottom: 2rem; }
.booking-heading h1 { font-size: clamp(1.9rem, 4vw, 2.55rem); }
.page-shell-booking #booking-calendar { max-width: 760px; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { margin: 0 0 0.75rem; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-intro { max-width: 62ch; margin: 0; color: var(--csm-fg-muted); font-size: 1.05rem; }
.page-heading + .row { margin-top: 0; }
.skip-link {
  position: absolute;
  z-index: 2000;
  left: 1rem;
  top: -4rem;
  background: var(--csm-accent);
  color: var(--csm-accent-ink);
  padding: 0.6rem 0.85rem;
  border-radius: 0 0 5px 5px;
  font-weight: 700;
}
.skip-link:focus { top: 0; color: var(--csm-accent-ink); }

/* Display and spacing utilities used by the templates. */
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-fill { flex: 1 1 auto !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.min-vh-100 { min-height: 100vh !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mt-auto { margin-top: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--csm-fg-muted) !important; }
.text-danger { color: #b42318 !important; }
.text-dark { color: var(--csm-fg) !important; }
.text-uppercase { text-transform: uppercase !important; }
.small { font-size: 0.875rem !important; }
.fs-5 { font-size: 1.15rem !important; }
.lead { font-size: 1.18rem; font-weight: 400; line-height: 1.55; }
.fw-light { font-weight: 400 !important; }
.h-100 { height: 100% !important; }
.border { border: 1px solid var(--csm-line) !important; }
.border-danger { border-color: #e7a7a2 !important; }
.text-nowrap { white-space: nowrap !important; }
.visually-hidden { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* Grid. */
.row { display: flex; flex-wrap: wrap; margin-right: -0.75rem; margin-left: -0.75rem; }
.row > * { flex-shrink: 0; width: 100%; padding-right: 0.75rem; padding-left: 0.75rem; }
.col { flex: 1 0 0%; }
.col-auto { width: auto; }
.col-12 { width: 100%; }
.g-2 { row-gap: 0.5rem; }
.g-3 { row-gap: 1rem; }
.g-4 { row-gap: 1.5rem; }

/* Site navigation. */
.site-nav { min-height: 72px; }
.navbar > .container { display: flex; align-items: center; min-height: 72px; }
.navbar-brand { display: inline-flex; align-items: center; margin-right: 1.5rem; text-decoration: none; }
.navbar-collapse { flex-grow: 1; align-items: center; }
.navbar-nav { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.navbar-nav .nav-item { display: block; }
.navbar-nav .nav-link { display: block; padding: 0.55rem 0.65rem; text-decoration: none; }
.navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.5rem;
  margin-left: auto;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--csm-line);
  border-radius: 5px;
  cursor: pointer;
}
.navbar-toggler-icon { width: 1.35rem; height: 1rem; display: block; border-top: 2px solid var(--csm-fg); border-bottom: 2px solid var(--csm-fg); position: relative; }
.navbar-toggler-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 0.34rem; border-top: 2px solid var(--csm-fg); }

/* Buttons and controls. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--csm-fg);
  font-size: 0.95rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
/* A button label is a single unit: "Log in" wrapping to "Log"/"in" (or worse,
   "Bu"/"y") looked broken wherever a table column squeezed it. */
.btn { white-space: nowrap; }
/* ...except inside data tables, where action labels are genuinely multi-word
   ("Edit / move", "Remove block") and the column is narrow. Between 768 and
   1199 these are still real tables, so an unbreakable label just overflows
   its cell. The package tables keep nowrap: "Log in" and "Buy" are short
   enough that breaking them only ever looks like a bug. */
.table td .btn { white-space: normal; }
.package-rate-table td .btn { white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid rgba(var(--csm-accent-rgb), 0.28); outline-offset: 2px; }
.btn-primary { background: var(--csm-accent); border-color: var(--csm-accent); color: var(--csm-accent-ink); }
.btn-primary:hover { background: var(--csm-accent-hover); border-color: var(--csm-accent-hover); color: var(--csm-accent-ink); }
.btn-outline-primary { border-color: var(--csm-accent); color: var(--csm-accent); }
.btn-outline-primary:hover, .btn-outline-primary.active { background: var(--csm-accent); color: var(--csm-accent-ink); }
.btn-outline-secondary { border-color: var(--csm-line); color: var(--csm-fg-muted); }
.btn-outline-secondary:hover, .btn-outline-secondary.active { background: var(--csm-bg-deep); border-color: var(--csm-fg-muted); color: var(--csm-fg); }
.btn-outline-danger { border-color: #e7a7a2; color: #b42318; }
.btn-outline-danger:hover { background: #fff1f0; border-color: #b42318; }
.btn-outline-success { border-color: #9ed5bd; color: #137a4c; }
.btn-outline-success:hover { background: #effaf4; }
.btn-link { border: 0; color: var(--csm-accent); text-decoration: underline; }
.btn-sm { min-height: 2rem; padding: 0.35rem 0.65rem; font-size: 0.82rem; }
.btn-lg { min-height: 3rem; padding: 0.75rem 1.15rem; font-size: 1rem; }
.btn-close { width: 1.4rem; height: 1.4rem; padding: 0; border: 0; background: transparent; color: currentColor; opacity: 0.65; cursor: pointer; }
.btn-close::before { content: "×"; font-size: 1.45rem; line-height: 1; }
.btn-close:hover { opacity: 1; }
/* Buttons no longer break their own labels, so a group of them has to wrap
   as whole buttons instead -- otherwise the row simply overflows. */
.btn-group { display: inline-flex; flex-wrap: wrap; vertical-align: middle; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; }
.btn-group > .btn:first-child { margin-left: 0; border-radius: 5px 0 0 5px; }
.btn-group > .btn:last-child { border-radius: 0 5px 5px 0; }

.form-label { display: inline-block; margin-bottom: 0.4rem; font-weight: 700; font-size: 0.9rem; }
.form-control, .form-select {
  display: block;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #bcc6d5;
  border-radius: 5px;
  background: var(--csm-bg);
  color: var(--csm-fg);
  font: inherit;
}
textarea.form-control { min-height: 6rem; resize: vertical; }
.form-control::placeholder { color: #8792a2; }
.form-text { display: block; margin-top: 0.35rem; color: var(--csm-fg-muted); font-size: 0.82rem; }
.form-check { display: block; min-height: 1.5rem; padding-left: 1.7rem; }
.form-check-input { float: left; width: 1.1rem; height: 1.1rem; margin-left: -1.7rem; margin-top: 0.25rem; accent-color: var(--csm-accent); }
.form-check-label { display: inline-block; }
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control { flex: 1 1 auto; min-width: 0; border-radius: 0 5px 5px 0; }
.input-group-text { display: flex; align-items: center; padding: 0.55rem 0.7rem; border: 1px solid #bcc6d5; border-right: 0; border-radius: 5px 0 0 5px; color: var(--csm-fg-muted); }

/* Cards, alerts, badges, and tables. */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--csm-bg); border: 1px solid var(--csm-line); border-radius: 8px; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-header { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--csm-line); font-weight: 700; }
.alert { position: relative; padding: 0.85rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 6px; }
.alert-dismissible { padding-right: 2.8rem; }
.alert-dismissible .btn-close { position: absolute; top: 0.65rem; right: 0.7rem; }
.alert-info { background: var(--csm-bg-deep); border-color: var(--csm-line); }
.alert-warning { background: #fff8e8; border-color: #e7c56b; color: #6f4b00; }
.alert-danger { background: #fff1f0; border-color: #e7a7a2; color: #8f1d17; }
.alert-success { background: #effaf4; border-color: #9ed5bd; color: #12633f; }
.alert-light { background: var(--csm-bg-deep); }
.badge { display: inline-block; padding: 0.3em 0.55em; border-radius: 4px; font-size: 0.75em; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: baseline; }
.bg-secondary { background: var(--csm-fg-muted) !important; color: #fff !important; }
.bg-success { background: #168a58 !important; color: #fff !important; }
.bg-warning { background: #f3c969 !important; }
.bg-light { background: var(--csm-bg-deep) !important; }
.table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; color: var(--csm-fg); vertical-align: top; }
.table th, .table td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--csm-line); text-align: left; }
.table thead th { color: var(--csm-fg-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: rgba(var(--csm-accent-rgb), 0.035); }
.table-sm th, .table-sm td { padding: 0.5rem 0.45rem; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive .table { min-width: 680px; }
.table-responsive .table-sm { min-width: 0; }
.package-rate-table {
  min-width: 0 !important;
  table-layout: fixed;
}
.package-rate-table thead th {
  white-space: normal;
  line-height: 1.15;
}
.package-rate-table th,
.package-rate-table td {
  /* break-word, not anywhere: `anywhere` split "PACKAGE" into "PACKAG"/"E"
     and "$175" into "$17"/"5" whenever the column was tight, which is worse
     than a little overflow. The table scrolls instead -- see min-width. */
  overflow-wrap: break-word;
  vertical-align: middle;
}
.package-rate-table {
  /* Below this the columns stop being legible, so let .table-responsive
     scroll the table rather than crushing it. */
  min-width: 21rem;
}
.package-rate-table th:nth-child(1),
.package-rate-table td:nth-child(1) { width: 28%; }
.package-rate-table th:nth-child(2),
.package-rate-table td:nth-child(2) { width: 18%; }
.package-rate-table th:nth-child(3),
.package-rate-table td:nth-child(3) { width: 32%; }
.package-rate-table th:nth-child(4),
.package-rate-table td:nth-child(4) { width: 22%; }
.package-rate-table td:last-child form {
  display: flex;
  justify-content: flex-end;
}
.package-rate-table td:last-child .btn { width: 100%; }
.table > :last-child > :last-child > * { border-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--csm-line); opacity: 1; }
.list-group { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; border-radius: 7px; }
.list-group-item { display: block; padding: 0.75rem 1rem; color: var(--csm-fg); background: var(--csm-bg); border: 1px solid var(--csm-line); text-decoration: none; }
.list-group-item + .list-group-item { border-top: 0; }
.list-group-item:first-child { border-radius: 7px 7px 0 0; }
.list-group-item:last-child { border-radius: 0 0 7px 7px; }
.list-group-item-action:hover { background: var(--csm-bg-deep); color: var(--csm-accent); }
.pagination { display: flex; list-style: none; gap: 0.35rem; padding: 0; margin: 0; }
.page-link { display: block; padding: 0.45rem 0.7rem; border: 1px solid var(--csm-line); border-radius: 5px; color: var(--csm-accent); text-decoration: none; }
.page-item.active .page-link { background: var(--csm-accent); border-color: var(--csm-accent); color: var(--csm-accent-ink); }
.page-item.disabled .page-link { color: var(--csm-fg-muted); opacity: 0.5; pointer-events: none; }

/* Modal shell used by the date picker. */
.modal { position: fixed; inset: 0; z-index: 1050; display: none; overflow-x: hidden; overflow-y: auto; background: rgba(11, 18, 32, 0.48); }
.modal.show { display: block; }
.modal-dialog { width: auto; max-width: 560px; margin: 1.75rem auto; padding: 0 1rem; }
.modal-content { position: relative; display: flex; flex-direction: column; background: var(--csm-bg); border: 1px solid var(--csm-line); border-radius: 8px; box-shadow: 0 20px 60px rgba(11, 18, 32, 0.25); }
.modal-header, .modal-body, .modal-footer { padding: 1rem 1.25rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--csm-line); }
.modal-header .btn-close { margin-left: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; border-top: 1px solid var(--csm-line); }
.modal-open { overflow: hidden; }

.flash-stack { margin-bottom: 1.25rem; }
.site-footer { line-height: 1.45; }
.footer-contact { color: var(--csm-fg); font-weight: 600; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.35rem 1rem; }
.footer-links .me-3 { margin-right: 0 !important; }
.photo-slot { overflow: hidden; padding: 0; box-shadow: 0 16px 30px -24px rgba(11, 18, 32, 0.7); }
.photo-slot img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: center top; }
.empty-state { max-width: 560px; margin: 2rem auto; }
.empty-state-code { display: block; color: var(--csm-accent); font-family: var(--csm-mono); font-size: clamp(4.5rem, 12vw, 8rem); font-weight: 600; line-height: 1; margin-bottom: 1rem; }
.empty-panel { padding: 1.35rem 1.5rem; border: 1px dashed #b8c3d3; border-radius: 8px; background: var(--csm-bg-deep); }
.empty-panel p:last-child { margin-bottom: 0; }

@media (min-width: 576px) {
  .container { max-width: 540px; }
  .col-sm-6 { width: 50%; }
}
@media (min-width: 768px) {
  .container { max-width: 720px; }
  .col-md-3 { width: 25%; }
  .col-md-10 { width: 83.333333%; }
  .col-md-4 { width: 33.333333%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.333333%; }
  .col-md-8 { width: 66.666667%; }
  .align-items-md-center { align-items: center !important; }
  .ms-md-2 { margin-left: 0.5rem !important; }
  .mt-md-0 { margin-top: 0 !important; }
}
@media (min-width: 992px) {
  .container { max-width: 960px; }
  .col-lg-3 { width: 25%; }
  .col-lg-5 { width: 41.666667%; }
  .col-lg-6 { width: 50%; }
  .col-lg-7 { width: 58.333333%; }
  .col-lg-8 { width: 66.666667%; }
  .col-lg-9 { width: 75%; }
}
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
  .col-xl-6 { width: 50%; }
  .navbar-expand-xl .navbar-toggler { display: none; }
  .navbar-expand-xl .navbar-collapse {
    display: flex !important;
    width: auto;
    padding: 0;
  }
  .navbar-expand-xl .navbar-nav { flex-direction: row; align-items: center; margin-left: auto; }
  .navbar-expand-xl .navbar-nav .nav-link { white-space: nowrap; }
  .navbar-expand-xl > .container { flex-wrap: nowrap; }
  .align-items-xl-center { align-items: center !important; }
}
@media (max-width: 1199.98px) {
  .site-nav .navbar-toggler { display: inline-flex !important; }
  .navbar-collapse { display: none; width: 100%; padding: 0.6rem 0 0.9rem; }
  .navbar-collapse.show { display: block; }
  .navbar > .container { flex-wrap: wrap; }
  .navbar-nav .nav-link { padding: 0.65rem 0; }
  .site-nav .nav-cta { display: inline-flex; margin-top: 0.35rem; }
}
@media (max-width: 767.98px) {
  .hero-wrap:first-child { margin-top: -1.5rem; }
  .hero-wrap, .hero-grid, .hero-grid > *, .hero-showcase { width: 100%; max-width: 100vw; min-width: 0; }
  .hero-grid > div:first-child, .hero-lede { width: 100%; max-width: 100%; }
  .hero-lede { overflow-wrap: anywhere; }
  .eq-row { grid-template-columns: 1.6rem minmax(0, auto) minmax(0, 1fr); gap: 0.5rem; }
  .eq-row .tag, .eq-row .expr { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .navbar-toggler { flex: 0 0 auto; }
  .page-container { padding-top: 1.25rem !important; }
  .responsive-card-wrap { overflow: visible; }
  .responsive-card-table,
  .responsive-card-table tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }
  .responsive-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .responsive-card-table tbody { display: grid; gap: 0.75rem; }
  .responsive-card-table tbody tr {
    display: block;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--csm-line);
    border-radius: 7px;
    background: var(--csm-bg);
  }
  .responsive-card-table tbody tr:hover { background: var(--csm-bg); }
  .responsive-card-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: 0.65rem;
    width: 100% !important;
    max-width: none !important;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--csm-line);
    text-align: left !important;
    /* See the note on .package-rate-table: `anywhere` was splitting
       "client@example.com" as "client@example.co"/"m". */
    overflow-wrap: break-word;
  }
  /* The value column is a 1fr grid track, so a badge stretched the whole way
     across and read as a coloured bar instead of a pill. */
  .responsive-card-table tbody td > .badge { justify-self: start; }
  /* The value column is a 1fr track with overflow hidden, and a button that
     cannot break its label is wider than that track on a narrow phone. These
     are multi-word actions ("Edit / move", "Remove block") that read fine
     broken across lines, unlike a two-word label such as "Log in". */
  .responsive-card-table tbody td .btn { white-space: normal; }
  .responsive-card-table tbody td:last-child { border-bottom: 0; }
  .responsive-card-table tbody td::before {
    content: attr(data-label);
    color: var(--csm-fg-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .responsive-card-table tbody td form { max-width: 100%; }
  .responsive-card-table tbody td .form-control { min-width: 0; }
  .availability-card-table .form-check-input {
    float: none;
    margin: 0.15rem 0 0;
  }
}
@media (max-width: 575.98px) {
  .container { padding-right: 1rem; padding-left: 1rem; }
  .row { margin-right: -0.5rem; margin-left: -0.5rem; }
  .row > * { padding-right: 0.5rem; padding-left: 0.5rem; }
  .btn-group { width: 100%; }
  .btn-group > .btn { flex: 1 1 auto; }
  .owner-page-heading {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.75rem;
  }
  .modal-dialog { margin-top: 1rem; }
  .package-rate-table thead th { white-space: normal; line-height: 1.15; }
  .package-rate-table th, .package-rate-table td { padding-right: 0.2rem; padding-left: 0.2rem; }
  .package-rate-table .btn { padding-right: 0.4rem; padding-left: 0.4rem; }
  .hero-ctas .btn { width: 100%; }
  .site-footer { font-size: 0.8rem; }
}
