/*
 * AJ Onboard — public styles.
 *
 * Consumes the theme design tokens (--wp--preset--*) with fallbacks, matching
 * the aj-events / aj-related card look so this reads as part of the site
 * rather than a bolted-on app.
 */

.aj-ob {
  --aj-ink: var(--wp--preset--color--ink, #14202e);
  --aj-paper: var(--wp--preset--color--paper, #faf6ee);
  --aj-blue: var(--wp--preset--color--brand-blue, #0592ce);
  --aj-red: var(--wp--preset--color--brand-red, #ff1d27);
  --aj-gold: var(--wp--preset--color--brand-gold, #e8a33e);
  --aj-gold-deep: var(--wp--preset--color--brand-gold-deep, #9a6512);
  --aj-green: #1d7a4c;
  --aj-line: rgba(20, 32, 46, 0.12);
  --aj-radius: 14px;
  --aj-shadow: 0 1px 3px rgba(20, 32, 46, 0.08);

  /* How wide the reading column is allowed to get. Prose past roughly 75
     characters a line is harder to read, not easier, so the checklist keeps
     a measure and the extra width on a big screen goes to a second column
     instead. */
  --aj-ob-measure: 820px;
  /* Set from JavaScript to whatever is actually pinned to the top of the
     viewport, so a sticky column clears a sticky site header. */
  --aj-ob-sticky: 0px;

  max-width: var(--aj-ob-measure);
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  color: var(--aj-ink);
  line-height: 1.55;
}

/*
 * Stated outright rather than inherited. The `box-sizing: inherit` pattern
 * only holds while every ancestor also carries it, and the chain was breaking
 * in practice — a form control ended up content-box, so `width: 100%` plus
 * padding pushed the notes textarea 28px past its card. An explicit value
 * cannot be broken by a gap in the chain.
 */
.aj-ob,
.aj-ob *,
.aj-ob *::before,
.aj-ob *::after {
  box-sizing: border-box;
}

/* ----------------------------------------------------------- hidden fixup */

/*
 * The `hidden` attribute is only a user-agent stylesheet rule, so ANY author
 * rule carrying a display beats it — including the theme's own button styles.
 * Without this, every element the script hides (the Next/Back/submit buttons,
 * the error line) stays on screen with `hidden` set, which is exactly what
 * happened under Neve. !important is the blunt instrument that is actually
 * correct here: nothing should ever out-rank an explicit hidden.
 */
.aj-ob [hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- Buttons */

.aj-ob-btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.12s, border-color 0.12s, transform 0.08s;
}

.aj-ob-btn:active {
  transform: translateY(1px);
}

.aj-ob-btn:focus-visible {
  outline: 3px solid var(--aj-blue);
  outline-offset: 2px;
}

.aj-ob-btn--primary {
  background: var(--aj-blue);
  color: #fff;
}

.aj-ob-btn--primary:hover {
  background: #0479a8;
  color: #fff;
}

.aj-ob-btn--secondary {
  background: #fff;
  border-color: var(--aj-blue);
  color: var(--aj-blue);
}

.aj-ob-btn--secondary:hover {
  background: rgba(5, 146, 206, 0.08);
}

.aj-ob-btn--ghost {
  background: transparent;
  border-color: var(--aj-line);
  color: var(--aj-ink);
}

.aj-ob-btn--ghost:hover {
  background: rgba(20, 32, 46, 0.04);
}

.aj-ob-btn--big {
  font-size: 1.08rem;
  padding: 15px 28px;
}

.aj-ob-btn--tiny {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  background: #fff;
  border-color: var(--aj-line);
  color: var(--aj-ink);
}

.aj-ob-btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* --------------------------------------------------------------- Notices */

.aj-ob-notice {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--aj-blue);
  background: rgba(5, 146, 206, 0.1);
  font-weight: 600;
}

.aj-ob-notice--good {
  border-color: var(--aj-green);
  background: rgba(29, 122, 76, 0.1);
}

.aj-ob-notice--warn {
  border-color: var(--aj-gold-deep);
  background: rgba(232, 163, 62, 0.14);
}

.aj-ob-muted {
  font-size: 0.86rem;
  color: rgba(20, 32, 46, 0.65);
  margin: 0.6rem 0 0;
}

/* ---------------------------------------------------------- Form controls */

.aj-ob-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.9rem 0 0.35rem;
}

.aj-ob-input,
.aj-ob-select,
.aj-ob-textarea {
  font: inherit;
  width: 100%;
  max-width: 420px;
  padding: 11px 13px;
  border: 1px solid var(--aj-line);
  border-radius: 10px;
  background: #fff;
  color: var(--aj-ink);
}

.aj-ob-textarea {
  width: 100%;
  max-width: 100%;
  resize: vertical;
  /* A textarea carries an intrinsic size from its cols attribute; without
     this it refuses to shrink inside a flex item. */
  min-width: 0;
}

.aj-ob-input:focus,
.aj-ob-select:focus,
.aj-ob-textarea:focus {
  outline: 2px solid var(--aj-blue);
  outline-offset: 1px;
  border-color: var(--aj-blue);
}

.aj-ob-input--date {
  max-width: 220px;
}

.aj-ob-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
}

.aj-ob-inline-form .aj-ob-input {
  flex: 1 1 240px;
  max-width: none;
}

/* ---------------------------------------------------------------- Intake */

.aj-ob-intro {
  margin: 0 0 1.5rem;
}

.aj-ob-intro__title {
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.aj-ob-intro__lede {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(20, 32, 46, 0.8);
}

.aj-ob-intake {
  background: #fff;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  box-shadow: var(--aj-shadow);
  padding: 1.5rem;
}

.aj-ob-step {
  border: 0;
  margin: 0;
  padding: 0;
}

/* With JS on, only one step shows at a time. Without it, every step is
   visible and the form is one long page — which is why this is set by a class
   the script adds rather than being the default. */
.aj-ob-intake.is-stepped .aj-ob-step {
  display: none;
}

.aj-ob-intake.is-stepped .aj-ob-step.is-active {
  display: block;
}

.aj-ob-intake:not(.is-stepped) .aj-ob-step + .aj-ob-step {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--aj-line);
}

.aj-ob-step__legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 0.75rem;
}

.aj-ob-step__count {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aj-blue);
  margin-bottom: 0.3rem;
}

.aj-ob-step__title {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.aj-ob-step__help {
  margin: 0 0 1rem;
  color: rgba(20, 32, 46, 0.7);
}

.aj-ob-step__aside {
  margin: 0.75rem 0 0;
  font-size: 0.86rem;
  color: rgba(20, 32, 46, 0.65);
}

.aj-ob-choices {
  display: grid;
  gap: 0.5rem;
}

/* Long option lists — the visas, the worries — fit two across on a wide
   screen, which halves the scrolling on the longest questions. */
@media (min-width: 900px) {
  .aj-ob-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The first question is the one that sets everything else up; it reads
     better as a single deliberate column. */
  .aj-ob-step[data-aj-ob-field="position"] .aj-ob-choices {
    grid-template-columns: 1fr;
  }
}

.aj-ob-choice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--aj-line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}

.aj-ob-choice:hover {
  border-color: var(--aj-blue);
  background: rgba(5, 146, 206, 0.04);
}

.aj-ob-choice input {
  margin: 0.2rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--aj-blue);
}

.aj-ob-choice:has(input:checked) {
  border-color: var(--aj-blue);
  background: rgba(5, 146, 206, 0.08);
}

.aj-ob-choice:has(input:focus-visible) {
  outline: 2px solid var(--aj-blue);
  outline-offset: 2px;
}

.aj-ob-choice__label {
  font-weight: 600;
}

/* The "none of these" / "I don't know yet" escape hatch. It was sitting almost
   on top of the field above it, which made it read as part of that control
   rather than an alternative to it. */
.aj-ob-choice--inline {
  display: inline-flex;
  margin-top: 1.5rem;
  border: 0;
  padding: 0;
}

.aj-ob-choice--inline:hover {
  background: none;
}

/* The free-text box for an occupation the list does not cover. Hidden only
   once the script has taken charge of it — with no JavaScript it stays
   visible, so nobody is forced to misfile themselves to get past the
   question. */
.aj-ob-role-other {
  margin-top: 1rem;
}

.is-enhanced .aj-ob-role-other {
  display: none;
}

.is-enhanced .aj-ob-role-other.is-shown {
  display: block;
}

/* Month + year, side by side, stacking on a phone. */
.aj-ob-dategroup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.aj-ob-dategroup__part {
  flex: 1 1 160px;
  min-width: 0;
}

