.ig-statement { margin: 2rem 0; padding: 1.25rem; border: 1px solid var(--line, #c7c9c4); border-radius: .5rem; }
.ig-statement h2 { margin-top: 0; }
.ig-statement p { max-width: 80ch; }
.ig-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
/* #774: the picker is a label, which the journal lays out as a column, so its
   text sat at the top of the 44px box. Centre it like a <button>, and give it
   the app's keyboard focus ring rather than one on every focus. */
.ig-controls .ig-file { position: relative; box-sizing: border-box; cursor: pointer; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 0; }
.ig-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ig-file:has(input:focus-visible) { outline: 2px solid var(--j-focus, currentColor); outline-offset: 2px; }
.ig-files li { margin: .25rem 0; }
@media (min-width: 560px) { .ig-files li .btn { min-height: 32px; padding: 0 10px; margin-left: .35rem; } }
.ig-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.ig-item { padding: 1rem; background: var(--paper, #fafaf6); border: 1px solid var(--line, #c7c9c4); min-width: 0; overflow-wrap: anywhere; }
.ig-item h3 { margin: .4rem 0; }
.ig-item dl { margin: 0; }
.ig-item dl > div { display: flex; gap: 1rem; justify-content: space-between; padding: .35rem 0; border-top: 1px solid var(--line, #c7c9c4); }
.ig-item dd { margin: 0; text-align: right; }
.ig-problems { padding: 1rem; border: 1px solid currentColor; }
.ig-unclassified { overflow-wrap: anywhere; white-space: pre-wrap; }
.ig-offer { margin: 1.5rem 0; padding: 1rem; border: 2px solid var(--line, #c7c9c4); border-radius: .5rem; }
.ig-offer h3 { margin-top: 0; }
.ig-account { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 1rem; }
.ig-account select { min-height: 44px; max-width: 100%; }
/* #774: label above the select, left-aligned like the app's other fields. */
.ig-statement .ig-account { flex-direction: column; align-items: flex-start; gap: 4px; }
.ig-statement .ig-account select { width: min(100%, 28rem); }
.ig-offer-item { margin: 1rem 0; padding: 1rem; background: var(--paper, #fafaf6); border: 1px solid var(--line, #c7c9c4); min-width: 0; overflow-wrap: anywhere; }
.ig-offer-item h4, .ig-offer-item h5 { margin: .3rem 0 .6rem; font-size: 1.05rem; }
.ig-offer-subhead { margin: 1.5rem 0 .4rem; }
.ig-table { overflow-x: auto; max-width: 100%; }
.ig-table table { border-collapse: collapse; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.ig-table th, .ig-table td { padding: .35rem .5rem; border-top: 1px solid var(--line, #c7c9c4); text-align: left; vertical-align: top; }
.ig-table td { white-space: nowrap; }
.ig-table td:last-child { white-space: normal; min-width: 12rem; }
.ig-excluded td { color: var(--muted, #5d605a); }
.ig-offer-item input[data-ig-symbol] { display: block; min-height: 44px; margin: .3rem 0; width: min(100%, 14rem); text-transform: uppercase; }
.ig-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.ig-offer-item .ig-hint { display: block; margin: .2rem 0 .5rem; }
.ig-notice { padding: .5rem .75rem; border-left: 4px solid currentColor; }
@media (max-width: 559px) { .ig-statement { padding: .75rem; } .ig-controls > * { width: 100%; text-align: center; min-height: 44px; } .ig-offer { padding: .75rem; } .ig-offer-item { padding: .75rem; } .ig-actions > .btn { width: 100%; min-height: 44px; } .ig-account select { width: 100%; } }
/* Phone: each row stacks as labelled lines, so no figure hides behind a sideways scroll. */
@media (max-width: 559px) {
  .ig-table thead { display: none; }
  .ig-table table, .ig-table tbody, .ig-table tr { display: block; }
  .ig-table tr { padding: .4rem 0; border-top: 1px solid var(--line, #c7c9c4); }
  .ig-table th[scope="row"] { display: block; border-top: 0; padding: .2rem 0; }
  .ig-table td, .ig-table td:last-child { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .5rem; border-top: 0; padding: .15rem 0; white-space: normal; min-width: 0; }
  .ig-table td::before { content: attr(data-label); color: var(--muted, #5d605a); font-size: .85rem; }
}
/* #633: the cost offer. */
.ig-disclaimer { padding: .5rem .75rem; border-left: 4px solid var(--line, #c7c9c4); background: var(--paper, #fafaf6); }
.ig-costs select { min-height: 44px; max-width: 100%; margin: .3rem .5rem .3rem 0; }
.ig-cost-facts { margin: 0 0 .6rem; }
.ig-cost-facts > div { display: flex; gap: 1rem; justify-content: space-between; padding: .3rem 0; border-top: 1px solid var(--line, #c7c9c4); }
.ig-cost-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ig-offer-item select[data-ig-trade] { display: block; width: min(100%, 22rem); }
@media (max-width: 559px) { .ig-costs select, .ig-offer-item select[data-ig-trade] { width: 100%; } .ig-costs td .btn { width: 100%; min-height: 44px; } }

/* Opening suggestions keep the statement beside every editable figure. */
.journal-view .ig-openings .fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 16px 0; align-items: start; }
.journal-view .ig-openings .ig-opening-source { display: block; color: var(--m-ink-soft); font-size: .78rem; font-weight: 400; margin-top: 4px; overflow-wrap: anywhere; }
.journal-view .ig-openings > .hint { display: block; margin: 8px 0 16px; max-width: 76ch; }
.journal-view .ig-openings .ig-offer-item > button { margin: 8px 8px 0 0; }
.journal-view .ig-openings details { margin: 12px 0; }

/* The import follows the five decisions in order, with raw rows folded below. */
.ig-step { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line, #c7c9c4); min-width: 0; }
.ig-step-title { margin: 0 0 1rem; }
.ig-step > .ig-offer { margin: 1rem 0; }
.ig-files, .ig-account-context, .ig-import-summary { overflow-wrap: anywhere; }
.ig-statement > details { margin: 1rem 0; }
.ig-statement summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .5rem; }
.ig-statement summary::before { content: '▸'; }
.ig-statement details[open] > summary::before { content: '▾'; }
.ig-statement [data-ig-map-instrument] { display: inline-flex; align-items: center; min-height: 44px; margin-right: .75rem; }

/* #808: statement history stays readable beside the file chooser on compact screens. */
.ig-import-history { margin:1rem 0; padding:1rem; border:1px solid var(--line); border-radius:.5rem; }
.ig-history-list { list-style:none; padding:0; display:grid; gap:.75rem; }
.ig-history-list li { display:grid; gap:.3rem; padding:.75rem 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.ig-imported-hint { display:block; font-weight:600; }
