:root {
  color: #edf5f0;
  background: #07100e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #07100e;
  --surface: #0c1714;
  --surface-raised: #111f1b;
  --line: rgba(226, 242, 233, 0.1);
  --line-strong: rgba(226, 242, 233, 0.17);
  --text: #edf5f0;
  --muted: #879c92;
  --quiet: #5f756b;
  --accent: #63e6aa;
  --accent-soft: rgba(99, 230, 170, 0.1);
  --danger: #ff8d86;
  --warning: #dfbd72;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 10%, rgba(55, 184, 125, 0.12), transparent 32rem),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

.boot-screen { display: grid; min-height: 100vh; place-content: center; justify-items: center; color: var(--muted); }
.boot-mark, .brand-mark { display: block; border-radius: 11px; }
.boot-mark { width: 52px; height: 52px; }

.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--text); font-weight: 750; letter-spacing: -0.025em; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; }
.brand-large { font-size: 1.08rem; }
.brand-large .brand-mark { width: 46px; height: 46px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.muted { color: var(--muted); }

.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 0.75fr); }
.login-story { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: 48px clamp(36px, 7vw, 112px); border-right: 1px solid var(--line); }
.login-story h1 { margin: 28px 0 34px; font-size: clamp(4rem, 8.5vw, 8.5rem); font-weight: 760; letter-spacing: -0.075em; line-height: 0.82; }
.login-story h1 span { color: var(--accent); }
.login-story .intro { max-width: 660px; margin: 0; color: #a5b8af; font-size: clamp(1rem, 1.8vw, 1.28rem); line-height: 1.65; }
.login-footnote { margin: 0; color: var(--quiet); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.login-panel { display: grid; padding: 36px; place-items: center; background: rgba(5, 12, 10, 0.45); }
.auth-card { display: grid; width: min(100%, 440px); gap: 24px; padding: 38px; border: 1px solid var(--line-strong); border-radius: 22px; background: rgba(14, 27, 23, 0.92); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25); }
.auth-card h2 { margin: 12px 0 8px; font-size: 2rem; letter-spacing: -0.045em; }
.auth-card p { margin: 0; line-height: 1.55; }
label { display: grid; gap: 9px; }
label > span { color: #a8bbb2; font-size: 0.76rem; font-weight: 750; letter-spacing: 0.035em; }
input, select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; color: var(--text); background: #10201b; transition: border-color 150ms, box-shadow 150ms; }
input:focus, select:focus { border-color: rgba(99, 230, 170, 0.6); box-shadow: 0 0 0 3px rgba(99, 230, 170, 0.08); }
input:disabled { color: var(--quiet); cursor: not-allowed; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; transition: transform 150ms, opacity 150ms, background 150ms; }
.primary-button { min-height: 48px; padding: 0 18px; color: #06100c; background: var(--accent); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: 0.55; transform: none; }
.secondary-button { justify-self: start; padding: 11px 13px; color: var(--accent); background: var(--accent-soft); }
.login-about { justify-self: start; color: var(--accent); text-underline-offset: 0.2em; }
.security-note { color: var(--quiet); font-size: 0.72rem; }
.form-message { min-height: 1.1rem; margin: 0; color: var(--muted); font-size: 0.78rem; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--accent); }

.app-frame { display: grid; min-height: 100vh; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 30px 24px 24px; border-right: 1px solid var(--line); background: rgba(6, 14, 12, 0.78); backdrop-filter: blur(20px); }
.side-nav { display: grid; gap: 5px; margin: 56px 0 auto; }
.side-nav button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 13px 12px; border: 0; border-radius: 9px; cursor: pointer; color: var(--muted); background: transparent; text-align: left; }
.side-nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }
.side-nav button.active { color: var(--text); background: var(--accent-soft); }
.side-nav button.active::before { position: absolute; left: 0; width: 2px; height: 24px; border-radius: 2px; content: ""; background: var(--accent); }
.side-nav small { color: var(--quiet); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.62rem; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); }
.environment-badge, .phase-badge, .release-pill, .eligibility { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.text-button { border: 0; cursor: pointer; color: var(--quiet); background: transparent; font-size: 0.75rem; }
.text-button:hover { color: var(--text); }

.workspace { min-width: 0; }
.workspace-header { display: flex; min-height: 124px; align-items: center; justify-content: space-between; padding: 30px clamp(28px, 5vw, 74px); border-bottom: 1px solid var(--line); }
.workspace-header h1 { margin: 9px 0 0; font-size: clamp(2.1rem, 4vw, 3.3rem); letter-spacing: -0.055em; }
.user-chip { display: flex; gap: 11px; align-items: center; }
.user-chip > div { display: grid; gap: 3px; }
.user-chip strong { font-size: 0.8rem; }
.user-chip small { color: var(--quiet); font-size: 0.68rem; }
.user-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 0.68rem; font-weight: 850; }
.view-content { max-width: 1460px; padding: 52px clamp(28px, 5vw, 74px) 80px; outline: 0; }
.loading-state { display: grid; min-height: 360px; place-items: center; color: var(--quiet); }

