.jrn-wrap { padding: 24px 24px 80px; }
.jrn-inner { max-width: 1280px; margin: 0 auto; }

/* ---- hero (status pill + title) ---- */
.jrn-hero { margin-bottom: 24px; }
.jrn-status {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.jrn-status svg { width: 12px; height: 12px; }

/* Expandable "why is this local?" tooltip on the hero pill. */
.jrn-tip { position: relative; display: inline-block; margin-bottom: 16px; }
.jrn-tip > summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.jrn-tip > summary::-webkit-details-marker { display: none; }
.jrn-tip > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.jrn-tip__q { opacity: .7; }
.jrn-tip__panel {
    position: absolute; z-index: 30; top: calc(100% + 8px); left: 0;
    width: min(340px, calc(100vw - 48px));
    background: var(--panel); border: 1px solid var(--bd-hi); border-radius: 14px;
    padding: 16px; box-shadow: 0 16px 44px rgba(0, 0, 0, .38);
    text-align: left; text-transform: none; letter-spacing: 0;
}
.jrn-tip__panel b { display: block; font-size: 14px; font-weight: 700; color: var(--fg); margin-bottom: 8px; }
.jrn-tip__panel p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--fg-dim); font-weight: 400; }
.jrn-tip__cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--lime-dark);
}
.jrn-tip__cta svg { width: 14px; height: 14px; }
@media (max-width: 520px) { .jrn-tip__panel { width: calc(100vw - 40px); } }
.jrn-status--local {
    background: color-mix(in srgb, var(--lime) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--lime) 25%, transparent);
    color: var(--lime);
}
.jrn-status--sync {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: #10B981;
}
.jrn-h1 {
    font-size: clamp(32px, 5vw, 48px); font-weight: 800;
    letter-spacing: -0.03em; margin: 0 0 12px; line-height: 1.05;
}
.jrn-sub {
    font-size: clamp(14px, 1.6vw, 16px); color: var(--fg-dim);
    margin: 0; line-height: 1.6; max-width: 720px;
}

/* ---- sync banner ---- */
.jrn-syncbar {
    padding: 16px 20px; border-radius: 14px; margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(217,247,86,0.04) 100%);
    border: 1px solid rgba(34,211,238,0.25);
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.jrn-syncbar--import {
    background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(34,211,238,0.04) 100%);
    border-color: rgba(16,185,129,0.25);
}
.jrn-syncbar__ic {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.25);
    display: grid; place-items: center; color: var(--cyan);
}
.jrn-syncbar--import .jrn-syncbar__ic { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.25); color: #10B981; }
.jrn-syncbar__ic svg { width: 20px; height: 20px; }
.jrn-syncbar__body { flex: 1; min-width: 200px; }
.jrn-syncbar__t { font-size: 14px; font-weight: 800; color: var(--fg); margin-bottom: 4px; }
.jrn-syncbar__d { font-size: 12px; color: var(--fg-dim); line-height: 1.5; }
.jrn-syncbar__btn {
    padding: 10px 18px; border-radius: 10px; border: none; cursor: pointer;
    background: var(--cyan); color: #000; font: inherit; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(34,211,238,0.3);
}
.jrn-syncbar__btn svg { width: 14px; height: 14px; }

/* ---- stat tiles (JStat) ---- */
.jrn-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.jrn-stat { padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--bd); }
.jrn-stat small {
    display: block; font-size: 10px; color: var(--fg-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.jrn-stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 4px; color: var(--fg); }
.jrn-stat span { display: block; font-size: 11px; color: var(--fg-muted); line-height: 1.4; }
.jrn-mono { font-family: ui-monospace, "SF Mono", monospace; }
.jrn-pos { color: #10B981 !important; }
.jrn-neg { color: #EF4444 !important; }
.jrn-cyan { color: var(--cyan) !important; }
.jrn-lime { color: var(--lime) !important; }
.jrn-amber { color: var(--amber) !important; }

/* ---- bankroll curve card ---- */
.jrn-chart { padding: 24px; border-radius: 18px; margin-bottom: 24px; background: var(--panel); border: 1px solid var(--bd); }
.jrn-chart__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.jrn-chart__t { font-size: 14px; font-weight: 700; color: var(--fg); }
.jrn-chart__s { font-size: 11px; color: var(--fg-muted); }
.jrn-chart__body { position: relative; width: 100%; height: 200px; }
.jrn-chart__body svg { width: 100%; height: 100%; overflow: visible; }
.jrn-chart__val {
    position: absolute; top: 4px; right: 8px;
    font-size: 12px; font-weight: 700; font-family: ui-monospace, monospace;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    padding: 2px 8px; border-radius: 4px;
}

/* ---- action bar: outcome pills + selects + add ---- */
.jrn-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.jrn-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.jrn-pill {
    padding: 7px 14px; border-radius: 999px;
    background: transparent; border: 1px solid var(--bd); color: var(--fg-dim);
    font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.jrn-pill:hover { border-color: var(--bd-hi); color: var(--fg); }
.jrn-pill.is-active { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.jrn-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jrn-select {
    padding: 7px 12px; border-radius: 8px;
    background: var(--panel); border: 1px solid var(--bd); color: var(--fg);
    font: inherit; font-size: 12px; cursor: pointer; outline: none;
}
.jrn-add {
    padding: 7px 14px; border-radius: 8px; border: none; cursor: pointer;
    background: var(--lime); color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--lime) 25%, transparent);
}
.jrn-add svg { width: 14px; height: 14px; stroke-width: 3; }
.jrn-add--lg { padding: 10px 18px; border-radius: 10px; }

/* ---- bet table ---- */
.jrn-table { border-radius: 16px; overflow: hidden; border: 1px solid var(--bd); background: var(--panel); }
.jrn-thead, .jrn-row {
    display: grid; grid-template-columns: 100px 90px 1fr 100px 70px 100px 110px 60px;
    gap: 12px; align-items: center;
}
.jrn-thead {
    padding: 12px 16px; background: var(--panel-hi); border-bottom: 1px solid var(--bd);
    font-size: 10px; font-weight: 700; color: var(--fg-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.jrn-row { padding: 14px 16px; border-bottom: 1px solid var(--bd); font-size: 13px; color: var(--fg-dim); transition: background 0.1s; }
.jrn-row:last-child { border-bottom: 0; }
.jrn-row:hover { background: color-mix(in srgb, var(--panel-hi) 50%, transparent); }
.jrn-row__date { font-size: 12px; color: var(--fg-muted); font-family: ui-monospace, monospace; }
.jrn-row__cat span { display: inline-block; padding: 3px 7px; border-radius: 4px; background: var(--input); color: var(--fg-dim); font-size: 10px; font-weight: 600; }
.jrn-row__ev { min-width: 0; }
.jrn-row__name { font-size: 13px; color: var(--fg); font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrn-row__sel { font-size: 11px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrn-row__num { text-align: right; font-family: ui-monospace, monospace; font-size: 12px; color: var(--fg); }
.jrn-row__st { text-align: center; }
.jrn-badge {
    display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 4px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.jrn-row__pl { text-align: right; font-family: ui-monospace, monospace; font-size: 13px; font-weight: 700; color: var(--fg-muted); }
.jrn-row__act { display: flex; gap: 4px; justify-content: flex-end; }
.jrn-ibtn {
    width: 24px; height: 24px; border-radius: 6px; padding: 0; cursor: pointer;
    background: transparent; border: 1px solid var(--bd); color: var(--fg-muted);
    display: inline-flex; align-items: center; justify-content: center;
}
.jrn-ibtn:hover { color: var(--fg); border-color: var(--bd-hi); }
.jrn-ibtn svg { width: 11px; height: 11px; }
@media (max-width: 720px) {
    .jrn-thead, .jrn-row { grid-template-columns: 80px 1fr 90px 60px; }
    .jrn-thead > :nth-child(2), .jrn-row > :nth-child(2),
    .jrn-thead > :nth-child(4), .jrn-row > :nth-child(4),
    .jrn-thead > :nth-child(5), .jrn-row > :nth-child(5),
    .jrn-thead > :nth-child(7), .jrn-row > :nth-child(7) { display: none; }
}

/* ---- empty state ---- */
.jrn-empty { padding: 60px 24px; border-radius: 18px; text-align: center; background: var(--panel); border: 1px dashed var(--bd); }
.jrn-empty__ic { display: inline-flex; color: var(--fg-muted); margin-bottom: 16px; }
.jrn-empty__ic svg { width: 48px; height: 48px; stroke-width: 1.5; }
.jrn-empty__t { font-size: 16px; font-weight: 700; color: var(--fg); margin-bottom: 8px; }
.jrn-empty__d { font-size: 13px; color: var(--fg-dim); margin-bottom: 20px; }
.jrn-empty__d:last-child { margin-bottom: 0; }

/* ---- bottom actions ---- */
.jrn-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.jrn-foot__meta { font-size: 11px; color: var(--fg-muted); }
.jrn-foot__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.jrn-ghost {
    padding: 8px 14px; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid var(--bd); color: var(--fg-dim);
    font: inherit; font-size: 12px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.jrn-ghost:hover { color: var(--fg); border-color: var(--bd-hi); }
.jrn-ghost svg { width: 12px; height: 12px; }

/* ---- add/edit form ---- */
.jrn-form {
    padding: 24px; border-radius: 16px; margin-bottom: 16px;
    background: var(--panel); border: 2px solid color-mix(in srgb, var(--lime) 30%, transparent);
}
.jrn-form__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.jrn-form__t { font-size: 16px; font-weight: 800; color: var(--fg); }
.jrn-x { padding: 6px; border-radius: 6px; background: transparent; border: none; color: var(--fg-muted); cursor: pointer; display: inline-flex; }
.jrn-x:hover { color: var(--fg); }
.jrn-x svg { width: 16px; height: 16px; }
.jrn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.jrn-mt { margin-top: 12px; }
.jrn-mt16 { margin-top: 16px; }
.jrn-field label {
    display: block; font-size: 10px; color: var(--fg-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.jrn-field label em { color: #EF4444; font-style: normal; }
.jrn-field input, .jrn-field select {
    width: 100%; padding: 9px 12px; border-radius: 8px; box-sizing: border-box;
    background: var(--input); border: 1px solid var(--bd); color: var(--fg);
    font: inherit; font-size: 13px; outline: none; transition: border-color 0.15s;
}
.jrn-field input[type="number"], .jrn-field input[type="date"] { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.jrn-field input:focus, .jrn-field select:focus { border-color: color-mix(in srgb, var(--lime) 40%, var(--bd)); }
.jrn-field--lg input { padding: 10px 12px; font-size: 14px; }
.jrn-oc { display: flex; gap: 6px; flex-wrap: wrap; }
.jrn-oc label { cursor: pointer; position: relative; }
.jrn-oc input { position: absolute; opacity: 0; pointer-events: none; }
.jrn-oc span {
    display: inline-block; padding: 8px 14px; border-radius: 8px;
    background: var(--input); border: 1.5px solid var(--bd); color: var(--fg-dim);
    font-size: 12px; font-weight: 700; transition: all 0.12s;
}
.jrn-oc input:checked + span {
    background: color-mix(in srgb, var(--oc) 15%, transparent);
    border-color: var(--oc); color: var(--oc);
}
.jrn-pv {
    margin-top: 12px; padding: 14px; border-radius: 10px;
    background: var(--input); border: 1px solid var(--bd);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
}
.jrn-pv small {
    display: block; font-size: 10px; color: var(--fg-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.jrn-pv b { display: block; font-size: 16px; font-weight: 700; font-family: ui-monospace, monospace; }
.jrn-form__foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.jrn-cbtn {
    padding: 10px 18px; border-radius: 10px; cursor: pointer;
    background: transparent; border: 1px solid var(--bd); color: var(--fg);
    font: inherit; font-size: 13px; font-weight: 600;
}
.jrn-save {
    padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
    background: var(--lime); color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--lime) 25%, transparent);
}
.jrn-save svg { width: 14px; height: 14px; stroke-width: 3; }

/* ---- bookmaker breakdown ---- */
.jrn-block { padding: 24px; border-radius: 18px; margin-top: 20px; background: var(--panel); border: 1px solid var(--bd); }
.jrn-block__h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--fg); letter-spacing: -0.01em; margin: 0 0 14px; }
.jrn-block__h svg { width: 16px; height: 16px; color: var(--cyan); stroke-width: 2.5; }
.jrn-bkrows { display: flex; flex-direction: column; gap: 6px; }
.jrn-bkrow {
    display: grid; grid-template-columns: 1fr 70px 90px 80px 100px;
    gap: 12px; align-items: center; padding: 10px 14px; border-radius: 8px;
    background: var(--input); font-size: 12px;
}
.jrn-bkrow__name { font-weight: 700; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrn-bkrow__num { text-align: right; font-family: ui-monospace, monospace; color: var(--fg-dim); }
.jrn-bkrow__pl { text-align: right; font-family: ui-monospace, monospace; font-weight: 800; }
.jrn-bkrow__roi { text-align: right; font-family: ui-monospace, monospace; font-weight: 700; }
@media (max-width: 640px) {
    .jrn-bkrow { grid-template-columns: 1fr 80px 100px; }
    .jrn-bkrow > :nth-child(2), .jrn-bkrow > :nth-child(3) { display: none; }
}

/* ---- educational footer ---- */
.jrn-edu { margin-top: 32px; padding: 24px; border-radius: 16px; background: rgba(34,211,238,0.04); border: 1px solid rgba(34,211,238,0.15); }
.jrn-edu__h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--fg); margin: 0 0 12px; }
.jrn-edu__h svg { width: 16px; height: 16px; color: var(--cyan); stroke-width: 2.5; }
.jrn-edu__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.jrn-edu__grid p { font-size: 12px; color: var(--fg-dim); line-height: 1.6; margin: 0; }
.jrn-edu__grid strong { color: var(--fg); }
.jrn-edu__grid a { color: var(--cyan); font-weight: 600; border-bottom: 1px dashed var(--cyan); }