.aj-ob-dategroup .aj-ob-label {
  margin-top: 0;
}

.aj-ob-dategroup .aj-ob-select {
  max-width: none;
  width: 100%;
}

/* The script moves focus to the current question's heading so that keyboard
   and screen reader users are carried to it. That is a programmatic target,
   not a control anyone tabbed to, so it should not paint a focus ring for a
   mouse user. :focus-visible still gives keyboard users the affordance they
   need, because browsers only match it when the interaction warranted one. */
.aj-ob-step__title:focus {
  outline: none;
}

.aj-ob-step__title:focus-visible {
  outline: 3px solid var(--aj-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.aj-ob-intake__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.aj-ob-intake__error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 29, 39, 0.1);
  color: #b3121b;
  font-weight: 600;
}

.aj-ob-returning {
  margin-top: 1.5rem;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  background: #fff;
  padding: 0.9rem 1.1rem;
}

.aj-ob-returning__summary,
.aj-ob-edit__summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--aj-blue);
}

.aj-ob-returning__form {
  margin-top: 1rem;
}

/* ------------------------------------------------------------- Dashboard */

.aj-ob-dash__head {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1.5rem;
}

.aj-ob-dash__headings {
  flex: 1 1 320px;
  min-width: 0;
}

.aj-ob-dash__title {
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.aj-ob-dash__meta {
  margin: 0;
  color: rgba(20, 32, 46, 0.7);
  font-weight: 600;
}

.aj-ob-progress {
  flex: 0 0 auto;
  text-align: center;
}

.aj-ob-progress__dial {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* The dial is a conic gradient rather than SVG: one element, no JS, and it
     animates for free when the percentage changes. */
  background:
    conic-gradient(
      var(--aj-blue) calc(var(--aj-ob-pct, 0) * 1%),
      var(--aj-line) 0
    );
  position: relative;
}

.aj-ob-progress__dial::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--aj-paper, #fff);
}

.aj-ob-progress__pct {
  position: relative;
  font-weight: 800;
  font-size: 1.1rem;
}

.aj-ob-progress__label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(20, 32, 46, 0.65);
}

/* --------------------------------------------------------------- Capture */

.aj-ob-capture {
  margin: 0 0 1.75rem;
  padding: 1.4rem;
  border: 2px solid var(--aj-blue);
  border-radius: var(--aj-radius);
  background: rgba(5, 146, 206, 0.06);
}

.aj-ob-capture__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.aj-ob-capture__lede {
  margin: 0 0 1rem;
}

.aj-ob-capture__fields {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.aj-ob-capture.is-done {
  border-color: var(--aj-green);
  background: rgba(29, 122, 76, 0.08);
}

/* ---------------------------------------------------------------- Blocks */

.aj-ob-block {
  margin: 0 0 1.75rem;
}

.aj-ob-block__title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}

/* One list, not a grid of tiles. Headings match the stage headings, because
   they are peers on the page — the old 1.1rem made this block read as an
   aside when it is the first thing anyone should act on. */
.aj-ob-block__title {
  font-size: 1.25rem;
}

.aj-ob-start {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  box-shadow: var(--aj-shadow);
}

.aj-ob-start__list {
  margin: 0;
  padding: 0 0 0 1.4rem;
}

.aj-ob-start__item {
  margin-bottom: 0.7rem;
  padding-left: 0.2rem;
}

.aj-ob-start__item:last-child {
  margin-bottom: 0;
}

.aj-ob-start__link {
  font-weight: 700;
  line-height: 1.3;
}

.aj-ob-start__why {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.25rem;
}

.aj-ob-start__due {
  font-size: 0.82rem;
  color: rgba(20, 32, 46, 0.6);
}

.aj-ob-start__due.is-overdue {
  color: #b3121b;
  font-weight: 700;
}

.aj-ob-chip--worry {
  background: rgba(5, 146, 206, 0.12);
  color: #04628a;
}

/* Where a jump from that list lands, so it is obvious you went somewhere on
   purpose rather than being dumped down the page. */
.aj-ob-item.is-targeted {
  animation: aj-ob-flash 1.6s ease-out;
  border-radius: 8px;
}

@keyframes aj-ob-flash {
  0%, 35% {
    background: rgba(5, 146, 206, 0.16);
    box-shadow: 0 0 0 6px rgba(5, 146, 206, 0.16);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aj-ob-item.is-targeted {
    animation: none;
    outline: 3px solid var(--aj-blue);
    outline-offset: 3px;
  }
}

/* ------------------------------------------------------------- Sponsors */

.aj-ob-sponsors {
  padding: 1.25rem;
  border: 1px solid var(--aj-line);
  border-left: 4px solid var(--aj-blue);
  border-radius: var(--aj-radius);
  background: #fff;
  box-shadow: var(--aj-shadow);
}

.aj-ob-sponsors__lede {
  margin: 0 0 1rem;
  color: rgba(20, 32, 46, 0.75);
}

.aj-ob-sponsors__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.aj-ob-sponsors__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(5, 146, 206, 0.06);
  border-radius: 8px;
}

.aj-ob-sponsors__name {
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}

.aj-ob-sponsors__count {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: rgba(20, 32, 46, 0.6);
  white-space: nowrap;
}

.aj-ob-sponsors__more {
  margin: 1rem 0 0;
  font-weight: 700;
}

/* ------------------------------------------------------- Desktop layout */

/* One column by default: phones, and anything narrow. The source order puts
   the orientation panel first, which is the right reading order here. */
.aj-ob-dash__side > * {
  margin-bottom: 1.5rem;
}

@media (min-width: 1080px) {
  /* The whole app may use the extra width... */
  .aj-ob {
    --aj-ob-measure: 1240px;
  }

  /* ...but the checklist itself still stops at a readable measure, and the
     space that buys goes to the panel beside it. */
  .aj-ob-dash__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    /* Deliberately NOT align-items: start. The side column stretches to the
       row height so that a sticky child inside it can follow the checklist
       all the way down — a column sized to its own content would stop being
       sticky as soon as the content ran out. */
  }

  /* Placed explicitly so the checklist sits on the left despite the panel
     coming first in the markup. */
  .aj-ob-dash__main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  /*
   * Sticky the block that benefits, not the whole column.
   *
   * This used to pin the entire panel, which meant capping it at viewport
   * height — because a sticky element taller than the viewport cannot show
   * its own bottom — and then adding overflow-y to reach the rest. Measured
   * on a 1440x900 screen that bought a nested scrollbar hiding 133px, with
   * overscroll-behavior stopping the page from scrolling at all while the
   * cursor sat over it. A scroll region inside a page is a real annoyance;
   * 133px of sponsor logos is not worth one.
   *
   * So the column scrolls with the page like everything else, and only "where
   * to start" is pinned. It is the part worth keeping in view while you work
   * down the list, and at ~435px it fits a short laptop screen with room to
   * spare, so nothing is ever unreachable.
   */
  .aj-ob-dash__side {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .aj-ob-dash__side .aj-ob-start {
    position: sticky;
    /* Clears whatever the theme has pinned up there. */
    top: calc(var(--aj-ob-sticky, 0px) + 1rem);
  }

  .aj-ob-dash__side > *:last-child {
    margin-bottom: 0;
  }

  /* Two across once there is room, rather than one long column of cards. */
  .aj-ob-sponsors__list {
    grid-template-columns: 1fr;
  }

  /* The header can spread out too. */
  .aj-ob-dash__head {
    gap: 2rem;
  }
}

/* On a short screen even the one pinned block takes too much of the view, so
   let it scroll away with everything else. */
@media (min-width: 1080px) and (max-height: 700px) {
  .aj-ob-dash__side .aj-ob-start {
    position: static;
  }
}

/* --------------------------------------------------------------- Stages */

.aj-ob-stage {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  box-shadow: var(--aj-shadow);
}

.aj-ob-stage.is-current {
  border-color: var(--aj-blue);
  border-width: 2px;
}

.aj-ob-stage.is-locked {
  background: rgba(20, 32, 46, 0.02);
}

.aj-ob-stage.is-complete .aj-ob-stage__title {
  color: var(--aj-green);
}

.aj-ob-stage__head {
  margin-bottom: 1rem;
}

.aj-ob-stage__title {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.aj-ob-stage__blurb {
  margin: 0 0 0.4rem;
  color: rgba(20, 32, 46, 0.7);
}

.aj-ob-stage__count {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(20, 32, 46, 0.55);
}

.aj-ob-chip {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20, 32, 46, 0.08);
  color: rgba(20, 32, 46, 0.7);
  white-space: nowrap;
}

.aj-ob-chip--now {
  background: var(--aj-blue);
  color: #fff;
}

.aj-ob-chip--locked {
  background: rgba(232, 163, 62, 0.18);
  color: var(--aj-gold-deep);
}

.aj-ob-chip--critical {
  background: rgba(255, 29, 39, 0.12);
  color: #b3121b;
}

.aj-ob-chip--overdue {
  background: rgba(255, 29, 39, 0.12);
  color: #b3121b;
}

/* Stages the person has already walked past: last on the page, folded away,
   and visibly secondary to what is ahead of them. */
.aj-ob-past {
  margin: 0 0 1.5rem;
  border: 1px dashed var(--aj-line);
  border-radius: var(--aj-radius);
  padding: 0.9rem 1.1rem;
  background: rgba(20, 32, 46, 0.02);
}

.aj-ob-past__summary {
  cursor: pointer;
}

.aj-ob-past__title {
  font-weight: 700;
  color: var(--aj-blue);
}

.aj-ob-past__note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
  color: rgba(20, 32, 46, 0.65);
}

.aj-ob-stages--past {
  margin-top: 1rem;
}

.aj-ob-stages--past .aj-ob-stage {
  box-shadow: none;
  background: #fff;
}

/* ---------------------------------------------------------------- Items */

.aj-ob-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aj-ob-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-top: 1px solid var(--aj-line);
}

.aj-ob-item:first-child {
  border-top: 0;
}

.aj-ob-item__tick {
  flex: 0 0 auto;
  margin: 0;
  padding-top: 0.15rem;
}

.aj-ob-item__checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--aj-green);
  cursor: pointer;
  margin: 0;
}

.aj-ob-item__checklabel {
  cursor: pointer;
}

.aj-ob-item__main {
  flex: 1 1 auto;
  min-width: 0;
}

.aj-ob-item__summary {
  cursor: pointer;
  display: block;
  list-style: none;
  position: relative;
  /* Room for the marker, which is positioned rather than floated. */
  padding-right: 1.75rem;
}