.dashboard-hero { display: flex; gap: 32px; align-items: flex-start; justify-content: space-between; padding: 8px 0 54px; }
.dashboard-hero h2, .section-intro h2, .planned-view h2 { max-width: 850px; margin: 18px 0 16px; font-size: clamp(2.4rem, 5.2vw, 5.2rem); letter-spacing: -0.065em; line-height: 0.96; }
.dashboard-hero h2 span { color: var(--accent); }
.dashboard-hero p:last-child, .section-intro p, .planned-view > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.release-pill { flex: 0 0 auto; }
.release-pill strong { color: var(--accent); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.018); }
.metric-grid article { display: grid; min-height: 150px; padding: 22px; align-content: space-between; }
.metric-grid article + article { border-left: 1px solid var(--line); }
.metric-grid span, .release-facts span { color: var(--quiet); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.metric-grid strong { font-size: 2.4rem; letter-spacing: -0.055em; }
.metric-grid small { color: var(--muted); }
.metric-grid.compact strong { font-size: 1.55rem; }
.two-column-grid, .release-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.feature-card { display: grid; min-height: 300px; padding: 28px; align-content: start; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.018); }
.feature-card.accent-card { background: linear-gradient(145deg, rgba(99, 230, 170, 0.1), rgba(255, 255, 255, 0.018) 65%); }
.feature-card h3 { margin: 46px 0 14px; font-size: 1.65rem; letter-spacing: -0.04em; }
.feature-card p:not(.card-index) { max-width: 520px; margin: 0 0 28px; color: var(--muted); line-height: 1.65; }
.card-index { margin: 0; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; letter-spacing: 0.08em; }

.section-intro { display: flex; gap: 32px; align-items: flex-start; justify-content: space-between; margin-bottom: 44px; }
.section-intro h2 { margin-bottom: 0; }
.phase-badge { flex: 0 0 auto; }
.list-panel, .empty-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.018); }
.empty-panel { display: grid; min-height: 230px; padding: 34px; place-content: center; text-align: center; }
.empty-panel strong { font-size: 1.3rem; }
.empty-panel p { max-width: 480px; color: var(--muted); line-height: 1.6; }
.list-row { display: flex; min-height: 86px; gap: 22px; align-items: center; justify-content: space-between; padding: 18px 22px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > div { display: grid; gap: 7px; }
.list-row p { margin: 0; color: var(--quiet); font-size: 0.76rem; }
.list-row > span { padding: 6px 8px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.04); font-size: 0.66rem; }
.list-row > span.passed { color: var(--accent); background: var(--accent-soft); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; }
.principle-grid article { min-height: 190px; padding: 25px; }
.principle-grid article + article { border-left: 1px solid var(--line); }
.principle-grid span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.7rem; }
.principle-grid h3 { margin: 35px 0 10px; }
.principle-grid p { margin: 0; color: var(--muted); line-height: 1.55; }

