:root {
      color-scheme: dark;
      --bg: #050608;
      --surface: #0b1016;
      --surface-2: #101720;
      --surface-3: #131d28;
      --field: #070b10;
      --ink: #f6f9fc;
      --soft: #c9d5df;
      --muted: #8996a6;
      --line: rgba(151, 171, 195, 0.14);
      --line-strong: rgba(151, 171, 195, 0.22);
      --blue: #36a9ff;
      --green: #62ee71;
      --teal: #44dec4;
      --red: #ff6378;
      --amber: #f3b45f;
      --shadow: 0 20px 56px rgba(0, 0, 0, 0.26);
      --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.016));
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      min-height: 100%;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        linear-gradient(180deg, rgba(54, 169, 255, 0.06) 0%, transparent 22%),
        linear-gradient(135deg, rgba(98, 238, 113, 0.055), transparent 34%),
        linear-gradient(180deg, #080c11 0%, var(--bg) 56%, #030405 100%);
      color: var(--ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.45;
    }

    body,
    .app {
      opacity: 1;
      visibility: visible;
    }

    body.auth-pending .grid,
    body.auth-pending .settings-panel,
    body.auth-pending .mobile-nav,
    body.auth-locked .grid,
    body.auth-locked .settings-panel,
    body.auth-locked .mobile-nav {
      display: none;
    }

    [hidden] {
      display: none !important;
    }

    body.focus-mode .topbar,
    body.focus-mode .settings-panel,
    body.focus-mode .mobile-nav,
    body.focus-mode .footer {
      display: none;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button,
    .file-button {
      min-height: 40px;
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 0 14px;
      color: var(--ink);
      background: var(--surface-2);
      cursor: pointer;
    }

    button:hover,
    .file-button:hover {
      border-color: rgba(196, 208, 220, 0.35);
    }

    button:disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }

    input,
    select,
    textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      background: var(--field);
    }

    input,
    select {
      height: 40px;
      padding: 0 11px;
    }

    textarea {
      min-height: 82px;
      padding: 10px;
      resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus,
    button:focus-visible,
    .file-button:focus-visible {
      outline: 2px solid rgba(54, 169, 255, 0.72);
      outline-offset: 2px;
    }

    h1,
    h2,
    h3,
    p {
      margin: 0;
    }

    h1 {
      font-size: clamp(1.35rem, 2.8vw, 2.25rem);
      line-height: 1.02;
      letter-spacing: 0;
    }

    h2 {
      font-size: 1rem;
    }

    h3 {
      font-size: 0.95rem;
    }

    .app {
      width: min(1240px, calc(100% - 32px));
      margin: 16px auto 84px;
      display: block;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 8px 0 18px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 13px;
      min-width: 0;
    }

    .logo {
      width: 54px;
      height: 54px;
      border: 1px solid rgba(98, 238, 113, 0.32);
      border-radius: 8px;
      object-fit: cover;
      background: #000;
      box-shadow: 0 0 28px rgba(54, 169, 255, 0.18);
    }

    .brand-copy {
      min-width: 0;
    }

    .eyebrow {
      display: block;
      color: var(--green);
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .subtle,
    .label,
    .muted,
    .empty,
    .status {
      color: var(--muted);
    }

    .subtle,
    .status {
      font-size: 0.86rem;
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .autosave-badge {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(98, 238, 113, 0.24);
      border-radius: 999px;
      padding: 0 12px;
      color: #dbffe3;
      background: rgba(98, 238, 113, 0.08);
      font-size: 0.8rem;
      font-weight: 760;
      white-space: nowrap;
    }

    .auth-user-badge {
      border-color: rgba(54, 169, 255, 0.28);
      color: #d7ebff;
      background: rgba(54, 169, 255, 0.08);
    }

    .auth-gate {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
      gap: 18px;
      align-items: center;
      margin: 18px 0 26px;
      padding: 24px;
      border: 1px solid rgba(54, 169, 255, 0.2);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(54, 169, 255, 0.09), rgba(255, 255, 255, 0.025));
      box-shadow: var(--shadow);
    }

    .auth-copy h2 {
      margin-top: 6px;
      font-size: clamp(1.4rem, 2.6vw, 2rem);
    }

    .auth-copy p {
      max-width: 56ch;
      margin-top: 10px;
    }

    .auth-form {
      display: grid;
      gap: 14px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(5, 8, 12, 0.78);
    }

    .google-auth-button {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      align-items: center;
      min-height: 58px;
      padding: 12px 14px;
      border-color: rgba(98, 238, 113, 0.28);
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(225, 248, 241, 0.94));
      color: #08111a;
      text-align: left;
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    }

    .google-auth-button:hover {
      border-color: rgba(98, 238, 113, 0.5);
      background: #ffffff;
      transform: translateY(-1px);
    }

    .google-mark {
      display: inline-grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #ffffff;
      border: 1px solid rgba(17, 24, 39, 0.16);
      color: #ffffff;
      color: #1f2937;
      font-size: 1rem;
      font-weight: 900;
      box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
    }

    .google-auth-button strong,
    .google-auth-button em {
      display: block;
      font-style: normal;
      letter-spacing: 0;
    }

    .google-auth-button strong {
      font-size: 1rem;
      font-weight: 860;
    }

    .google-auth-button em {
      margin-top: 2px;
      color: #375066;
      font-size: 0.82rem;
      font-weight: 720;
    }

    .auth-trust-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .auth-trust-row span {
      flex: 1 1 120px;
      padding: 8px 10px;
      border: 1px solid rgba(54, 169, 255, 0.18);
      border-radius: 8px;
      background: rgba(54, 169, 255, 0.06);
      color: #d9e8f7;
      font-size: 0.78rem;
      font-weight: 760;
      text-align: center;
    }

    .auth-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .auth-actions button {
      flex: 1 1 140px;
    }

    .primary {
      border-color: rgba(98, 238, 113, 0.34);
      background: linear-gradient(135deg, var(--green), var(--teal));
      color: #05110f;
      font-weight: 820;
      box-shadow: 0 8px 20px rgba(98, 238, 113, 0.09);
    }

    .accent {
      border-color: rgba(54, 169, 255, 0.22);
      background: rgba(54, 169, 255, 0.16);
      color: #d7ebff;
    }

    .ghost {
      border-color: var(--line);
      background: rgba(255, 255, 255, 0.035);
      color: var(--soft);
    }

    .compact-action {
      padding: 10px 12px;
      font-size: 0.82rem;
    }

    input[type="file"] {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .file-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
    }

    .upload-field {
      width: 100%;
      justify-content: flex-start;
      color: var(--soft);
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .upload-field strong,
    .upload-field span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
    }

    .panel,
    .metric,
    .review-card,
    .share-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--card-bg), rgba(11, 16, 22, 0.94);
      box-shadow: var(--shadow);
    }

    .review-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 176px;
      gap: 20px;
      min-height: 204px;
      padding: 22px;
      background:
        linear-gradient(135deg, rgba(98, 238, 113, 0.105), transparent 42%),
        linear-gradient(180deg, rgba(54, 169, 255, 0.075), transparent 72%),
        rgba(11, 16, 22, 0.97);
    }

    .review-copy {
      display: grid;
      align-content: center;
      gap: 12px;
      min-width: 0;
    }

    .review-copy p {
      max-width: 72ch;
      color: var(--soft);
    }

    .next-action {
      display: inline-flex;
      width: fit-content;
      align-items: center;
      min-height: 34px;
      border: 1px solid rgba(98, 238, 113, 0.28);
      border-radius: 999px;
      padding: 0 12px;
      color: #dbffe3;
      background: rgba(98, 238, 113, 0.08);
      font-size: 0.82rem;
      font-weight: 720;
    }

    .score-ring {
      display: grid;
      place-items: center;
      align-content: center;
      gap: 7px;
      min-height: 150px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(5, 9, 13, 0.68);
    }

    .score-ring strong {
      font-size: 3.15rem;
      line-height: 1;
    }

    .metrics {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 9px;
    }

    .metric {
      min-height: 92px;
      padding: 13px;
      overflow: hidden;
    }

    .label {
      display: block;
      margin-bottom: 9px;
      font-size: 0.74rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .metric-value {
      color: var(--ink);
      font-size: clamp(1.15rem, 1.6vw, 1.7rem);
      font-weight: 840;
      letter-spacing: 0;
      white-space: nowrap;
    }

    .metric-note {
      margin-top: 7px;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .positive {
      color: var(--green);
    }

    .negative {
      color: var(--red);
    }

    .neutral {
      color: var(--blue);
    }

    .main-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
      align-items: start;
    }

    .trade-entry {
      display: grid;
      grid-template-columns: 1fr repeat(4, minmax(92px, 1fr));
      gap: 10px;
      align-items: end;
      padding: 0;
    }

    .trade-core-grid {
      display: grid;
      grid-template-columns: minmax(120px, 0.9fr) minmax(110px, 0.65fr) minmax(120px, 0.8fr) minmax(180px, 1.2fr) minmax(140px, 0.9fr);
      gap: 10px;
      align-items: end;
    }

    .trade-required-grid {
      grid-template-columns: minmax(200px, 1fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr);
    }

    .trade-story-grid {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.25fr);
      gap: 10px;
      align-items: end;
    }

    .input-shortcuts {
      display: flex;
      min-height: 25px;
      align-items: center;
      gap: 5px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .input-shortcuts::-webkit-scrollbar {
      display: none;
    }

    .input-shortcuts button {
      min-height: 24px;
      flex: 0 0 auto;
      border-color: transparent;
      border-radius: 6px;
      padding: 0 7px;
      color: var(--muted);
      background: transparent;
      font-size: 0.69rem;
      font-weight: 740;
    }

    .input-shortcuts button:hover,
    .input-shortcuts button.active {
      border-color: rgba(98, 238, 113, 0.22);
      color: #dfffe5;
      background: rgba(98, 238, 113, 0.08);
    }

    .segmented-choice,
    .session-choice {
      display: grid;
      gap: 4px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 4px;
      background: var(--field);
    }

    .segmented-choice {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .session-choice {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .segmented-choice button,
    .session-choice button {
      min-height: 32px;
      border: 1px solid transparent;
      border-radius: 6px;
      padding: 0 8px;
      color: var(--muted);
      background: transparent;
      font-size: 0.75rem;
      font-weight: 760;
      white-space: nowrap;
    }

    .segmented-choice button[aria-pressed="true"],
    .session-choice button[aria-pressed="true"] {
      border-color: rgba(98, 238, 113, 0.26);
      color: #e4ffe8;
      background: rgba(98, 238, 113, 0.11);
      box-shadow: inset 0 0 0 1px rgba(98, 238, 113, 0.05);
    }

    .money-input {
      position: relative;
    }

    .money-input > span {
      position: absolute;
      left: 11px;
      top: 50%;
      z-index: 1;
      color: var(--muted);
      transform: translateY(-50%);
      pointer-events: none;
    }

    .money-input input {
      padding-left: 25px;
    }

    .trade-context-details {
      overflow: hidden;
      border: 1px solid rgba(151, 171, 195, 0.13);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.014);
    }

    .trade-context-details.has-evidence {
      border-color: rgba(98, 238, 113, 0.18);
      background: rgba(98, 238, 113, 0.018);
    }

    .trade-context-details > summary {
      display: flex;
      min-height: 42px;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 12px;
      cursor: pointer;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 760;
      list-style: none;
    }

    .trade-context-details > summary::-webkit-details-marker {
      display: none;
    }

    .trade-context-details > summary::before {
      content: "+";
      width: 18px;
      flex: 0 0 18px;
      color: var(--blue);
      font-size: 1rem;
      line-height: 1;
      text-align: center;
    }

    .trade-context-details[open] > summary::before {
      content: "−";
    }

    .trade-context-details > summary > span:first-of-type {
      margin-right: auto;
    }

    .trade-context-details > summary > span:last-of-type {
      max-width: min(62vw, 720px);
      overflow: hidden;
      color: var(--muted);
      font-weight: 620;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .trade-context-body {
      display: grid;
      gap: 10px;
      border-top: 1px solid rgba(151, 171, 195, 0.1);
      padding: 11px 12px 12px;
    }

    .trade-entry-secondary {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .trade-context-options {
      display: grid;
      grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr);
      gap: 10px;
    }

    .journal-actions button {
      min-height: 36px;
      border-radius: 999px;
      padding: 0 12px;
      font-size: 0.8rem;
      white-space: nowrap;
    }

    .risk-plan-strip {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr);
      gap: 10px;
      align-items: end;
      margin-top: 10px;
      border: 1px solid rgba(151, 171, 195, 0.14);
      border-radius: 8px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.018);
    }

    .risk-plan-copy {
      display: grid;
      gap: 4px;
      align-self: center;
    }

    .risk-plan-copy strong {
      color: var(--soft);
      font-size: 0.78rem;
      font-weight: 680;
    }

    .risk-plan-copy strong.ready {
      color: var(--green);
    }

    .manual-list {
      display: block;
      padding: 0;
    }

    .manual-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--soft);
      background: rgba(255, 255, 255, 0.04);
      font-size: 0.82rem;
    }

    .manual-trade-summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 6px 12px;
      align-items: center;
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 8px;
      padding: 8px 10px;
      background: rgba(255, 255, 255, 0.016);
    }

    .manual-trade-summary-main {
      display: flex;
      min-width: 0;
      align-items: baseline;
      gap: 8px;
    }

    .manual-trade-summary-main > strong {
      flex: 0 0 auto;
      color: var(--text);
      font-size: 0.78rem;
    }

    .manual-trade-summary-main > span {
      overflow: hidden;
      color: var(--muted);
      font-size: 0.74rem;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .manual-trade-total {
      font-size: 0.78rem;
      white-space: nowrap;
    }

    .manual-trade-details {
      min-width: max-content;
    }

    .manual-trade-details[open] {
      grid-column: 1 / -1;
      min-width: 0;
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 7px;
    }

    .manual-trade-details summary {
      width: fit-content;
      cursor: pointer;
      color: var(--blue);
      font-size: 0.7rem;
      font-weight: 780;
      list-style-position: inside;
    }

    .manual-trade-items {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 8px;
    }

    .delete-trade {
      width: 22px;
      min-width: 22px;
      height: 22px;
      min-height: 22px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      padding: 0;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.045);
      font-size: 0.9rem;
      line-height: 1;
    }

    .delete-trade:hover {
      border-color: rgba(255, 99, 120, 0.5);
      color: #ffd4db;
      background: rgba(255, 99, 120, 0.13);
    }

    .flow-step {
      display: grid;
      gap: 12px;
      padding: 15px;
    }

    .flow-step + .flow-step {
      border-top: 1px solid rgba(151, 171, 195, 0.1);
    }

    .step-heading {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
    }

    .step-heading p {
      max-width: 34ch;
      text-align: right;
    }

    .step-kicker {
      display: block;
      margin-bottom: 4px;
      color: var(--blue);
      font-size: 0.72rem;
      font-weight: 840;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .stack {
      display: grid;
      gap: 14px;
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }

    .panel-body {
      padding: 16px;
    }

    .insight-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .insight {
      min-height: 126px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.026);
    }

    .insight p {
      margin-top: 8px;
      color: var(--soft);
      font-size: 0.9rem;
    }

    .insight.featured {
      grid-column: span 2;
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.075), transparent 55%),
        rgba(255, 255, 255, 0.028);
    }

    .insight.compact {
      min-height: 112px;
    }

    .coach-stack {
      display: grid;
      gap: 9px;
    }

    .coach-premium-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0;
      align-items: stretch;
      overflow: hidden;
      border: 1px solid rgba(151, 171, 195, 0.16);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.016);
    }

    .coach-premium-grid.empty {
      grid-template-columns: 1fr;
    }

    .coach-card {
      position: relative;
      min-height: 0;
      padding: 12px 14px;
      overflow: hidden;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .coach-card h3 {
      margin-bottom: 5px;
      font-size: 0.84rem;
      letter-spacing: 0;
    }

    .coach-card p {
      max-width: 58ch;
      font-size: 0.82rem;
      line-height: 1.42;
    }

    .coach-pattern-details {
      display: grid;
      gap: 7px;
      margin-top: 12px;
      border-top: 1px solid rgba(151, 171, 195, 0.12);
      padding-top: 10px;
    }

    .coach-pattern-details[hidden] {
      display: none !important;
    }

    .coach-pattern-row {
      display: grid;
      grid-template-columns: minmax(96px, 0.38fr) minmax(0, 1fr);
      gap: 10px;
      align-items: baseline;
      color: var(--soft);
      font-size: 0.74rem;
      line-height: 1.38;
    }

    .coach-pattern-row strong {
      color: var(--ink);
      font-size: 0.7rem;
      letter-spacing: 0;
    }

    .coach-card-primary {
      grid-column: 1 / -1;
      min-height: 0;
      padding: 13px 14px;
      border-bottom: 1px solid rgba(98, 238, 113, 0.18);
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.09), rgba(98, 238, 113, 0.055) 52%, transparent);
    }

    .coach-card-primary h3 {
      font-size: 0.84rem;
    }

    .coach-card-primary p {
      max-width: 58ch;
      font-size: 0.84rem;
      color: var(--ink);
    }

    .coach-card-critical {
      border: 1px solid rgba(255, 99, 99, 0.2);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(255, 99, 99, 0.07), rgba(255, 255, 255, 0.018));
    }

    .coach-card-action {
      border-left: 1px solid rgba(151, 171, 195, 0.12);
      background:
        linear-gradient(180deg, rgba(98, 238, 113, 0.05), transparent);
    }

    .coach-kicker {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      margin-bottom: 9px;
      padding: 0 8px;
      border: 1px solid rgba(98, 238, 113, 0.22);
      border-radius: 999px;
      color: var(--green);
      background: rgba(98, 238, 113, 0.07);
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .coach-details {
      margin-top: 12px;
      border-top: 1px solid rgba(151, 171, 195, 0.14);
      padding-top: 10px;
    }

    .coach-facts {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0;
      margin-top: 10px;
      overflow: hidden;
      border: 1px solid rgba(151, 171, 195, 0.13);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.012);
    }

    .coach-facts > span {
      min-width: 0;
      display: grid;
      gap: 3px;
      padding: 8px 10px;
      border-left: 1px solid rgba(151, 171, 195, 0.1);
    }

    .coach-facts > span:first-child {
      border-left: 0;
    }

    .coach-facts small {
      color: var(--muted);
      font-size: 0.62rem;
      font-weight: 780;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .coach-facts strong {
      overflow: hidden;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 760;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .coach-details summary,
    .setup-evidence-details summary {
      width: fit-content;
      cursor: pointer;
      color: var(--blue);
      font-size: 0.72rem;
      font-weight: 780;
      list-style-position: inside;
    }

    .coach-details[open],
    .setup-evidence-details[open] {
      display: grid;
      gap: 10px;
    }

    .coach-setup-evidence-slot:empty {
      display: none;
    }

    .coach-setup-evidence-slot .setup-evidence-card {
      box-shadow: none;
    }

    .coach-support-sections {
      display: grid;
      margin-top: 10px;
      border-top: 1px solid rgba(151, 171, 195, 0.13);
    }

    .coach-support-section {
      border-bottom: 1px solid rgba(151, 171, 195, 0.12);
    }

    .coach-support-section[hidden] {
      display: none !important;
    }

    .coach-support-head {
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      cursor: pointer;
      list-style: none;
      color: var(--text);
      font-size: 0.78rem;
    }

    .coach-support-head::-webkit-details-marker {
      display: none;
    }

    .coach-support-head::after {
      content: "+";
      color: var(--blue);
      font-size: 0.95rem;
      font-weight: 760;
    }

    .coach-support-section[open] .coach-support-head::after {
      content: "−";
    }

    .coach-support-head .subtle {
      margin-left: auto;
      font-size: 0.72rem;
    }

    .coach-support-body {
      padding: 0 0 12px;
    }

    .coach-support-body .chart-wrap {
      height: 220px;
    }

    .coach-support-body .share-card {
      border: 0;
      padding: 10px 0 0;
      background: transparent;
      box-shadow: none;
    }

    .coach-detail-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .coach-detail-grid .coach-card {
      min-height: 110px;
      padding: 13px;
      border: 1px solid rgba(151, 171, 195, 0.14);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.018);
      box-shadow: none;
    }

    .ai-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }

    .ai-chip {
      border: 1px solid rgba(54, 169, 255, 0.22);
      border-radius: 999px;
      padding: 4px 8px;
      color: #d7ebff;
      background: rgba(54, 169, 255, 0.08);
      font-size: 0.72rem;
      font-weight: 720;
    }

    .chart-wrap {
      height: 250px;
    }

    canvas {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 8px;
      background: #070c12;
    }

    .journal-form {
      display: grid;
      gap: 8px;
    }

    .field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .field {
      display: grid;
      gap: 6px;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    .toggle {
      min-height: 42px;
      display: flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 10px;
      color: var(--soft);
      background: var(--field);
      font-size: 0.9rem;
    }

    .toggle input {
      width: 16px;
      height: 16px;
    }

    .journal-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .journal-group {
      display: grid;
      gap: 7px;
    }

    .journal-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      border-top: 1px solid rgba(151, 171, 195, 0.12);
      padding-top: 8px;
    }

    .journal-actions button {
      min-height: 38px;
      min-width: 230px;
      padding: 0 14px;
    }

    .coach-submit-copy {
      display: grid;
      gap: 4px;
      min-width: min(100%, 320px);
    }

    .coach-submit-copy strong {
      color: var(--soft);
      font-size: 0.8rem;
      font-weight: 700;
    }

    .coach-submit-copy strong.ready {
      color: var(--green);
    }

    .screenshot-field .upload-field {
      min-height: 62px;
      display: grid;
      align-content: center;
      gap: 2px;
      border-color: rgba(54, 169, 255, 0.28);
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.12), transparent 62%),
        rgba(255, 255, 255, 0.035);
    }

    .upload-hint {
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 640;
    }

    .screenshot-heading {
      align-items: center;
    }

    .review-path {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 720;
    }

    .review-path span {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
    }

    .review-path strong {
      color: var(--green);
      font-size: 0.68rem;
      font-weight: 820;
    }

    .review-path i {
      width: 18px;
      height: 1px;
      background: rgba(151, 171, 195, 0.26);
    }

    .upload-action-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 9px;
      align-items: stretch;
    }

    .manual-entry-button {
      min-width: 174px;
      color: var(--soft);
    }

    .screenshot-ai {
      display: grid;
      grid-template-columns: 170px minmax(0, 1fr);
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.024);
    }

    .screenshot-preview {
      position: relative;
      min-height: 108px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 8px;
      color: var(--muted);
      background: #05080d;
      font-size: 0.76rem;
      text-align: center;
    }

    .screenshot-preview img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    #screenshotDetectionOverlay {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .overlay-toggle {
      min-height: 30px;
      padding: 5px 9px;
      font-size: 0.7rem;
    }

    .screenshot-review {
      display: grid;
      align-content: center;
      gap: 8px;
      min-width: 0;
    }

    .screenshot-review p {
      color: var(--soft);
      font-size: 0.84rem;
    }

    .vision-points {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .vision-chip {
      border: 1px solid rgba(98, 238, 113, 0.22);
      border-radius: 999px;
      padding: 3px 7px;
      color: #dfffe4;
      background: rgba(98, 238, 113, 0.08);
      font-size: 0.68rem;
      font-weight: 760;
    }

    .vision-status-row,
    .ai-fill-head,
    .suggestion-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .vision-mode {
      width: fit-content;
      border: 1px solid rgba(54, 169, 255, 0.22);
      border-radius: 999px;
      padding: 4px 8px;
      color: #d7ebff;
      background: rgba(54, 169, 255, 0.08);
      font-size: 0.68rem;
      font-weight: 780;
    }

	    .ocr-text-panel {
	      display: grid;
	      gap: 0;
	      border: 1px solid rgba(98, 238, 113, 0.18);
	      border-radius: 8px;
	      padding: 10px 12px;
	      background:
	        linear-gradient(135deg, rgba(98, 238, 113, 0.08), transparent 58%),
	        rgba(255, 255, 255, 0.022);
	    }

	    .ocr-text-panel[open] {
	      gap: 8px;
	    }

    .ocr-text-panel[hidden] {
      display: none !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }

	    .ocr-text-head {
	      display: flex;
	      align-items: center;
	      justify-content: space-between;
	      gap: 8px;
	      flex-wrap: wrap;
	      cursor: pointer;
	      list-style: none;
	      user-select: none;
	    }

	    .ocr-text-head::-webkit-details-marker {
	      display: none;
	    }

	    .ocr-text-head::after {
	      content: "Show";
	      border: 1px solid rgba(137, 160, 187, 0.16);
	      border-radius: 999px;
	      padding: 4px 8px;
	      color: var(--soft);
	      background: rgba(255, 255, 255, 0.04);
	      font-size: 0.68rem;
	      font-weight: 760;
	    }

	    .ocr-text-panel[open] .ocr-text-head::after {
	      content: "Hide";
	    }

    .ocr-text-panel pre {
      max-height: 124px;
      overflow: auto;
      margin: 0;
      border: 1px solid rgba(137, 160, 187, 0.14);
      border-radius: 8px;
      padding: 9px 10px;
      color: var(--soft);
      background: rgba(0, 0, 0, 0.22);
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 0.72rem;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .pnl-proof-panel {
      display: grid;
      gap: 0;
      border: 1px solid rgba(98, 238, 113, 0.18);
      border-radius: 8px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, 0.022);
    }

    .pnl-proof-panel[open] {
      gap: 10px;
    }

    .pnl-proof-panel[hidden] {
      display: none !important;
    }

    .pnl-proof-head,
    .setup-story-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .pnl-proof-head {
      cursor: pointer;
      list-style: none;
      user-select: none;
    }

    .pnl-proof-head::-webkit-details-marker {
      display: none;
    }

    .pnl-proof-head::after {
      content: "Show";
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 999px;
      padding: 4px 8px;
      color: var(--soft);
      background: rgba(255, 255, 255, 0.04);
      font-size: 0.68rem;
      font-weight: 760;
    }

    .pnl-proof-panel[open] .pnl-proof-head::after {
      content: "Hide";
    }

    .pnl-proof-body {
      display: grid;
      grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
      gap: 10px;
      align-items: stretch;
    }

    .pnl-proof-crop {
      min-height: 74px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 8px;
      color: var(--muted);
      background: #05080d;
      font-size: 0.7rem;
      text-align: center;
    }

    .pnl-proof-crop img {
      width: 100%;
      height: 100%;
      max-height: 112px;
      object-fit: contain;
      display: block;
    }

    .pnl-proof-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }

    .pnl-proof-item {
      min-width: 0;
      border-left: 2px solid rgba(54, 169, 255, 0.38);
      padding: 5px 7px;
      background: rgba(255, 255, 255, 0.018);
    }

    .pnl-proof-item span,
    .pnl-proof-item strong {
      display: block;
      overflow-wrap: anywhere;
    }

    .pnl-proof-item span {
      color: var(--muted);
      font-size: 0.64rem;
      font-weight: 740;
    }

    .pnl-proof-item strong {
      margin-top: 2px;
      color: var(--text);
      font-size: 0.76rem;
      font-weight: 760;
    }

    .pnl-proof-message {
      color: var(--soft);
      font-size: 0.76rem;
    }

    .setup-evidence-card {
      display: grid;
      gap: 7px;
      border: 1px solid rgba(54, 169, 255, 0.2);
      border-radius: 8px;
      padding: 10px 12px;
      background: rgba(54, 169, 255, 0.025);
    }

    .setup-evidence-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .setup-evidence-head > div {
      display: grid;
      gap: 2px;
    }

    .setup-evidence-head strong {
      color: var(--text);
      font-size: 0.92rem;
      letter-spacing: 0;
    }

    .setup-confidence {
      flex: 0 0 auto;
    }

    .setup-confidence.high {
      border-color: rgba(98, 238, 113, 0.3);
      color: var(--green);
      background: rgba(98, 238, 113, 0.08);
    }

    .setup-confidence.medium {
      border-color: rgba(54, 169, 255, 0.3);
      color: var(--blue);
      background: rgba(54, 169, 255, 0.08);
    }

    .setup-confidence.needs-confirmation,
    .setup-confidence.low {
      border-color: rgba(255, 204, 102, 0.28);
      color: var(--amber);
      background: rgba(255, 204, 102, 0.08);
    }

    .setup-evidence-card > p {
      margin: 0;
      color: var(--soft);
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .setup-evidence-deep-summary {
      margin: 0;
      color: var(--soft);
      font-size: 0.78rem;
      line-height: 1.42;
    }

    .setup-evidence-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .setup-evidence-content {
      display: flex;
      flex-wrap: wrap;
      gap: 7px 10px;
      align-items: center;
    }

    .setup-evidence-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid rgba(98, 238, 113, 0.2);
      border-radius: 999px;
      min-height: 24px;
      padding: 3px 8px;
      color: var(--green);
      background: rgba(98, 238, 113, 0.05);
      font-size: 0.68rem;
      font-weight: 740;
      line-height: 1;
      white-space: nowrap;
    }

    .setup-evidence-chip strong {
      color: inherit;
      font-size: inherit;
      font-weight: 800;
    }

    .setup-evidence-chip.muted {
      color: var(--muted);
      border-color: rgba(137, 160, 187, 0.18);
      background: rgba(137, 160, 187, 0.05);
    }

    .setup-evidence-missing {
      margin: 0 !important;
      color: var(--amber) !important;
      font-size: 0.73rem !important;
      line-height: 1.35 !important;
    }

    .setup-evidence-question {
      color: var(--text) !important;
      font-size: 0.76rem !important;
      font-weight: 720;
      margin: 2px 0 0 !important;
      line-height: 1.35 !important;
    }

    .setup-evidence-guidance {
      flex: 1 1 300px;
      min-width: 0;
      border-left: 1px solid rgba(255, 204, 102, 0.34);
      padding-left: 9px;
    }

    .setup-evidence-details {
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 6px;
      margin-top: 0;
    }

    .setup-evidence-detail-stack {
      display: grid;
      gap: 9px;
    }

    .setup-evidence-detail-stack > .field {
      margin: 0;
    }

    .setup-story-card {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(54, 169, 255, 0.18);
      border-radius: 8px;
      padding: 11px 12px;
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.07), transparent 62%),
        rgba(255, 255, 255, 0.018);
    }

    .setup-story-card[hidden] {
      display: none !important;
    }

    .setup-story-card > strong {
      color: var(--text);
      font-size: 0.9rem;
    }

    .setup-story-card > p {
      color: var(--soft);
      font-size: 0.78rem;
    }

    .setup-story-evidence {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .setup-evidence-chip {
      border: 1px solid rgba(98, 238, 113, 0.18);
      border-radius: 999px;
      padding: 3px 7px;
      color: #dcffe2;
      background: rgba(98, 238, 113, 0.06);
      font-size: 0.66rem;
      font-weight: 700;
    }

    .setup-story-missing {
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 7px;
    }

    .strategy-preset-card {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(54, 169, 255, 0.18);
      border-radius: 8px;
      padding: 11px 12px;
      background: rgba(54, 169, 255, 0.035);
    }

    .strategy-preset-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .strategy-preset-head > div {
      display: grid;
      gap: 2px;
    }

    .strategy-preset-head strong {
      color: var(--text);
      font-size: 0.88rem;
    }

    .strategy-preset-card > p {
      color: var(--soft);
      font-size: 0.76rem;
    }

    .strategy-rule-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .strategy-rule-chip {
      border: 1px solid rgba(137, 160, 187, 0.18);
      border-radius: 999px;
      padding: 3px 7px;
      color: var(--soft);
      background: rgba(255, 255, 255, 0.025);
      font-size: 0.66rem;
      font-weight: 720;
    }

    .strategy-rule-chip.supported {
      border-color: rgba(98, 238, 113, 0.22);
      color: var(--green);
      background: rgba(98, 238, 113, 0.055);
    }

    .strategy-rule-chip.missing {
      border-color: rgba(255, 204, 102, 0.2);
      color: var(--amber);
    }

    .liquidity-fvg-layer {
      display: grid;
      gap: 7px;
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 9px;
    }

    .liquidity-fvg-layer[hidden] {
      display: none !important;
    }

    .liquidity-fvg-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .liquidity-fvg-head > div {
      display: grid;
      gap: 2px;
    }

    .liquidity-fvg-head strong {
      color: var(--text);
      font-size: 0.8rem;
    }

    .liquidity-fvg-layer > p {
      color: var(--soft);
      font-size: 0.72rem;
    }

    .liquidity-fvg-steps {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .liquidity-step-chip {
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 999px;
      padding: 3px 7px;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.02);
      font-size: 0.64rem;
      font-weight: 720;
    }

    .liquidity-step-chip.found {
      border-color: rgba(98, 238, 113, 0.22);
      color: var(--green);
      background: rgba(98, 238, 113, 0.05);
    }

    .liquidity-step-chip.ask {
      border-color: rgba(255, 204, 102, 0.22);
      color: var(--amber);
      background: rgba(255, 204, 102, 0.045);
    }

    .liquidity-fvg-question {
      border-left: 2px solid rgba(255, 204, 102, 0.48);
      padding-left: 8px;
      color: var(--text) !important;
      font-weight: 680;
    }

    .strategy-preset-details {
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 7px;
    }

    .strategy-preset-details summary {
      width: fit-content;
      cursor: pointer;
      color: var(--blue);
      font-size: 0.7rem;
      font-weight: 760;
    }

    .strategy-preset-details[open] {
      display: grid;
      gap: 7px;
    }

    .strategy-preset-rule {
      display: grid;
      grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
      gap: 8px;
      padding-top: 7px;
    }

    .strategy-preset-rule span {
      color: var(--muted);
      font-size: 0.66rem;
      font-weight: 760;
    }

    .strategy-preset-rule p {
      color: var(--soft);
      font-size: 0.7rem;
      line-height: 1.4;
    }

    .confluence-evidence-card {
      display: grid;
      gap: 9px;
      border: 1px solid rgba(98, 238, 113, 0.16);
      border-radius: 8px;
      padding: 11px 12px;
      background: rgba(255, 255, 255, 0.018);
    }

    .confluence-evidence-card[hidden] {
      display: none !important;
    }

    .confluence-evidence-head,
    .confluence-evidence-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .confluence-evidence-head > div {
      display: grid;
      gap: 2px;
    }

    .confluence-evidence-head strong {
      color: var(--text);
      font-size: 0.88rem;
    }

    .confluence-evidence-card > p {
      color: var(--soft);
      font-size: 0.76rem;
    }

    .confluence-evidence-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }

    .confluence-empty-evidence {
      grid-column: 1 / -1;
      border: 1px solid rgba(255, 204, 102, 0.18);
      border-left: 2px solid rgba(255, 204, 102, 0.52);
      border-radius: 7px;
      padding: 9px 10px;
      color: var(--amber);
      background: rgba(255, 204, 102, 0.045);
      font-size: 0.74rem;
      font-weight: 720;
      line-height: 1.35;
    }

    .confluence-evidence-item {
      min-width: 0;
      border-left: 2px solid rgba(54, 169, 255, 0.4);
      padding: 7px 8px;
      background: rgba(0, 0, 0, 0.15);
    }

    .confluence-evidence-title strong {
      min-width: 0;
      color: var(--text);
      font-size: 0.78rem;
    }

    .confluence-confidence {
      flex: 0 0 auto;
      border: 1px solid rgba(137, 160, 187, 0.18);
      border-radius: 999px;
      padding: 2px 6px;
      color: var(--soft);
      font-size: 0.62rem;
      font-weight: 780;
    }

    .confluence-confidence.high {
      border-color: rgba(98, 238, 113, 0.24);
      color: var(--green);
    }

    .confluence-confidence.medium {
      border-color: rgba(54, 169, 255, 0.24);
      color: var(--blue);
    }

    .confluence-confidence.strong,
    .confluence-quality-badge.strong {
      border-color: rgba(98, 238, 113, 0.28);
      color: var(--green);
    }

    .confluence-confidence.decent,
    .confluence-quality-badge.decent {
      border-color: rgba(54, 169, 255, 0.28);
      color: var(--blue);
    }

    .confluence-confidence.weak,
    .confluence-quality-badge.weak {
      border-color: rgba(255, 204, 102, 0.26);
      color: var(--amber);
    }

    .confluence-confidence.context,
    .confluence-quality-badge.context {
      border-color: rgba(137, 160, 187, 0.22);
      color: var(--soft);
    }

    .confluence-confidence.unclear,
    .confluence-quality-badge.unclear {
      border-color: rgba(137, 160, 187, 0.22);
      color: var(--soft);
    }

    .confluence-confidence.unsupported,
    .confluence-quality-badge.unsupported {
      border-color: rgba(255, 105, 120, 0.3);
      color: #ff8c9a;
    }

    .confluence-quality-badge {
      text-transform: none;
    }

    .confluence-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      margin-top: 4px;
    }

    .confluence-source {
      color: var(--muted);
      font-size: 0.64rem;
      font-weight: 720;
    }

    .confluence-entry-status {
      flex: 0 0 auto;
      border: 1px solid rgba(137, 160, 187, 0.18);
      border-radius: 999px;
      padding: 2px 6px;
      color: var(--soft);
      font-size: 0.6rem;
      font-weight: 780;
    }

    .confluence-entry-status.connected {
      border-color: rgba(98, 238, 113, 0.24);
      color: var(--green);
    }

    .confluence-entry-status.context {
      border-color: rgba(54, 169, 255, 0.22);
      color: var(--blue);
    }

    .confluence-entry-status.needs-link {
      border-color: rgba(255, 204, 102, 0.24);
      color: var(--amber);
    }

    .confluence-entry-status.unsupported {
      border-color: rgba(255, 105, 120, 0.3);
      color: #ff8c9a;
    }

    .confluence-evidence-item p {
      margin-top: 4px;
      color: var(--soft);
      font-size: 0.7rem;
      line-height: 1.35;
    }

    .confluence-extra-details {
      grid-column: 1 / -1;
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 6px;
    }

    .confluence-extra-details summary {
      cursor: pointer;
      color: var(--blue);
      font-size: 0.72rem;
      font-weight: 780;
    }

    .confluence-extra-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
      margin-top: 7px;
    }

    .ai-fill-panel {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(54, 169, 255, 0.2);
      border-radius: 8px;
      padding: 11px 12px;
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.1), transparent 56%),
        rgba(255, 255, 255, 0.026);
    }

    .ai-fill-panel[hidden] {
      display: none !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }

    .ai-fill-panel p {
      color: var(--soft);
      font-size: 0.76rem;
    }

    .screenshot-key-facts {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .screenshot-key-fact {
      display: inline-grid;
      grid-template-columns: auto auto;
      align-items: baseline;
      gap: 5px;
      min-width: 0;
      border: 1px solid rgba(54, 169, 255, 0.2);
      border-radius: 999px;
      padding: 5px 9px;
      background: rgba(54, 169, 255, 0.05);
    }

    .screenshot-key-fact span {
      color: var(--muted);
      font-size: 0.63rem;
      font-weight: 780;
      text-transform: uppercase;
    }

    .screenshot-key-fact strong {
      min-width: 0;
      overflow: hidden;
      color: var(--ink);
      font-size: 0.76rem;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .screenshot-key-fact.high {
      border-color: rgba(98, 238, 113, 0.23);
    }

    .screenshot-key-fact.low strong,
    .screenshot-key-fact.needs-confirmation strong {
      color: var(--amber);
    }

    .screenshot-draft-details {
      border-top: 1px solid rgba(137, 160, 187, 0.12);
      padding-top: 7px;
    }

    .screenshot-draft-details[hidden] {
      display: none !important;
    }

    .screenshot-draft-details summary {
      width: fit-content;
      cursor: pointer;
      color: var(--blue);
      font-size: 0.7rem;
      font-weight: 780;
      list-style-position: inside;
    }

    .screenshot-draft-details .suggestion-grid {
      margin-top: 8px;
    }

    .suggestion-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
    }

    .suggestion-item {
      min-width: 0;
      border: 1px solid rgba(137, 160, 187, 0.16);
      border-radius: 8px;
      padding: 7px;
      background: rgba(0, 0, 0, 0.18);
    }

    .suggestion-item.core {
      border-color: rgba(54, 169, 255, 0.24);
      background: rgba(54, 169, 255, 0.055);
    }

    .suggestion-item.supporting {
      background: rgba(0, 0, 0, 0.12);
    }

    .suggestion-item span {
      display: block;
      color: var(--muted);
      font-size: 0.66rem;
      font-weight: 780;
      text-transform: uppercase;
    }

    .suggestion-item strong {
      display: block;
      overflow: hidden;
      color: var(--ink);
      font-size: 0.82rem;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .suggestion-item small {
      display: inline-flex;
      width: fit-content;
      margin-top: 6px;
      border: 1px solid rgba(137, 160, 187, 0.18);
      border-radius: 999px;
      padding: 2px 7px;
      color: var(--muted);
      font-size: 0.66rem;
      font-weight: 760;
    }

    .suggestion-item.low strong,
    .suggestion-item.needs-confirmation strong {
      color: var(--amber);
    }

    .suggestion-item.high small {
      color: var(--green);
      border-color: rgba(98, 238, 113, 0.24);
    }

    .suggestion-item.medium small {
      color: var(--blue);
      border-color: rgba(54, 169, 255, 0.24);
    }

    .suggestion-item.low small,
    .suggestion-item.needs-confirmation small {
      color: var(--amber);
      border-color: rgba(255, 204, 102, 0.24);
    }

	    .suggestion-item.not-visible strong,
	    .suggestion-item.not-visible small {
	      color: var(--muted);
	    }

	    .not-visible-fields {
	      border: 1px solid rgba(137, 160, 187, 0.14);
	      border-radius: 8px;
	      padding: 8px 10px;
	      color: var(--muted);
	      background: rgba(0, 0, 0, 0.14);
	      font-size: 0.74rem;
	      line-height: 1.35;
	    }

	    .not-visible-fields[hidden] {
	      display: none !important;
	    }

	    .mini-action {
      min-height: 32px;
      padding: 0 10px;
      font-size: 0.76rem;
      font-weight: 760;
    }

    .pill-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .choice-pill {
      min-height: 30px;
      border: 1px solid rgba(137, 160, 187, 0.22);
      border-radius: 999px;
      padding: 0 10px;
      color: var(--soft);
      background: rgba(255, 255, 255, 0.035);
      font-size: 0.76rem;
      font-weight: 720;
    }

    .choice-pill.active {
      border-color: rgba(98, 238, 113, 0.35);
      color: #e4ffe8;
      background: rgba(98, 238, 113, 0.12);
    }

    .mini-toggle {
      min-height: 32px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 0 9px 0 6px;
      color: var(--soft);
      background: var(--field);
      font-size: 0.78rem;
      font-weight: 720;
    }

    .mini-toggle input {
      position: relative;
      width: 30px;
      height: 17px;
      border: 1px solid rgba(137, 160, 187, 0.3);
      border-radius: 999px;
      padding: 0;
      appearance: none;
      background: rgba(255, 99, 120, 0.16);
      cursor: pointer;
    }

    .mini-toggle input::before {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 11px;
      height: 11px;
      border-radius: 50%;
      background: var(--soft);
      transition: transform 0.18s ease, background 0.18s ease;
    }

    .mini-toggle input:checked {
      border-color: rgba(98, 238, 113, 0.4);
      background: rgba(98, 238, 113, 0.2);
    }

    .mini-toggle input:checked::before {
      transform: translateX(13px);
      background: var(--green);
    }

    .tag {
      border: 1px solid rgba(137, 160, 187, 0.25);
      border-radius: 999px;
      padding: 6px 9px;
      color: #d0dbe6;
      background: rgba(255, 255, 255, 0.04);
      font-size: 0.78rem;
    }

    .compact-note textarea {
      min-height: 52px;
      max-height: 120px;
      resize: vertical;
      transition: min-height 0.16s ease, border-color 0.16s ease;
    }

    .compact-note textarea:focus {
      min-height: 86px;
    }

    .advanced-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 14px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line);
    }

    .advanced-actions > * {
      flex: 1 1 150px;
    }

    .undo-toast {
      position: fixed;
      right: 18px;
      bottom: 82px;
      z-index: 20;
      display: flex;
      align-items: center;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      color: var(--soft);
      background: rgba(8, 13, 19, 0.96);
      box-shadow: var(--shadow);
    }

    .undo-toast[hidden],
    .modal-backdrop[hidden] {
      display: none !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }

    .undo-toast button {
      min-height: 32px;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 30;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(3, 4, 5, 0.72);
      backdrop-filter: blur(10px);
    }

    .modal {
      width: min(420px, 100%);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 16px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .modal p {
      margin-top: 8px;
      color: var(--soft);
    }

    .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 9px;
      margin-top: 16px;
      flex-wrap: wrap;
    }

    .settings-panel {
      overflow: hidden;
    }

    .settings-panel summary {
      min-height: 52px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 15px;
      color: var(--soft);
      cursor: pointer;
      font-weight: 780;
      list-style: none;
    }

    .settings-panel summary::-webkit-details-marker {
      display: none;
    }

    .settings-panel summary::after {
      content: "+";
      color: var(--blue);
      font-size: 1.2rem;
    }

    .settings-panel[open] summary {
      border-bottom: 1px solid var(--line);
    }

    .settings-panel[open] summary::after {
      content: "-";
    }

    .share-card {
      position: relative;
      overflow: hidden;
      min-height: 238px;
      padding: 18px;
      background:
        linear-gradient(135deg, rgba(54, 169, 255, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(98, 238, 113, 0.08), transparent 72%),
        #080d13;
    }

    .share-row {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
      margin: 14px 0;
    }

    .share-stat {
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
    }

    .watermark {
      position: absolute;
      right: 14px;
      bottom: 12px;
      color: rgba(246, 249, 252, 0.22);
      font-weight: 850;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .hide-watermark .watermark {
      display: none;
    }

    .empty {
      min-height: 96px;
      display: grid;
      place-items: center;
      padding: 16px;
      color: var(--muted);
      text-align: center;
    }

    .footer {
      margin-top: 16px;
      color: var(--muted);
      font-size: 0.82rem;
    }

    .deploy-test-badge {
      display: inline-flex;
      margin-left: 8px;
      padding: 2px 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--muted);
      font-size: 0.7rem;
    }

    .mobile-nav {
      position: fixed;
      left: 12px;
      right: 12px;
      bottom: 12px;
      z-index: 10;
      display: none;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(7, 11, 16, 0.92);
      backdrop-filter: blur(16px);
      box-shadow: var(--shadow);
    }

    .mobile-nav a {
      min-height: 42px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: var(--soft);
      text-decoration: none;
      font-size: 0.82rem;
    }

    .app-error {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 50;
      width: min(360px, calc(100% - 32px));
      display: grid;
      gap: 5px;
      border: 1px solid rgba(255, 99, 120, 0.3);
      border-radius: 8px;
      padding: 12px 14px;
      color: var(--ink);
      background:
        linear-gradient(135deg, rgba(255, 99, 120, 0.14), transparent 58%),
        rgba(7, 11, 16, 0.96);
      box-shadow: var(--shadow);
    }

    .app-error[hidden] {
      display: none !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }

    .app-error strong {
      font-size: 0.9rem;
    }

    .app-error span {
      color: var(--soft);
      font-size: 0.8rem;
    }

    @media (max-width: 1060px) {
      .metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .suggestion-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .main-layout {
        grid-template-columns: 1fr;
      }

      .trade-core-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .trade-story-grid {
        grid-template-columns: 1fr;
      }

      .session-choice {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

    }

    @media (max-width: 760px) {
      .app {
        width: min(100% - 20px, 1320px);
        margin-top: 10px;
      }

      .topbar {
        align-items: stretch;
        flex-direction: column;
      }

      .toolbar {
        justify-content: stretch;
      }

      .toolbar > * {
        flex: 1 1 135px;
      }

      .review-card {
        grid-template-columns: 1fr;
      }

      .auth-gate {
        grid-template-columns: 1fr;
      }

      .step-heading {
        align-items: start;
        flex-direction: column;
      }

      .step-heading p {
        max-width: none;
        text-align: left;
      }

      .trade-entry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .trade-core-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .trade-required-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .trade-required-grid .field:last-child {
        grid-column: 1 / -1;
      }

      .upload-action-row {
        grid-template-columns: 1fr;
      }

      .manual-entry-button {
        min-width: 0;
      }

      .trade-entry-secondary,
      .trade-context-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .risk-plan-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .risk-plan-copy {
        grid-column: 1 / -1;
      }

      .score-ring {
        min-height: 118px;
      }

      .metrics,
      .insight-grid,
      .field-grid,
      .share-row,
      .suggestion-grid,
      .screenshot-flow,
      .screenshot-ai {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .insight.featured,
      .coach-card-primary {
        grid-column: auto;
        grid-row: auto;
        min-height: 0;
      }

      .coach-premium-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .coach-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .coach-facts > span:nth-child(odd) {
        border-left: 0;
      }

      .coach-facts > span:nth-child(n + 3) {
        border-top: 1px solid rgba(151, 171, 195, 0.1);
      }

      .coach-card-primary {
        grid-column: 1 / -1;
      }

      .coach-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .pnl-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .mobile-nav {
        display: grid;
      }
    }

    @media (max-width: 500px) {
      .logo {
        width: 50px;
        height: 50px;
      }

      .metrics,
      .insight-grid,
      .field-grid,
      .share-row,
      .auth-gate,
      .trade-entry,
      .trade-core-grid,
      .trade-required-grid,
      .trade-story-grid,
      .trade-entry-secondary,
      .trade-context-options,
      .risk-plan-strip,
      .suggestion-grid,
      .screenshot-ai {
        grid-template-columns: 1fr;
      }

      .session-choice {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .review-path {
        width: 100%;
        justify-content: space-between;
      }

      .trade-context-details > summary {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
      }

      .trade-context-details > summary > span:last-of-type {
        width: calc(100% - 30px);
        max-width: none;
        margin-left: 30px;
        white-space: normal;
      }

      .metric-value {
        white-space: normal;
      }

      .pnl-proof-body,
      .pnl-proof-grid,
      .confluence-evidence-list,
      .confluence-extra-list {
        grid-template-columns: 1fr;
      }

      .strategy-preset-rule {
        grid-template-columns: 1fr;
        gap: 2px;
      }

      .coach-premium-grid,
      .coach-detail-grid {
        grid-template-columns: 1fr;
      }

      .coach-card-primary {
        grid-column: auto;
      }

      .setup-evidence-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .setup-evidence-content {
        align-items: stretch;
        flex-direction: column;
      }

      .setup-evidence-guidance {
        width: 100%;
        border-top: 1px solid rgba(255, 204, 102, 0.24);
        border-left: 0;
        padding-top: 7px;
        padding-left: 0;
      }

      .manual-trade-summary {
        grid-template-columns: 1fr;
      }

      .manual-trade-summary-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
      }

      .manual-trade-total {
        justify-self: start;
      }

      .manual-trade-details {
        grid-column: auto;
      }

      .manual-trade-details[open] {
        grid-column: auto;
      }

      .journal-actions button {
        width: 100%;
        min-width: 0;
      }
    }