.aj-ob-item__summary::-webkit-details-marker {
  display: none;
}

/*
 * Floating the marker put it on whichever line box it happened to fall in —
 * which, because the summary holds a title AND a row of badges, was the badge
 * line rather than the title. Positioning it pins it to the first line, where
 * it belongs.
 */
.aj-ob-item__summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  /* Deliberately the SAME font-size and line-height as .aj-ob-item__title, so
     the marker's line box is identical to the title's and the two sit on the
     same line by construction. Size is added with a transform instead, which
     scales what you see without changing the box that does the aligning. */
  font-size: 1rem;
  line-height: 1.3;
  transform: scale(1.35);
  transform-origin: right center;
  color: var(--aj-blue);
  font-weight: 700;
}

.aj-ob-item__main[open] > .aj-ob-item__summary::after {
  content: "–";
}

.aj-ob-item__title {
  font-weight: 700;
  line-height: 1.3;
}

.aj-ob-item.is-done .aj-ob-item__title,
.aj-ob-item.is-skipped .aj-ob-item__title {
  text-decoration: line-through;
  opacity: 0.6;
}

.aj-ob-item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
}

.aj-ob-item__effort {
  font-size: 0.8rem;
  color: rgba(20, 32, 46, 0.6);
}

.aj-ob-item__body {
  padding-top: 0.85rem;
}

.aj-ob-item__why {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--aj-blue);
  background: rgba(5, 146, 206, 0.06);
  border-radius: 0 8px 8px 0;
}

.aj-ob-item__prose > :first-child {
  margin-top: 0;
}

.aj-ob-item__prose > :last-child {
  margin-bottom: 0;
}

/*
 * Task bodies are editor content and lean heavily on lists — nearly every one
 * of them is a bulleted list of what the step involves. Themes routinely strip
 * list markers in their reset, and this only set padding, so the bullets and
 * numbers vanished and every list read as an undifferentiated block.
 *
 * Restated here rather than inherited, and scoped through .aj-ob so it
 * outranks a theme rule like `.entry-content ul { list-style: none }`. The
 * explicit `display: list-item` matters too: a theme that sets `display:
 * block` on li removes the marker just as effectively as list-style does.
 */
.aj-ob .aj-ob-item__prose ul,
.aj-ob .aj-ob-item__prose ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  list-style-position: outside;
}

.aj-ob .aj-ob-item__prose ul {
  list-style-type: disc;
}

.aj-ob .aj-ob-item__prose ol {
  list-style-type: decimal;
}

/* Nested lists get their own marker, so depth is readable. */
.aj-ob .aj-ob-item__prose ul ul {
  list-style-type: circle;
}

.aj-ob .aj-ob-item__prose ul ul ul {
  list-style-type: square;
}

.aj-ob .aj-ob-item__prose ol ol {
  list-style-type: lower-alpha;
}

.aj-ob .aj-ob-item__prose li {
  display: list-item;
  margin-bottom: 0.4rem;
}

/* A nested list belongs tight under its parent item, not floating after it. */
.aj-ob .aj-ob-item__prose li > ul,
.aj-ob .aj-ob-item__prose li > ol {
  margin: 0.4rem 0 0;
}

.aj-ob .aj-ob-item__prose li:last-child {
  margin-bottom: 0;
}

.aj-ob .aj-ob-item__prose li::marker {
  color: var(--aj-blue);
}

/* Paragraphs in a task body need the same spacing the lists have. */
.aj-ob .aj-ob-item__prose p {
  margin: 0 0 1rem;
}

.aj-ob-item__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 1rem 0 0;
  font-size: 0.86rem;
  color: rgba(20, 32, 46, 0.72);
}

.aj-ob-item__facts:empty {
  display: none;
}

.aj-ob-item__more {
  margin: 0.85rem 0 0;
  font-weight: 700;
}

