:root {
      --navy: #0C2340;
      --navy-dark: #061326;
      --accent: #1D4E89;
      --accent-bright: #2B6CB0;
      --accent-soft: #EBF3FA;
      --blue-soft: #EBF3FA;
      --silver: #C4CED4;
      --gold: #9A7434;
      --gold-bg: #FBF7EE;
      --bg: #F4F7FA;
      --card: #FFFFFF;
      --text: #1A2433;
      --muted: #526277;
      --border: #D9E2EC;
      --green: #0F7B4D;
      --green-bg: #E7F6EE;
      --amber: #B25E09;
      --amber-bg: #FEF3E2;
      --red: #B42318;
      --red-bg: #FEECEB;
      --purple: #5925DC;
      --purple-bg: #F4F0FF;
      --shadow: 0 4px 18px rgba(12, 35, 64, 0.06);
      --radius: 14px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
    }

    body {
      margin: 0;
      font-family: 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.68;
      font-size: 16px;
    }

    .num, td, th {
      font-variant-numeric: tabular-nums;
    }

    /* Hero Header with Yankees Pinstripe Texture */
    .hero {
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--accent) 100%);
      color: #FFFFFF;
      padding: 40px 20px 36px;
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.045) 0 1px,
        transparent 1px 28px
      );
      pointer-events: none;
    }

    .hero-bg-svg {
      position: absolute;
      right: -36px;
      top: -28px;
      width: 340px;
      height: 340px;
      opacity: 0.1;
      pointer-events: none;
    }

    .container {
      max-width: 1060px;
      margin: 0 auto;
      padding: 0 16px;
    }

    .hero .container {
      position: relative;
      z-index: 1;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.14);
      border: 1px solid rgba(255, 255, 255, 0.24);
      color: #EBF3FA;
      font-size: 13px;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 999px;
      letter-spacing: 0.02em;
      margin-bottom: 14px;
    }

    .hero h1 {
      margin: 0 0 12px;
      font-size: clamp(24px, 4.2vw, 36px);
      line-height: 1.28;
      font-weight: 800;
      letter-spacing: -0.01em;
    }

    .hero-subtitle {
      margin: 0 0 26px;
      font-size: clamp(15px, 2.2vw, 17px);
      color: rgba(255, 255, 255, 0.88);
      max-width: 820px;
    }

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    .kpi-card {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 12px;
      padding: 14px 16px;
      backdrop-filter: blur(6px);
    }

    .kpi-label {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.78);
      margin-bottom: 4px;
      font-weight: 600;
    }

    .kpi-val {
      font-size: clamp(20px, 3vw, 26px);
      font-weight: 800;
      color: #FFFFFF;
      line-height: 1.2;
      margin-bottom: 4px;
    }

    .kpi-sub {
      font-size: 12px;
      color: #D2E3F7;
      line-height: 1.4;
    }

    /* Sticky Pill Nav */
    .sticky-nav {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
    }

    .nav-inner {
      max-width: 1060px;
      margin: 0 auto;
      padding: 10px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      padding-bottom: 2px;
    }

    .nav-links::-webkit-scrollbar {
      display: none;
    }

    .nav-pill {
      flex: 0 0 auto;
      text-decoration: none;
      color: var(--navy);
      background: var(--blue-soft);
      font-size: 13px;
      font-weight: 600;
      padding: 6px 13px;
      border-radius: 999px;
      transition: background 0.18s, color 0.18s;
      white-space: nowrap;
    }

    .nav-pill:hover, .nav-pill:focus-visible {
      background: var(--navy);
      color: #FFFFFF;
    }

    .btn-print {
      flex: 0 0 auto;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: #FFFFFF;
      font-size: 13px;
      font-weight: 600;
      padding: 6px 14px;
      border-radius: 999px;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.18s;
    }

    .btn-print:hover {
      background: var(--navy);
      border-color: var(--navy);
    }

    /* Main Content */
    main {
      padding: 28px 0 56px;
    }

    section {
      margin-bottom: 34px;
      scroll-margin-top: 66px;
    }

    .section-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .section-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 9px;
      background: var(--navy);
      color: #FFFFFF;
      font-size: 15px;
      font-weight: 800;
      flex-shrink: 0;
    }

    .section-title {
      margin: 0;
      font-size: clamp(20px, 3vw, 24px);
      font-weight: 800;
      color: var(--navy);
      line-height: 1.3;
    }

    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      box-shadow: var(--shadow);
      margin-bottom: 18px;
    }

    .card h3 {
      margin: 0 0 12px;
      font-size: 18px;
      font-weight: 700;
      color: var(--navy);
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .card h4 {
      margin: 14px 0 8px;
      font-size: 16px;
      font-weight: 700;
      color: var(--accent);
    }

    p {
      margin: 0 0 12px;
    }

    p:last-child {
      margin-bottom: 0;
    }

    ul, ol {
      margin: 8px 0 12px;
      padding-left: 22px;
    }

    li {
      margin-bottom: 8px;
    }

    /* Summary Grid */
    .summary-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }

    .summary-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-top: 4px solid var(--accent);
      border-radius: var(--radius);
      padding: 18px;
      box-shadow: var(--shadow);
    }

    .summary-card:first-child {
      border-top-color: var(--red);
    }

    .summary-card:nth-child(2) {
      border-top-color: var(--navy);
    }

    .summary-tag {
      font-size: 12px;
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 6px;
      display: block;
    }

    .summary-card:first-child .summary-tag {
      color: var(--red);
    }

    .summary-card:nth-child(2) .summary-tag {
      color: var(--navy);
    }

    .summary-card p {
      font-size: 14.5px;
      color: var(--text);
    }

    /* Badges & Pills */
    .badge {
      display: inline-block;
      font-size: 12px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 999px;
      line-height: 1.4;
      white-space: nowrap;
      vertical-align: middle;
    }

    .badge-l { background: #DBEAFE; color: #1E40AF; }
    .badge-r { background: #E6F4F4; color: #005C5C; }
    .badge-s { background: var(--purple-bg); color: var(--purple); }
    .badge-good { background: var(--green-bg); color: var(--green); }
    .badge-warn { background: var(--amber-bg); color: var(--amber); }
    .badge-bad { background: var(--red-bg); color: var(--red); }
    .badge-navy { background: var(--blue-soft); color: var(--navy); }
    .badge-gold { background: var(--gold-bg); color: var(--gold); }

    /* Callouts */
    .callout {
      border-left: 4px solid var(--accent);
      background: var(--accent-soft);
      padding: 14px 16px;
      border-radius: 0 10px 10px 0;
      margin: 14px 0;
      font-size: 14.5px;
    }

    .callout-warn {
      border-left-color: var(--amber);
      background: var(--amber-bg);
    }

    .callout-red {
      border-left-color: var(--red);
      background: var(--red-bg);
    }

    .callout-green {
      border-left-color: var(--green);
      background: var(--green-bg);
    }

    /* Tables */
    .table-hint {
      display: none;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 6px;
      text-align: right;
    }

    .table-wrap {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border: 1px solid var(--border);
      border-radius: 10px;
      margin: 12px 0;
      background: #FFFFFF;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      text-align: left;
    }

    thead th {
      background: var(--navy);
      color: #FFFFFF;
      font-weight: 700;
      padding: 10px 12px;
      white-space: nowrap;
      font-size: 13px;
    }

    tbody td {
      padding: 10px 12px;
      border-top: 1px solid var(--border);
      vertical-align: middle;
    }

    tbody tr:nth-child(even) {
      background: #F8FAFC;
    }

    tbody tr.row-highlight {
      background: #FFF4F2;
    }

    tbody tr.row-accent {
      background: #EEF4FA;
    }

    .table-note {
      font-size: 13px;
      color: var(--muted);
      margin-top: 8px;
      line-height: 1.55;
    }

    /* Visual Charts */
    .chart-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin: 14px 0;
    }

    .chart-box {
      background: #F9FBFD;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
    }

    .chart-title {
      font-size: 14.5px;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 12px;
    }

    .bar-row {
      display: grid;
      grid-template-columns: 96px 1fr 48px;
      align-items: center;
      gap: 10px;
      margin-bottom: 9px;
      font-size: 13.5px;
    }

    .bar-row:last-child {
      margin-bottom: 0;
    }

    .bar-label {
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
    }

    .bar-track {
      height: 14px;
      background: #E4ECF3;
      border-radius: 999px;
      overflow: hidden;
      position: relative;
    }

    .bar-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--navy) 0%, var(--accent-bright) 100%);
    }

    .bar-fill.fill-good {
      background: linear-gradient(90deg, #0F7B4D 0%, #10B981 100%);
    }

    .bar-fill.fill-bad {
      background: linear-gradient(90deg, #D92D20 0%, #F04438 100%);
    }

    .bar-fill.fill-muted {
      background: #7A8CA3;
    }

    .bar-val {
      font-weight: 700;
      text-align: right;
      color: var(--navy);
    }

    .bar-val.val-bad {
      color: var(--red);
    }

    /* Split Comparison Visual */
    .split-bars {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .split-item-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      font-size: 13.5px;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .split-dual {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .split-pill {
      padding: 8px 10px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }

    .split-pill.p1 {
      background: var(--blue-soft);
      color: var(--navy);
    }

    .split-pill.p2-bad {
      background: var(--red-bg);
      color: var(--red);
    }

    .split-pill.p2-good {
      background: var(--green-bg);
      color: var(--green);
    }

    /* Moves Grid */
    .trade-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 18px;
    }

    .trade-side {
      border-radius: 12px;
      padding: 18px;
      border: 1px solid var(--border);
    }

    .trade-keep {
      background: linear-gradient(180deg, #EEF4FA 0%, #FFFFFF 100%);
      border-top: 4px solid var(--navy);
    }

    .trade-out {
      background: linear-gradient(180deg, #FBF4F3 0%, #FFFFFF 100%);
      border-top: 4px solid var(--red);
    }

    .trade-side-title {
      font-size: 15px;
      font-weight: 800;
      margin-bottom: 12px;
      color: var(--navy);
    }

    .player-chip {
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      margin-bottom: 10px;
    }

    .player-chip:last-child {
      margin-bottom: 0;
    }

    .player-chip-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 4px;
    }

    .player-chip-desc {
      font-size: 13.5px;
      color: var(--muted);
      line-height: 1.5;
    }

    /* Two/Three Col */
    .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .three-col {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }

    /* Interactive Tabs */
    .scenario-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin: 18px 0 16px;
      background: #E8EEF5;
      padding: 6px;
      border-radius: 14px;
    }

    .tab-btn {
      border: none;
      background: transparent;
      border-radius: 10px;
      padding: 13px 14px;
      cursor: pointer;
      text-align: left;
      transition: all 0.2s ease;
      font-family: inherit;
    }

    .tab-btn-title {
      display: block;
      font-size: 15.5px;
      font-weight: 800;
      color: var(--navy);
      margin-bottom: 2px;
    }

    .tab-btn-sub {
      display: block;
      font-size: 12.5px;
      color: var(--muted);
      font-weight: 600;
    }

    .tab-btn[aria-selected="true"] {
      background: #FFFFFF;
      box-shadow: 0 3px 10px rgba(12, 35, 64, 0.12);
    }

    .tab-btn[aria-selected="true"].tab-a {
      border-left: 4px solid var(--accent);
    }

    .tab-btn[aria-selected="true"].tab-b {
      border-left: 4px solid var(--amber);
    }

    .scenario-panel {
      display: none;
    }

    .scenario-panel.active {
      display: block;
      animation: fadeIn 0.22s ease;
    }

    .print-scenario-heading {
      display: none;
      font-size: 17px;
      font-weight: 800;
      color: var(--navy);
      margin: 18px 0 10px;
      padding-bottom: 6px;
      border-bottom: 2px solid var(--accent);
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Lineup List */
    .lineup-item {
      display: grid;
      grid-template-columns: 30px 44px 1fr auto;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
    }

    .lineup-item:last-child {
      border-bottom: none;
    }

    .lineup-order {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--navy);
      color: #FFFFFF;
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .lineup-pos {
      font-weight: 800;
      color: var(--accent);
      font-size: 13px;
    }

    .lineup-note {
      font-size: 13px;
      color: var(--muted);
      display: block;
    }

    /* Budget Bar */
    .budget-box {
      background: #F8FAFC;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 15px;
      margin-top: 14px;
    }

    .budget-track {
      height: 20px;
      border-radius: 999px;
      background: #E2E8F0;
      overflow: hidden;
      display: flex;
      margin: 10px 0 8px;
    }

    .b-seg-base { background: var(--navy); }
    .b-seg-infield { background: var(--accent-bright); }
    .b-seg-bullpen { background: var(--amber); }
    .b-seg-flex { background: #94A3B8; }

    .budget-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 12.5px;
      color: var(--muted);
    }

    .dot {
      display: inline-block;
      width: 10px;
      height: 10px;
      border-radius: 3px;
      margin-right: 5px;
      vertical-align: middle;
    }

    /* Plan B Cards */
    .planb-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 10px;
    }

    .planb-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 13px;
      background: #FFFFFF;
    }

    .planb-card h5 {
      margin: 0 0 6px;
      font-size: 14.5px;
      color: var(--navy);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }

    .planb-card p {
      font-size: 13.5px;
      color: var(--muted);
      margin: 0;
    }

    /* X-Factors */
    .xfactor-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .xfactor-item {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      background: #F8FAFC;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 14px;
    }

    .xfactor-num {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 8px;
      background: var(--accent);
      color: #FFFFFF;
      font-weight: 800;
      font-size: 13.5px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 2px;
    }

    /* AL East Cards */
    .division-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .div-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
      background: #F9FBFD;
    }

    .div-card-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
      font-weight: 800;
      color: var(--navy);
    }

    .footer {
      text-align: center;
      font-size: 13px;
      color: var(--muted);
      padding: 20px 16px 36px;
      border-top: 1px solid var(--border);
      background: #FFFFFF;
    }

    code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 0.9em;
      background: #EEF2F7;
      padding: 1px 5px;
      border-radius: 5px;
      color: var(--navy);
    }

    /* Mobile Responsive */
    @media (max-width: 820px) {
      .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .summary-grid,
      .chart-grid-2,
      .trade-grid,
      .two-col,
      .three-col,
      .planb-grid,
      .division-grid {
        grid-template-columns: 1fr;
      }
      .scenario-tabs {
        grid-template-columns: 1fr;
      }
      .table-hint {
        display: block;
      }
    }

    @media (max-width: 520px) {
      .hero {
        padding: 28px 14px 24px;
      }
      .card {
        padding: 16px;
      }
      .lineup-item {
        grid-template-columns: 26px 36px 1fr;
      }
      .lineup-item .badge {
        grid-column: 3;
        justify-self: start;
      }
      .bar-row {
        grid-template-columns: 82px 1fr 42px;
        gap: 8px;
      }
    }

    /* Print / PDF Optimization */
    @media print {
      @page {
        size: A4;
        margin: 14mm 12mm;
      }

      body {
        background: #FFFFFF;
        font-size: 11pt;
        line-height: 1.5;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
      }

      .sticky-nav,
      .btn-print,
      .scenario-tabs,
      .table-hint {
        display: none !important;
      }

      .hero {
        padding: 18px 18px;
        border-radius: 10px;
        margin-bottom: 14px;
      }

      .container {
        max-width: 100%;
        padding: 0;
      }

      main {
        padding: 8px 0 20px;
      }

      .card,
      .summary-card,
      .trade-side,
      .chart-box,
      .callout,
      .xfactor-item,
      .div-card,
      .planb-card,
      .budget-box {
        box-shadow: none !important;
        break-inside: avoid;
      }

      .table-wrap {
        overflow: visible !important;
      }

      table {
        font-size: 9.5pt;
      }

      thead th,
      tbody td {
        padding: 6px 7px;
      }

      tr {
        break-inside: avoid;
      }

      .scenario-panel {
        display: block !important;
        margin-bottom: 18px;
      }

      .print-scenario-heading {
        display: block !important;
      }

      .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }
