/* The 비용 group of AI 사용 인사이트 and 내 사용량 (insights foundation). Every colour and size is a design-system
   token (style.css), so the dark theme follows without rules of its own. */
.insights-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--ds-space-3); margin: var(--ds-space-2) 0 var(--ds-space-1); }
/* A tile is as tall as what it says (the page's old `article` floor of 235px left its lower half empty); the
   tiles of one row end together. */
.insights-kind { min-height: 0; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); padding: 14px 16px; background: var(--ds-surface); }
.insights-kind h4 { margin: 0 0 var(--ds-space-1); font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-text-2); display: flex; gap: 6px; align-items: center; }
.insights-amount { margin: 0; font-family: var(--ds-font-num); font-size: var(--ds-fs-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* No record, and an amount not known, are said quietly: neither is an amount. */
.insights-kind:not([data-amount="known"]) .insights-amount { font-size: var(--ds-fs-lg); font-weight: 600; line-height: 1.8; letter-spacing: 0; color: var(--ds-text-2); }
/* A tile's lines and a tab's sentence are body text, 14px (user review 10-06, P2 12). */
.insights-sub { margin: var(--ds-space-1) 0; font-size: var(--ds-fs-sm); }
.insights-kind small { display: block; color: var(--ds-text-2); font-size: var(--ds-fs-sm); }
.insights-whole { white-space: nowrap; }
/* A wide tile: the count, then the window before on its own line, so every tile of a row has the same lines. */
@media (min-width: 601px) { .insights-sub .insights-delta { display: block; } .insights-sub .insights-dot { display: none; } }
/* A change is said by its sign and an arrow in the surrounding text colour: a rise in cost is not always bad, and
   colour alone would add a red and a green to the screen (review floor M5). */
.insights-delta[data-delta="up"]::before { content: "▲ "; content: "▲ " / ""; }
.insights-delta[data-delta="down"]::before { content: "▼ "; content: "▼ " / ""; }
.insights-groupby { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 100%; margin: var(--ds-space-2) 0; }
/* The choice is never wider than its card, whatever an option's words are (a stale page's, a hand-made one's). */
.insights-groupby select { width: auto; min-width: 140px; max-width: 100%; }
/* A phone: the kind and its amount share the tile's first line, so three or four amounts are on the first screen. */
@media (max-width: 600px) {
  .insights-kind { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--ds-space-3); align-items: baseline; padding: 12px 14px; }
  .insights-kind h4 { margin: 0; flex-wrap: wrap; }
  .insights-amount { grid-column: 2; grid-row: 1; text-align: right; }
  .insights-kind:not([data-amount="known"]) .insights-amount { line-height: 1.2; }
  .insights-sub, .insights-kind small { grid-column: 1 / -1; }
}
/* A wide screen (a booth's 1080p wall) reads the amounts from a distance: one size step up, as the lists do. */
@media (min-width: 1700px) {
  .insights-kind h4 { font-size: var(--ds-fs-md); }
  .insights-amount { font-size: var(--ds-fs-figure); }
  .insights-kind:not([data-amount="known"]) .insights-amount { font-size: var(--ds-fs-xl); line-height: 2.1; }
  .insights-sub { font-size: var(--ds-fs-md); }
  .insights-kind small { font-size: var(--ds-fs-md); }
  /* ... and what kind of number it is, with the line that says so, a step up with the amounts. */
  .insights-kind .insights-badge, .insights-labels, .insights-labels .insights-badge { font-size: var(--ds-fs-sm); }
  .insights-kinds + .insights-hint { font-size: var(--ds-fs-sm); }
}
.insights-notice { background: var(--ds-accent-soft, #eef4ff); border-left: 3px solid var(--ds-accent, #3538cd); padding: 8px 12px; }
/* The other cost views and 보존·목적 (insights-retention.js). */
.insights-section { margin: 16px 0; }
.insights-section h4 { margin: 0 0 6px; font-size: 14px; }
/* 토큰 추정 and 외부 출처 as the setting lines of one card (audit G1-57): each line its name, then what it says or the
   press; the lines one step apart, the card's own padding around them. */
.insights-cost-more > .insights-section { margin: 0; }
.insights-cost-more > .insights-section + .insights-section { margin-top: var(--ds-space-3); }
.insights-cost-more .insights-section > .lx-row > h4 { margin: 0; }
.insights-kinds + .insights-hint[data-cost-kinds-none] { margin: 0 0 var(--ds-space-2); }
.insights-upload, .insights-retention-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 8px 0 12px; }
/* The invoice form's file input is as tall as its select and text inputs (a 28px button + 3px above and below + the
   border = 36px), so the row's tops meet (6.4). */
.insights-upload input[type="file"] { box-sizing: border-box; height: 36px; padding-block: 3px; }
.insights-zero { color: var(--ds-text-3); }
/* An amount under a cent is one line, whatever the column's width (it was 1센트 / 미만 in a narrow 소진 cell). */
.insights-table [data-money-subcent] { white-space: nowrap; }

/* Gateway cost: long translated headings wrap within their own columns. Keep the
   same tracks for the heading and every row; only the table scrolls when the
   two navigation rails leave less room. The existing mobile cards stay below 901px. */
@media (min-width: 901px) {
  #cost-root [data-gwc-cost-table] { overflow-x: auto; }
  #cost-root [data-gwc-cost-table] > .rm9-cost-cols {
    box-sizing: border-box;
    min-width: 880px;
    grid-template-columns: minmax(136px, 1.6fr) repeat(4, minmax(88px, 1fr)) minmax(64px, .6fr) minmax(64px, .6fr) minmax(136px, auto);
  }
  #cost-root [data-gwc-cost-table] [role="columnheader"] { min-width: 0; justify-self: stretch; }
  #cost-root [data-gwc-cost-table] .rm9-sort {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
    text-align: inherit;
  }
}
/* U44 (brief/12 R1): the kinds with no record -- one quiet label, then each kind a chip. */
.insights-kinds-none { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-1) var(--ds-space-3); }
/* U44 round 3: 기록 없음 is the label, the kinds after it one group set off by a rule -- never read as one run of words. */
.insights-kinds-none > span:first-child { color: var(--muted); font-size: var(--fs-xs); }
.insights-kinds-none > .lx-tags { padding-left: var(--ds-space-3); border-left: 1px solid var(--divider); }
/* U44 (brief/12 R1): a tile's lines hold one value each -- its records, its price sources as chips under one label, the
   window before -- never strung with dots; the screen's headline says the period with its figures as chips. */
.insights-sub { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-1); }
.insights-kind small[data-price-sources] { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-1); }
[data-insights-head-figures]:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); }