.aj-ob-item__note {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--aj-line);
}

.aj-ob-item__note .aj-ob-btn {
  margin-top: 0.5rem;
}

.aj-ob-item.is-overdue .aj-ob-item__title {
  color: #b3121b;
}

.aj-ob-item.is-critical:not(.is-done) .aj-ob-item__main {
  position: relative;
}

/* Locked items */

.aj-ob-item.is-locked {
  opacity: 0.72;
}

.aj-ob-item__lock {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  border-radius: 6px;
  background: rgba(232, 163, 62, 0.22);
  position: relative;
}

.aj-ob-item__lock::before {
  content: "";
  position: absolute;
  inset: 6px 7px 5px;
  border: 2px solid var(--aj-gold-deep);
  border-bottom-width: 7px;
  border-radius: 2px 2px 3px 3px;
}

.aj-ob-item__locked-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--aj-gold-deep);
}

/* -------------------------------------------------------------- Paywall */

.aj-ob-paywall {
  margin: 2rem 0;
  padding: 1.75rem;
  border-radius: var(--aj-radius);
  border: 2px solid var(--aj-gold);
  background: linear-gradient(
    180deg,
    rgba(232, 163, 62, 0.1),
    rgba(232, 163, 62, 0.03)
  );
  text-align: center;
}

.aj-ob-paywall__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.aj-ob-paywall__stages {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--aj-gold-deep);
}

.aj-ob-paywall__lede {
  margin: 0 auto 1.4rem;
  max-width: 48ch;
}

.aj-ob-paywall__action form {
  margin: 0;
}

.aj-ob-paywall__error {
  margin: 0.9rem 0 0;
  color: #b3121b;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Footer */

.aj-ob-dash__foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--aj-line);
}

.aj-ob-edit {
  background: #fff;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  padding: 0.9rem 1.1rem;
}

.aj-ob-edit__form {
  margin-top: 0.75rem;
}

.aj-ob-edit__form .aj-ob-btn {
  margin-top: 1rem;
}

.aj-ob-dash__help {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: rgba(20, 32, 46, 0.7);
}

/* ---------------------------------------------------------------- Tools */

/* An interactive control living inside a task — currently the move-date
   setter, which rebuilds the whole plan around the answer. */
.aj-ob-tool {
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--aj-blue);
  border-radius: 10px;
  background: rgba(5, 146, 206, 0.06);
}

.aj-ob-tool__lede {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.aj-ob-tool__form .aj-ob-btn {
  margin-top: 1rem;
}

.aj-ob-reset {
  margin-top: 0.75rem;
}

/* The budget calculator. */

.aj-ob-costs__people {
  margin-bottom: 1.25rem;
}

.aj-ob-costs__people .aj-ob-input {
  max-width: 7rem;
}

.aj-ob-costs__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--aj-line);
}

.aj-ob-costs__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--aj-line);
}

.aj-ob-costs__label {
  flex: 1 1 260px;
  min-width: 0;
}

.aj-ob-costs__label label {
  font-weight: 600;
  display: block;
}

.aj-ob-costs__hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: rgba(20, 32, 46, 0.65);
}

.aj-ob-costs__amount {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.aj-ob-costs__currency {
  font-weight: 700;
  color: rgba(20, 32, 46, 0.6);
}

.aj-ob-costs__amount .aj-ob-input {
  width: 8rem;
  max-width: none;
  text-align: right;
}

.aj-ob-costs__totals {
  margin-top: 1.1rem;
}

.aj-ob-costs__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.35rem;
}

.aj-ob-costs__row--total {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 2px solid var(--aj-ink);
  font-size: 1.15rem;
}

.aj-ob-costs__row--total strong {
  color: var(--aj-blue);
}

.aj-ob-reset .aj-ob-btn {
  margin-top: 0.75rem;
}

/* ------------------------------------------------------------------- CTA */