.backtest-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; margin-bottom: 22px; }
.backtest-flow article { min-height: 220px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.018); }
.backtest-flow article span { display: block; margin-bottom: 40px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; }
.backtest-flow article strong { font-size: 0.92rem; }
.backtest-flow article p { margin: 12px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }
.backtest-flow i { display: grid; width: 28px; place-items: center; color: var(--quiet); font-style: normal; }
.planned-view { display: grid; min-height: 520px; place-content: center; justify-items: start; }
.planned-view h2 { margin-top: 22px; }
.planned-line { width: min(700px, 100%); height: 1px; margin: 40px 0 18px; background: var(--line); }
.planned-view small { color: var(--quiet); }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 22px; margin-bottom: 44px; }
.invitation-card { gap: 18px; }
.invitation-card h3, .access-principles h3 { margin: 18px 0 0; }
.invitation-card p:not(.card-index), .access-principles p:not(.card-index) { margin-bottom: 4px; }
.access-principles ul { display: grid; gap: 15px; margin: 16px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.5; }
.mail-status { color: var(--quiet); line-height: 1.5; }
.management-section { margin-top: 30px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }
.panel-heading strong { color: var(--accent); }
.row-actions { display: flex !important; grid-auto-flow: column; gap: 12px !important; align-items: center; }
.row-actions > span { padding: 6px 8px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.04); font-size: 0.66rem; }
.row-actions > span.passed { color: var(--accent); background: var(--accent-soft); }
.danger-text { color: var(--danger); }
.invitation-layout { display: grid; min-height: 100vh; padding: 32px 18px; place-items: center; }
.invitation-accept-card { width: min(100%, 560px); }
.invitation-accept-card h1 { margin: 14px 0 10px; font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.06em; }
.invitation-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.invitation-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.7rem; }
.accept-form { display: grid; gap: 18px; }

