      @import url("https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap");

      :root {
        --navy-deep: #08192b;
        --navy-card: #0f2740;
        --navy-card-2: #12314f;
        --line: #233f5c;
        --orange: #ff5a1f;
        --orange-dim: #c74515;
        --amber: #ffb627;
        --teal: #3fa7a3;
        --sky: #4fb2e8;
        --ink: #eaf2f8;
        --muted: #7c93ac;
        --danger: #e5484d;
        --good: #3ecf6e;
      }
      * {
        box-sizing: border-box;
      }
      html {
        -webkit-text-size-adjust: 100%;
      }
      body {
        margin: 0;
        background:
          radial-gradient(
            1200px 500px at 15% -10%,
            #123055 0%,
            transparent 60%
          ),
          radial-gradient(900px 500px at 100% 0%, #0d2c46 0%, transparent 55%),
          var(--navy-deep);
        color: var(--ink);
        font-family: "IBM Plex Sans", sans-serif;
        padding: clamp(14px, 4vw, 28px) clamp(14px, 4vw, 32px) 48px;
        overflow-x: hidden;
      }
      .wrap {
        max-width: 1240px;
        margin: 0 auto;
      }

      /* ---- Header / hero ---- */
      .hero {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        border-bottom: 2px solid var(--line);
        padding-bottom: 20px;
        margin-bottom: 22px;
        gap: 24px;
        flex-wrap: wrap;
      }
      .hero-left {
        display: flex;
        align-items: center;
        gap: 16px;
        min-width: 0;
      }
      .buoy {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
      }
      .eyebrow {
        font-family: "IBM Plex Mono", monospace;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-size: 11px;
        color: var(--orange);
        margin: 0 0 6px;
      }
      h1 {
        font-family: "Oswald", sans-serif;
        font-weight: 700;
        font-size: clamp(22px, 4.4vw, 34px);
        letter-spacing: 0.01em;
        margin: 0;
        text-transform: uppercase;
        color: var(--ink);
      }
      .hero-sub {
        color: var(--muted);
        font-size: 13.5px;
        margin-top: 4px;
      }
      .station-stamp {
        font-family: "IBM Plex Mono", monospace;
        font-size: 12px;
        color: var(--muted);
        text-align: right;
        line-height: 1.7;
      }
      .station-stamp b {
        color: var(--ink);
        font-weight: 600;
      }

      /* ---- pennant divider (signature) ---- */
      .pennants {
        display: flex;
        align-items: center;
        gap: 3px;
        margin: 34px 0 18px;
      }
      .pennants .label {
        font-family: "Oswald";
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 15px;
        color: var(--ink);
        white-space: nowrap;
        padding-right: 14px;
        font-weight: 600;
      }
      .pennants svg {
        height: 14px;
        flex-shrink: 0;
      }
      .pennants .rope {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, var(--line), transparent);
      }

      /* ---- collapsible sections ---- */
      .section-toggle {
        width: 100%;
        background: none;
        border: none;
        padding: 0;
        font: inherit;
        color: inherit;
        text-align: left;
        cursor: pointer;
      }
      .section-toggle:hover .label {
        color: var(--orange);
      }
      .section-chevron {
        flex-shrink: 0;
        font-size: 11px;
        color: var(--muted);
        transition: transform 0.15s ease;
        margin-left: 6px;
      }
      .section-block.collapsed .section-chevron {
        transform: rotate(-90deg);
      }
      .section-block.collapsed .section-body {
        display: none;
      }

      /* ---- KPI strip ---- */
      .kpis {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        margin-bottom: 8px;
      }
      .kpi {
        background: linear-gradient(
          180deg,
          var(--navy-card),
          var(--navy-card-2)
        );
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 18px 20px;
        position: relative;
        overflow: hidden;
        min-width: 0;
      }
      .kpi::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--orange);
      }
      .kpi.teal::before {
        background: var(--teal);
      }
      .kpi.amber::before {
        background: var(--amber);
      }
      .strip-heading {
        font-family: "Oswald";
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-size: 13px;
        font-weight: 600;
        color: var(--teal);
        margin: 22px 0 4px;
      }
      .kpi .num {
        font-family: "Oswald";
        font-size: clamp(22px, 5vw, 36px);
        font-weight: 600;
        line-height: 1;
        word-break: break-word;
      }
      .kpi .num sup {
        font-size: 16px;
        font-weight: 500;
        color: var(--muted);
        margin-left: 2px;
      }
      .kpi .lbl {
        font-size: 12px;
        color: var(--muted);
        margin-top: 8px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }

      /* ---- grid / cards ---- */
      .grid2 {
        display: grid;
        grid-template-columns: 1.3fr 1fr;
        gap: 16px;
        align-items: stretch;
      }
      #traineeProfiles,
      #crewProfiles {
        grid-template-columns: 1fr 1fr;
      }
      .card {
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 20px 22px 16px;
        min-width: 0;
      }
      .card h3 {
        font-family: "Oswald";
        text-transform: uppercase;
        font-size: 16px;
        letter-spacing: 0.03em;
        margin: 0 0 2px;
        font-weight: 600;
      }
      .card .sub {
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 14px;
      }
      .profile-card .sub {
        /* reserve 2 lines so module rows start at the same height across
   trainee cards, whether or not this line actually wraps */
        line-height: 1.5;
        min-height: 36px;
      }
      .full {
        grid-column: 1/-1;
      }

      .legend-row {
        display: flex;
        gap: 16px;
        margin: 2px 0 14px;
        flex-wrap: wrap;
      }
      .legend-row span {
        font-size: 11.5px;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .dot {
        width: 9px;
        height: 9px;
        border-radius: 2px;
        display: inline-block;
        flex-shrink: 0;
      }

      canvas {
        max-width: 100%;
      }
      .chart-box {
        position: relative;
        width: 100%;
      }
      .chart-tall {
        height: 400px;
      }
      .chart-mid {
        height: 280px;
      }
      .chart-sea {
        height: 360px;
      }
      .chart-donut {
        height: 230px;
      }

      .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      table.roster {
        width: 100%;
        border-collapse: collapse;
        font-size: 12.5px;
      }
      table.roster th {
        text-align: left;
        font-family: "IBM Plex Mono";
        font-size: 10.5px;
        text-transform: uppercase;
        color: var(--muted);
        font-weight: 500;
        padding: 6px 8px;
        border-bottom: 1px solid var(--line);
        white-space: nowrap;
      }
      table.roster td {
        padding: 7px 8px;
        border-bottom: 1px solid rgba(35, 63, 92, 0.5);
        white-space: nowrap;
      }
      table.roster tr:hover td {
        background: rgba(255, 90, 31, 0.05);
      }
      .pill {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 20px;
        font-size: 10.5px;
        font-weight: 600;
        font-family: "IBM Plex Mono";
      }
      .pill.hi {
        background: rgba(63, 167, 163, 0.18);
        color: var(--teal);
      }
      .pill.mid {
        background: rgba(255, 182, 39, 0.18);
        color: var(--amber);
      }
      .pill.lo {
        background: rgba(229, 72, 77, 0.16);
        color: var(--danger);
      }
      /* Target-based pills (6-month rolling columns) — met/below a fixed
   target (theme.js), not the 3-tier hi/mid/lo scale above. */
      .pill.target-met {
        background: rgba(62, 207, 110, 0.16);
        color: var(--good);
      }
      .pill.target-below {
        background: rgba(229, 72, 77, 0.16);
        color: var(--danger);
      }

      footer {
        margin-top: 30px;
        padding-top: 16px;
        border-top: 1px solid var(--line);
        font-size: 11px;
        color: var(--muted);
        font-family: "IBM Plex Mono";
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
      }

      /* =========================================================
     RESPONSIVE BREAKPOINTS
     ========================================================= */
      @media (max-width: 1024px) {
        .kpis {
          grid-template-columns: repeat(2, 1fr);
        }
      }
      @media (max-width: 900px) {
        .grid2,
        #traineeProfiles,
        #crewProfiles {
          grid-template-columns: 1fr;
        }
      }
      @media (max-width: 768px) {
        .hero {
          flex-direction: column;
          align-items: flex-start;
          padding-bottom: 16px;
          margin-bottom: 16px;
        }
        .station-stamp {
          text-align: left;
          width: 100%;
          font-size: 11px;
        }
        .hero-actions {
          align-items: flex-start;
          width: 100%;
          gap: 10px;
        }
        .nav-links {
          justify-content: flex-start;
        }
        .nav-btn {
          font-size: 11px;
          padding: 6px 12px;
        }
        #dataStatus {
          flex-direction: column;
          align-items: flex-start;
        }
        .card {
          padding: 16px 16px 14px;
        }
        .chart-tall {
          height: 360px;
        }
        .chart-mid {
          height: 260px;
        }
        .chart-sea {
          height: 320px;
        }
        .profile-stats {
          grid-template-columns: repeat(2, 1fr);
        }
      }
      @media (max-width: 640px) {
        .kpis {
          grid-template-columns: repeat(2, 1fr);
          gap: 10px;
        }
        .pennants .label {
          font-size: 13px;
          padding-right: 8px;
        }
        .legend-row {
          gap: 10px;
        }
        .mod-item {
          flex-direction: column;
          align-items: flex-start;
          gap: 4px;
        }
        .status-chip {
          margin-top: 0;
        }
        .profile-head {
          flex-direction: column;
          align-items: flex-start;
          gap: 6px;
        }
      }
      @media (max-width: 420px) {
        .kpis {
          grid-template-columns: 1fr 1fr;
        }
        .profile-stats {
          grid-template-columns: 1fr 1fr;
        }
        h1 {
          font-size: 20px;
        }
        .buoy {
          width: 40px;
          height: 40px;
        }
        .card {
          padding: 14px 12px 12px;
        }
        .chart-tall {
          height: 320px;
        }
        .chart-sea {
          height: 300px;
        }
      }

      /* ---- trainee profile cards ---- */
      .profile-card {
        display: flex;
        flex-direction: column;
        height: 100%;
      }
      .profile-head {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: baseline;
        gap: 6px;
        margin-bottom: 2px;
      }
      .profile-head h3 {
        margin: 0;
        min-width: 0;
        overflow-wrap: break-word;
      }
      .profile-head .badge {
        flex-shrink: 0;
        font-family: "IBM Plex Mono";
        font-size: 11px;
        color: var(--orange);
        border: 1px solid var(--orange-dim);
        padding: 2px 8px;
        border-radius: 20px;
      }
      .profile-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin: 8px 0;
      }
      .profile-stats.pair {
        grid-template-columns: repeat(2, 1fr);
      }
      .profile-card .profile-stats:first-of-type {
        margin-top: 14px;
      }
      .profile-card .profile-stats:last-of-type {
        margin-bottom: 18px;
      }
      .person-filter {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: -6px 0 16px;
      }
      .filter-label {
        font-family: "IBM Plex Mono", monospace;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-size: 10.5px;
        color: var(--muted);
        margin: 0 0 6px;
      }
      .filter-chip {
        font-family: "IBM Plex Mono";
        font-size: 11px;
        color: var(--muted);
        background: transparent;
        border: 1px solid var(--line);
        padding: 4px 12px;
        border-radius: 20px;
        cursor: pointer;
      }
      .filter-chip:hover {
        color: var(--ink);
        border-color: var(--orange-dim);
      }
      .filter-chip.active {
        color: var(--orange);
        border-color: var(--orange-dim);
        background: rgba(255, 90, 31, 0.1);
      }
      .filter-chip.filter-chip-all {
        font-weight: 600;
      }
      .roster-search {
        display: block;
        width: 100%;
        max-width: 320px;
        font-family: "IBM Plex Sans";
        font-size: 13px;
        color: var(--ink);
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 12px;
        margin-bottom: 12px;
      }
      .roster-search::placeholder {
        color: var(--muted);
      }
      .roster-search:focus {
        outline: none;
        border-color: var(--orange-dim);
      }

      /* ---- password gate (demo) ---- */
      .lock-screen {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: var(--navy-deep);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
      }
      .lock-card {
        width: 100%;
        max-width: 420px;
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 36px 32px 32px;
        text-align: center;
      }
      .lock-card .pennants {
        display: inline-flex;
        margin: 18px 0;
      }
      @keyframes pennant-nudge {
        0%,
        100% {
          transform: translateX(0);
        }
        50% {
          transform: translateX(8px);
        }
      }
      .lock-card .pennants svg {
        width: 40px;
        animation: pennant-nudge 1.4s ease-in-out infinite;
      }
      .lock-sub {
        font-size: 13px;
        color: var(--muted);
        line-height: 1.6;
        margin: 0 0 22px;
      }
      .lock-input {
        display: block;
        box-sizing: border-box;
        width: 100%;
        font-family: "IBM Plex Sans";
        font-size: 14px;
        text-align: center;
        color: var(--ink);
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 14px;
        margin-bottom: 14px;
      }
      .lock-input::placeholder {
        color: var(--muted);
      }
      .lock-input:focus {
        outline: none;
        border-color: var(--orange-dim);
      }
      .lock-button {
        width: 100%;
        font-family: "Oswald";
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 14px;
        font-weight: 600;
        color: #08192b;
        background: var(--orange);
        border: none;
        border-radius: 8px;
        padding: 12px;
        cursor: pointer;
      }
      .lock-button:hover {
        background: var(--orange-dim);
        color: var(--ink);
      }
      .lock-error {
        color: var(--danger);
        font-size: 12px;
        margin: 14px 0 0;
      }
      .profile-stats .pstat {
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-left: 3px solid var(--line);
        border-radius: 8px;
        padding: 10px 10px 8px;
      }
      /* Accent colours reuse the same day/night/vessel palette as the Sea
   Hours charts and legends elsewhere in the dashboard. */
      .profile-stats .pstat.accent-orange {
        border-left-color: var(--orange);
      }
      .profile-stats .pstat.accent-orange .v {
        color: var(--orange);
      }
      .profile-stats .pstat.accent-teal {
        border-left-color: var(--teal);
      }
      .profile-stats .pstat.accent-teal .v {
        color: var(--teal);
      }
      .profile-stats .pstat.accent-amber {
        border-left-color: var(--amber);
      }
      .profile-stats .pstat.accent-amber .v {
        color: var(--amber);
      }
      .profile-stats .pstat.accent-gray {
        border-left-color: var(--muted);
      }
      /* Rolling-window tiles (Attendance/Sea hours "6 mo") — colored by
   whether the person currently meets the target, not by category like
   the accent-* colors above. */
      .profile-stats .pstat.target-met {
        border-left-color: var(--good);
      }
      .profile-stats .pstat.target-met .v {
        color: var(--good);
      }
      .profile-stats .pstat.target-below {
        border-left-color: var(--danger);
      }
      .profile-stats .pstat.target-below .v {
        color: var(--danger);
      }
      .profile-stats .pstat .v {
        font-family: "Oswald";
        font-size: 20px;
        font-weight: 600;
        line-height: 1;
      }
      .profile-stats .pstat .l {
        font-size: 9.5px;
        line-height: 1.4;
        min-height: 27px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-top: 5px;
      }

      .mod-row {
        margin-bottom: 9px;
      }
      .mod-row .mod-label {
        display: flex;
        justify-content: space-between;
        font-size: 11.5px;
        color: var(--muted);
        margin-bottom: 3px;
        cursor: pointer;
        user-select: none;
        align-items: center;
        gap: 8px;
      }
      .mod-row .mod-label:hover span {
        color: var(--ink);
      }
      .mod-row .mod-label .chev {
        display: inline-block;
        transition: transform 0.18s ease;
        color: var(--orange);
        font-size: 10px;
        flex-shrink: 0;
      }
      .mod-row.open .mod-label .chev {
        transform: rotate(90deg);
      }
      .mod-row .mod-label b {
        color: var(--ink);
        font-weight: 500;
        white-space: nowrap;
      }
      .mod-bar {
        height: 9px;
        border-radius: 4px;
        overflow: hidden;
        display: flex;
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        cursor: pointer;
      }
      .mod-bar .seg {
        height: 100%;
      }
      .seg-ass {
        background: var(--teal);
      }
      .seg-tr {
        background: var(--amber);
      }
      .seg-not {
        background: transparent;
      }
      .seg-na {
        background: repeating-linear-gradient(
          45deg,
          #233f5c,
          #233f5c 3px,
          #1a3350 3px,
          #1a3350 6px
        );
      }

      .mod-items {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.22s ease;
        border-left: 2px solid var(--line);
        margin: 0 0 0 2px;
      }
      .mod-row.open .mod-items {
        max-height: 2000px;
      }
      .mod-item {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: flex-start;
        padding: 7px 0 7px 12px;
        font-size: 11.5px;
        color: var(--muted);
        border-bottom: 1px dashed rgba(35, 63, 92, 0.6);
      }
      .mod-item:last-child {
        border-bottom: none;
      }
      .mod-item .item-text {
        flex: 1;
        line-height: 1.4;
      }
      /* class names driven by STATUS_META.*.cssClass in status.js */
      .status-chip {
        flex-shrink: 0;
        font-family: "IBM Plex Mono";
        font-size: 10px;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 20px;
        white-space: nowrap;
        margin-top: 1px;
      }
      .status-chip.ASS {
        background: rgba(63, 167, 163, 0.18);
        color: var(--teal);
      }
      .status-chip.TR {
        background: rgba(255, 182, 39, 0.18);
        color: var(--amber);
      }
      .status-chip.NA {
        background: rgba(124, 147, 172, 0.15);
        color: var(--muted);
      }
      .status-chip.NOT {
        background: transparent;
        border: 1px solid var(--line);
        color: var(--muted);
      }

      /* ---- task book progress by topic (item x trainee matrix) ---- */
      .topic-matrix {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
      }
      .topic-matrix th {
        text-align: left;
        padding: 8px 10px;
        color: var(--muted);
        text-transform: uppercase;
        font-size: 10.5px;
        letter-spacing: 0.04em;
        border-bottom: 1px solid var(--line);
        white-space: nowrap;
        position: sticky;
        top: 0;
        background: var(--navy-card);
      }
      .topic-matrix th:first-child {
        text-align: left;
        min-width: 220px;
      }
      .topic-matrix td {
        padding: 6px 10px;
        border-bottom: 1px dashed rgba(35, 63, 92, 0.6);
        vertical-align: middle;
      }
      .topic-module-row {
        cursor: pointer;
        user-select: none;
      }
      .topic-module-row td {
        background: var(--navy-card-2);
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-size: 12.5px;
      }
      .topic-module-row .chev {
        display: inline-block;
        transition: transform 0.18s ease;
        color: var(--orange);
        font-size: 10px;
        margin-right: 6px;
      }
      .topic-module-row.open .chev {
        transform: rotate(90deg);
      }
      .topic-item-row {
        display: none;
      }
      .topic-item-row.open {
        display: table-row;
      }
      .topic-matrix .status-chip {
        font-size: 9.5px;
        padding: 2px 7px;
      }

      /* ---- upcoming training board (Trello-sourced) ---- */
      .board {
        display: grid;
        grid-template-columns: repeat(
          auto-fit,
          minmax(min(260px, 100%), 400px)
        );
        gap: 14px;
        align-items: start;
        justify-content: start;
      }
      .board-col {
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 14px 14px 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-width: 0;
      }
      .board-col.next {
        border-color: var(--orange);
        box-shadow: 0 0 0 1px rgba(255, 90, 31, 0.25);
      }
      .board-col-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
      }
      .board-col-head .date {
        font-family: "Oswald";
        font-weight: 600;
        font-size: clamp(13px, 3vw, 15px);
        letter-spacing: 0.01em;
      }
      .board-col-head .count {
        font-family: "IBM Plex Mono";
        font-size: 11px;
        color: var(--muted);
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 1px 8px;
      }
      .next-tag {
        display: inline-block;
        font-family: "IBM Plex Mono";
        font-size: 9.5px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--orange);
        border: 1px solid var(--orange-dim);
        border-radius: 20px;
        padding: 1px 7px;
        margin-bottom: 2px;
        width: fit-content;
      }
      .checklist-row {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: var(--muted);
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-radius: 7px;
        padding: 6px 10px;
      }
      .checklist-row b {
        color: var(--ink);
        font-weight: 600;
        font-family: "IBM Plex Mono";
      }
      .trello-card {
        background: var(--navy-card-2);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 9px 11px;
      }
      .trello-tags {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
        margin-bottom: 5px;
      }
      /* keys must match TAG_META in tags.js */
      .trello-tag {
        font-family: "IBM Plex Mono";
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        padding: 2px 7px;
        border-radius: 4px;
        font-weight: 600;
      }
      .trello-tag.vessel {
        background: rgba(255, 90, 31, 0.18);
        color: var(--orange);
      }
      .trello-tag.land {
        background: rgba(255, 182, 39, 0.16);
        color: var(--amber);
      }
      .trello-tag.water {
        background: rgba(79, 178, 232, 0.18);
        color: var(--sky);
      }
      .trello-tag.assess {
        background: rgba(63, 167, 163, 0.18);
        color: var(--teal);
      }
      .trello-tag.confirm {
        background: rgba(150, 120, 255, 0.18);
        color: #b79cff;
      }
      .trello-card .ttext {
        font-size: 12px;
        line-height: 1.4;
        color: var(--ink);
      }
      .trello-card .ttrainer {
        font-size: 10.5px;
        color: var(--muted);
        margin-top: 5px;
      }
      .board-note {
        font-size: 11px;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: -4px;
      }

      /* ---- nav / pill buttons (Yearly Planner link, back link) ---- */
      .nav-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-family: "IBM Plex Mono", monospace;
        font-size: 12px;
        color: var(--orange);
        background: transparent;
        border: 1px solid var(--orange-dim);
        border-radius: 20px;
        padding: 8px 16px;
        cursor: pointer;
        text-decoration: none;
        white-space: nowrap;
      }
      .nav-btn:hover {
        border-color: var(--orange);
        background: rgba(255, 90, 31, 0.1);
      }
      .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
      }
      .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
      }

      /* ---- planner: view toggle + month tabs ---- */
      .view-toggle {
        display: inline-flex;
        border: 1px solid var(--line);
        border-radius: 20px;
        overflow: hidden;
        margin-bottom: 20px;
      }
      .view-toggle button {
        font-family: "Oswald";
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
        background: var(--navy-card);
        border: none;
        padding: 9px 22px;
        cursor: pointer;
      }
      .view-toggle button.active {
        color: #08192b;
        background: var(--orange);
      }
      .month-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 6px;
        margin-bottom: 18px;
        -webkit-overflow-scrolling: touch;
      }
      .month-tabs button {
        flex-shrink: 0;
        font-family: "IBM Plex Mono", monospace;
        font-size: 12px;
        color: var(--muted);
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 7px 14px;
        cursor: pointer;
      }
      .month-tabs button.active {
        color: var(--orange);
        border-color: var(--orange-dim);
        background: rgba(255, 90, 31, 0.1);
      }
      .month-nav-arrow {
        font-family: "IBM Plex Mono", monospace;
        font-size: 16px;
        color: var(--ink);
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 8px;
        width: 36px;
        height: 36px;
        cursor: pointer;
        flex-shrink: 0;
      }
      .month-nav-arrow:hover {
        border-color: var(--orange-dim);
        color: var(--orange);
      }
      .month-nav-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
      }

      /* ---- calendar grids (shared weekday header) ---- */
      .cal-weekdays {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-bottom: 6px;
      }
      .cal-weekdays span {
        text-align: center;
        font-size: 10px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }

      /* ---- year view: 12 mini calendars ---- */
      .year-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
      }
      .mini-month {
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 14px 14px 10px;
        cursor: pointer;
      }
      .mini-month:hover {
        border-color: var(--orange-dim);
      }
      .mini-month h4 {
        margin: 0 0 10px;
        font-family: "Oswald";
        font-size: 14px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--ink);
      }
      .mini-cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
      }
      .mini-cal-grid .cal-day {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: var(--muted);
        border-radius: 4px;
      }
      .mini-cal-grid .cal-day.has-event {
        background: rgba(255, 90, 31, 0.16);
        color: var(--orange);
        font-weight: 600;
      }
      .mini-cal-grid .cal-day.today {
        outline: 1px solid var(--teal);
      }

      /* ---- month view: single full calendar ---- */
      .month-cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
      }
      .month-cal-grid .cal-day {
        background: var(--navy-card);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 6px 7px;
        min-height: 76px;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
      }
      .month-cal-grid .cal-day.empty {
        background: transparent;
        border-color: transparent;
      }
      .month-cal-grid .cal-day.today {
        border-color: var(--teal);
      }
      .month-cal-grid .cal-day.has-events {
        cursor: pointer;
      }
      .month-cal-grid .cal-day.expanded {
        position: relative;
        z-index: 2;
        border-color: var(--orange-dim);
      }
      .month-cal-grid .cal-day.expanded .day-event {
        display: block !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        font-size: 11px;
      }
      .month-cal-grid .day-num {
        font-family: "Oswald";
        font-size: 13px;
        font-weight: 600;
        color: var(--ink);
      }
      .day-weekday {
        display: none;
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-right: 6px;
      }
      .month-cal-grid .day-events {
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
        min-width: 0;
      }
      .month-cal-grid .day-event {
        font-size: 9.5px;
        line-height: 1.3;
        color: var(--orange);
        background: rgba(255, 90, 31, 0.14);
        border-radius: 3px;
        padding: 1px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      @media (max-width: 1024px) {
        .year-grid {
          grid-template-columns: repeat(3, 1fr);
        }
      }
      @media (max-width: 768px) {
        .year-grid {
          grid-template-columns: repeat(2, 1fr);
        }
        .month-cal-grid .cal-day {
          min-height: 58px;
          padding: 4px 5px;
        }
        .month-cal-grid .day-event {
          font-size: 8.5px;
        }
      }
      @media (max-width: 480px) {
        .year-grid {
          grid-template-columns: 1fr;
        }
        /* Month view switches from a 7-column grid to a single-column
           list of full-width day rows — a 7-column grid is too cramped
           to be readable at phone widths no matter how small the text
           gets, so each day gets a real row instead. */
        .cal-weekdays {
          display: none;
        }
        .month-cal-grid {
          grid-template-columns: 1fr;
          gap: 5px;
        }
        .month-cal-grid .cal-day.empty {
          display: none;
        }
        .month-cal-grid .cal-day {
          min-height: 0;
          flex-direction: row;
          align-items: baseline;
          flex-wrap: wrap;
          gap: 6px 10px;
          padding: 8px 10px;
        }
        .month-cal-grid .day-num {
          font-size: 12px;
          flex-shrink: 0;
        }
        .day-weekday {
          display: inline;
        }
        .month-cal-grid .day-events {
          flex: 1;
          flex-direction: row;
          flex-wrap: wrap;
          min-width: 120px;
        }
        .month-cal-grid .day-event {
          font-size: 10.5px;
          white-space: normal;
          overflow: visible;
          text-overflow: clip;
        }
      }

      /* ---- hub: landing tiles ---- */
      .hub-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        margin-top: 24px;
      }
      .hub-tile {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 140px;
        background: linear-gradient(180deg, var(--navy-card), var(--navy-card-2));
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 24px;
        position: relative;
        overflow: hidden;
        text-decoration: none;
        color: var(--ink);
        transition: border-color 0.15s ease;
      }
      .hub-tile::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: var(--orange);
      }
      .hub-tile:hover {
        border-color: var(--orange-dim);
      }
      .hub-tile h3 {
        font-family: "Oswald";
        font-size: 20px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin: 0 0 8px;
      }
      .hub-tile p {
        font-size: 13px;
        color: var(--muted);
        margin: 0;
        line-height: 1.5;
      }
      .hub-tile .hub-arrow {
        font-family: "IBM Plex Mono", monospace;
        font-size: 13px;
        color: var(--orange);
        margin-top: 16px;
      }
      .hub-tile.disabled {
        cursor: not-allowed;
        opacity: 0.55;
        pointer-events: none;
      }
      .hub-tile.disabled::before {
        background: var(--muted);
      }
      .hub-tile .hub-badge {
        position: absolute;
        top: 18px;
        right: 18px;
        font-family: "IBM Plex Mono", monospace;
        font-size: 10px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--muted);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 3px 10px;
      }
      @media (max-width: 900px) {
        .hub-grid {
          grid-template-columns: repeat(2, 1fr);
        }
      }
      @media (max-width: 640px) {
        .hub-grid {
          grid-template-columns: 1fr;
        }
      }