.aj-ob-cta {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--aj-radius);
  border: 1px solid var(--aj-line);
  background: rgba(5, 146, 206, 0.06);
}

.aj-ob-cta__title {
  margin: 0 0 0.5rem;
}

.aj-ob-cta__text {
  margin: 0 0 1rem;
}

/* --------------------------------------------------------- Accessibility */

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

.aj-ob-item.is-saving {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .aj-ob-btn,
  .aj-ob-choice,
  .aj-ob-item {
    transition: none;
  }
}

/* --------------------------------------------------------------- Mobile */

@media (max-width: 640px) {
  .aj-ob-intake,
  .aj-ob-stage,
  .aj-ob-paywall {
    padding: 1.1rem;
  }

  .aj-ob-dash__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .aj-ob-step__title {
    font-size: 1.2rem;
  }

  .aj-ob-intake__actions .aj-ob-btn {
    flex: 1 1 auto;
  }

  .aj-ob-cards {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------------------
 * Life events
 *
 * A life-event list borrows .aj-ob-stage so the card, the heading and the
 * item list all look like the rest of the plan. What is different is that it
 * is anchored to something that happened rather than to a place on the
 * journey, and the urgent ones carry a real deadline — so those get a red
 * edge, which is the only visual weight in the plugin reserved for time.
 * --------------------------------------------------------------------- */

.aj-ob .aj-ob-lifes {
  margin: 0 0 1.5rem;
}

.aj-ob .aj-ob-life {
  border-left: 4px solid var(--aj-blue);
}

.aj-ob .aj-ob-life.is-urgent {
  border-left-color: var(--aj-red);
}

.aj-ob .aj-ob-chip--urgent {
  background: rgba(255, 29, 39, 0.12);
  color: var(--aj-red);
}

.aj-ob .aj-ob-life__date {
  display: inline-block;
  font-weight: 400;
  opacity: 0.7;
}

.aj-ob .aj-ob-life__off {
  margin: 0.75rem 0 0;
}

.aj-ob .aj-ob-btn--quiet {
  background: none;
  border: 1px solid var(--aj-line);
  color: inherit;
  opacity: 0.75;
}

.aj-ob .aj-ob-btn--quiet:hover,
.aj-ob .aj-ob-btn--quiet:focus-visible {
  opacity: 1;
  border-color: var(--aj-red);
  color: var(--aj-red);
}

/* The picker, on the dashboard and on its own page. */

.aj-ob .aj-ob-lifeadd {
  margin: 1.5rem 0 0;
  padding: 1.25rem;
  background: #fff;
  border: 1px dashed var(--aj-line);
  border-radius: var(--aj-radius);
}

.aj-ob .aj-ob-lifeadd__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.aj-ob .aj-ob-lifeadd__blurb,
.aj-ob .aj-ob-lifeapp__blurb {
  margin: 0 0 1rem;
  opacity: 0.8;
}

.aj-ob .aj-ob-lifeadd__form {
  margin: 0;
}

.aj-ob .aj-ob-lifeadd__gate {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  background: rgba(232, 163, 62, 0.12);
  border-radius: 8px;
}

/* Shared form scaffolding. A paragraph per field, so it still reads as a
 * form with no CSS at all. */

.aj-ob .aj-ob-field {
  margin: 0 0 1rem;
}

.aj-ob .aj-ob-field > .aj-ob-label {
  display: block;
  margin-bottom: 0.35rem;
}

.aj-ob .aj-ob-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.aj-ob .aj-ob-lifeapp__head {
  margin: 0 0 1.25rem;
}

.aj-ob .aj-ob-lifeapp__title {
  margin: 0 0 0.5rem;
}

.aj-ob .aj-ob-lifeapp__back {
  margin: 1.5rem 0 0;
}

@media (min-width: 900px) {
  .aj-ob .aj-ob-lifeapp {
    max-width: var(--aj-ob-measure);
  }
}