.settings-form { border-top: 1px solid var(--line); }
.form-section { display: grid; grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr); gap: 70px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.form-section > div:first-child > span { font-size: 1.05rem; font-weight: 800; }
.form-section > div:first-child p { max-width: 320px; color: var(--muted); line-height: 1.55; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; }
.form-actions .primary-button { min-width: 200px; }
.release-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px; }
.release-facts article { display: grid; gap: 10px; padding: 21px; }
.release-facts article + article { border-left: 1px solid var(--line); }
.release-facts strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.release-facts small { color: var(--quiet); font-size: 0.68rem; }
.eligibility.passed { border-color: rgba(99, 230, 170, 0.34); color: var(--accent); background: var(--accent-soft); }
.promotion-card { display: flex; gap: 30px; align-items: center; justify-content: space-between; padding: 28px; border: 1px solid rgba(99, 230, 170, 0.22); border-radius: 16px; background: linear-gradient(135deg, rgba(99, 230, 170, 0.09), rgba(255, 255, 255, 0.018)); }
.promotion-card h3 { margin: 14px 0 9px; font-size: 1.45rem; letter-spacing: -0.035em; }
.promotion-card p:not(.eyebrow, .form-message) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.promotion-card .form-message { margin-top: 12px; }
.promotion-card .primary-button { min-width: 245px; }
.promotion-progress { width: min(760px, 100%); margin-top: 22px; }
.promotion-progress-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.promotion-progress-track { height: 14px; overflow: hidden; border: 1px solid rgba(99, 230, 170, 0.22); border-radius: 999px; background: rgba(99, 230, 170, 0.09); }
.promotion-progress-bar { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg, #42bd88, var(--accent)); transition: width 900ms ease-out; }
.promotion-progress[data-state="active"] .promotion-progress-bar::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: translateX(-100%); animation: promotion-progress-shimmer 1.15s linear infinite; }
.promotion-progress[data-state="failed"] .promotion-progress-track { border-color: rgba(255, 141, 134, 0.32); background: rgba(255, 141, 134, 0.08); }
.promotion-progress[data-state="failed"] .promotion-progress-bar { background: linear-gradient(90deg, #bb5e59, var(--danger)); }
.promotion-progress-status { min-height: 1.4rem; margin: 9px 0 0 !important; color: var(--muted); font-size: 0.875rem; line-height: 1.5 !important; }
.promotion-progress[data-state="succeeded"] .promotion-progress-status { color: var(--accent); }
.promotion-progress[data-state="failed"] .promotion-progress-status { color: var(--danger); }
@keyframes promotion-progress-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .promotion-progress-bar { transition: none; }
  .promotion-progress-bar::after { animation: none !important; }
}
.release-version-list { display: grid; gap: 12px; }
.release-version-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.018); }
.release-version-card[open] { border-color: var(--line-strong); }
.release-version-card summary { display: flex; min-height: 88px; gap: 24px; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; list-style: none; }
.release-version-card summary::-webkit-details-marker { display: none; }
.release-version-card summary::after { order: 3; color: var(--quiet); content: "+"; font-size: 1.2rem; }
.release-version-card[open] summary::after { content: "−"; }
.release-version-card summary > span:first-child { display: grid; gap: 7px; }
.release-version-card summary > span:first-child strong { font-size: 1rem; }
.release-version-card summary > span:first-child small { color: var(--muted); font-size: 0.76rem; }
.release-version-card summary > span:nth-child(2) { margin-left: auto; padding: 6px 8px; border-radius: 999px; font-size: 0.66rem; }
.release-version-card summary > span.passed { color: var(--accent); background: var(--accent-soft); }
.release-version-card summary > span.pending { color: var(--warning); background: rgba(223, 189, 114, 0.12); }
.release-version-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.release-version-changes { border: 0; border-radius: 0; background: transparent; }
.release-version-changes .change-row { padding-right: 0; padding-left: 0; }
.release-archive-evidence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 22px 0 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.release-archive-evidence > span { display: grid; gap: 7px; padding: 14px; background: var(--surface); }
.release-archive-evidence small { color: var(--quiet); font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; }
.release-archive-evidence strong { overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; text-overflow: ellipsis; }
.change-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.018); }
.change-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px; padding: 22px; }
.change-row + .change-row { border-top: 1px solid var(--line); }
.change-row > div { display: grid; gap: 7px; }
.change-row small { color: var(--quiet); font-size: 0.68rem; }
.change-row p { margin: 0; color: var(--muted); line-height: 1.5; }
.change-type { align-self: start; justify-self: start; padding: 6px 8px; border-radius: 999px; font-size: 0.64rem; font-weight: 800; }
.change-type.feature { color: var(--accent); background: var(--accent-soft); }
.change-type.fix { color: #9fc8ff; background: rgba(90, 155, 255, 0.12); }
.change-type.security { color: var(--warning); background: rgba(223, 189, 114, 0.12); }
.change-type.operations { color: #d7b0ff; background: rgba(178, 112, 255, 0.12); }
.list-row > span.failed { color: var(--danger); background: rgba(255, 141, 134, 0.1); }
.compact-empty { min-height: 190px; }
.notice-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
.notice-card.error { border-color: rgba(255, 141, 134, 0.3); }
.notice-card p { margin: 8px 0 0; color: var(--muted); }

@media (max-width: 1050px) {
  .login-layout { grid-template-columns: 1fr 430px; }
  .login-story { padding: 40px; }
  .app-frame { grid-template-columns: 210px minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid article:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .metric-grid article:nth-child(4) { border-top: 1px solid var(--line); }
  .backtest-flow { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .backtest-flow i { display: none; }
}

@media (max-width: 760px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-story { min-height: 48vh; padding: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story h1 { font-size: clamp(3.6rem, 18vw, 6rem); }
  .login-footnote { display: none; }
  .login-panel { padding: 22px 16px 48px; }
  .auth-card { padding: 26px; }
  .app-frame { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { display: flex; margin: 20px 0 0; overflow-x: auto; }
  .side-nav button { width: auto; flex: 0 0 auto; }
  .side-nav button small, .side-nav button.active::before, .sidebar-footer { display: none; }
  .workspace-header { min-height: 100px; padding: 22px 20px; }
  .user-chip small { display: none; }
  .view-content { padding: 34px 20px 60px; }
  .dashboard-hero, .section-intro { display: grid; }
  .promotion-card { display: grid; }
  .promotion-card .primary-button { width: 100%; min-width: 0; }
  .release-version-card summary { align-items: flex-start; }
  .release-archive-evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .change-row { grid-template-columns: 1fr; }
  .metric-grid, .two-column-grid, .release-grid, .principle-grid, .release-facts, .form-fields, .backtest-flow, .admin-grid { grid-template-columns: 1fr; }
  .metric-grid article + article, .metric-grid article:nth-child(4), .principle-grid article + article, .release-facts article + article { border-top: 1px solid var(--line); border-left: 0; }
  .form-section { grid-template-columns: 1fr; gap: 20px; }
  .form-actions { display: grid; gap: 16px; }
}

.strategy-body, .strategy-rule { display: grid; gap: 16px; min-width: 0; }
.strategy-body { max-width: 850px; }
.strategy-body button { justify-self: start; }
.strategy-body h2, .strategy-body h3, .strategy-body p { margin: 0; }
.strategy-body p { white-space: pre-wrap; overflow-wrap: anywhere; }
.strategy-body textarea { width: 100%; min-height: 6rem; padding: 12px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; color: var(--text); background: #10201b; }
.strategy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.strategy-actions [aria-current] { outline: 1px solid var(--accent); }
.strategy-rule { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.strategy-rule [hidden] { display: none; }
.strategy-rule small, .strategy-rule legend { color: var(--muted); }

.journal-event { border-top: 1px solid var(--line); padding: 20px 0; }
.journal-assessment[data-verdict="pass"] b { color: var(--accent); }
.journal-assessment[data-verdict="fail"] b { color: var(--danger); }

@media (max-width: 1050px) {
  #profile-image-settings { grid-template-columns: 1fr; gap: 20px; }
}
.avatar-editor { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.avatar-controls { flex: 1 1 280px; min-width: 0; display: grid; gap: 12px; }
.avatar-controls input { max-width: 100%; min-width: 0; }
.avatar-file-label { display: grid; gap: 9px; min-width: 0; text-align: center; }
.avatar-file-picker {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  min-width: 0; min-height: 48px; padding: 6px 10px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #10201b; font: inherit; letter-spacing: normal;
}
.avatar-choose { position: relative; display: inline-flex; }
.avatar-choose > span { font: inherit; color: inherit; letter-spacing: inherit; }
.avatar-choose input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; }
.avatar-file-picker input::file-selector-button { cursor: pointer; }
.avatar-file-picker .secondary-button { flex: none; padding: 7px 12px; }
.avatar-choose:focus-within, #remove-profile-image:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-file-picker .secondary-button:hover { background: rgba(99, 230, 170, 0.18); }
.avatar-file-picker :disabled + span, #remove-profile-image:disabled { opacity: 0.55; cursor: default; }
.avatar-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.avatar-controls input[type="range"] { padding: 0; accent-color: var(--accent); }
.avatar-crop-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.avatar-crop-controls:not([hidden]) { display: grid; gap: 10px; }
.avatar-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.avatar-preview { width: 144px; height: 144px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); outline: 1px solid var(--line-strong); }
.avatar-preview canvas, .avatar-current, .avatar-current img, .user-avatar img { width: 100%; height: 100%; }
.avatar-current:not([hidden]) { display: grid; place-items: center; color: var(--accent); font-size: 2rem; font-weight: 800; }
.user-avatar { overflow: hidden; flex-shrink: 0; }

@media (max-width: 480px) {
  .avatar-file-picker .secondary-button { padding-inline: 8px; font-size: 0.875rem; }
}

.replay-chart { min-width: 0; display: grid; gap: 10px; margin-block: 20px; }
.replay-chart h3, .replay-chart p { margin: 0; }
.chart-controls { align-items: end; }
.chart-controls label { flex: 1 1 180px; max-width: 300px; }
.chart-controls button { min-height: 38px; }
.chart-plot { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #0b1512; }
.chart-plot svg { display: block; width: 100%; min-width: 525px; }
.chart-plot text { font: 11px ui-monospace, monospace; fill: var(--muted); }
.chart-grid { stroke: var(--line); }
.chart-up { stroke: #83c9aa; fill: #83c9aa; stroke-width: .65; }
.chart-down { stroke: #ba8091; fill: #ba8091; stroke-width: .65; }
.chart-entry, .chart-exit, .chart-excluded { stroke: #0a100e; stroke-width: 1.1; }
.chart-entry { fill: #9eff99; }
.chart-exit { fill: #91caff; }
.chart-excluded { fill: #ffc36c; }
.chart-caption { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.chart-caption:last-child { min-height: 1.5em; }

.chart-day { stroke: #70867d; stroke-opacity: .6; stroke-dasharray: 3 4; }
.chart-controls .chart-day-toggle { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 38px; cursor: pointer; }
.chart-day-toggle input { width: 1rem; height: 1rem; min-height: 0; padding: 0; accent-color: var(--accent); }
.chart-picking { cursor: crosshair; }
.candle-field { display: grid; align-content: start; gap: 6px; }
.chart-controls button[hidden] { display: none; }

.phase-band-trend { fill: #7bbfad; }
.phase-band-range { fill: #a99acb; }
.phase-shade-trend { fill: #7bbfad; opacity: .085; }
.phase-shade-range { fill: #a99acb; opacity: .075; }
.chart-plot .phase-name { fill: #101817; font-weight: 600; }
.chart-phase-key { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; }
.chart-phase-key[hidden] { display: none; }
.chart-phase-key span::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .45em; border-radius: 2px; }
.phase-key-trend::before { background: #7bbfad; }
.phase-key-range::before { background: #a99acb; }
.chart-phase-key summary { cursor: pointer; }
.chart-phase-key details p { margin-top: .5em; }
