/* insights (upgrade 3): "where is the price within the year" + savings simulator. Prefix: .in-
   Metal tint: --in-c (line, dial, knob), gold for XAU and cool silver for XAG, in both themes. */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

.in-wrap { max-width: 1180px; margin: 0 auto; padding-top: 6px; }
.in-head { text-align: center; margin: 8px auto 12px; max-width: 680px; }
.in-title { font-size: clamp(30px, 5vw, 46px); margin: 12px 0 6px; }
.in-sub { margin: 0 auto; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.seg.tabs.in-tabs { display: flex; width: 100%; max-width: 520px; margin: 14px auto 18px; }
.in-tabs button { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.in-pane { --in-c: #E3C07E; --in-c2: #FFF0CC; --in-c3: #8C6A2C; --in-glow: rgba(227, 192, 126, .38); }
.in-pane.in-xag { --in-c: #C9D3DE; --in-c2: #FFFFFF; --in-c3: #6B7684; --in-glow: rgba(201, 211, 222, .32); }
html[data-theme="light"] .in-pane { --in-c: #A9771F; --in-c2: #F2CF83; --in-c3: #6E4C10; --in-glow: rgba(169, 119, 31, .28); }
html[data-theme="light"] .in-pane.in-xag { --in-c: #56677A; --in-c2: #DCE3EA; --in-c3: #33404E; --in-glow: rgba(86, 103, 122, .24); }

.in-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px; }
.in-units { flex-wrap: wrap; justify-content: center; }
.in-lbl { font-size: 12.5px; color: var(--ink-3); }
.in-muted { color: var(--ink-3); }
.in-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.in-card-h h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.in-card-sub { font-size: 12px; color: var(--ink-3); }

/* ---------- year: hero ---------- */
.in-ygrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: stretch; }
.in-hero { display: flex; flex-direction: column; gap: 18px; padding: 22px; overflow: visible;
  background-image: radial-gradient(120% 70% at 50% -12%, color-mix(in srgb, var(--in-c) 16%, transparent), transparent 62%), var(--glass-grad); }
.in-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge.in-snap { color: var(--ink-2); background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.in-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: -6px; }
.in-big { font-size: clamp(38px, 5.4vw, 54px); font-weight: 400; line-height: 1.08; letter-spacing: -.02em;
  background: radial-gradient(120% 70% at 30% 40%, #fff 0%, #A8ADB6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.in-unit { color: var(--ink-3); font-size: 13px; }
/* big figures read better with proportional digits (tables keep tabular ones) */
.in-big, .in-big .num, .in-dial-core .num, .in-line .num, .in-end .num, .in-kpis .num, .in-sv-kpis .num, .in-pl .num, .in-fill-pct .num, .in-tip .num { font-variant-numeric: proportional-nums; letter-spacing: 0; }
.in-money .in-dec { opacity: .55; font-size: .72em; }

.in-pos { display: flex; align-items: center; gap: 18px; }
.in-dial { flex: none; position: relative; width: 116px; height: 116px; border-radius: 50%;
  background: conic-gradient(var(--in-c2) 0%, var(--in-c) calc(var(--p) * 1%), rgba(255, 255, 255, .07) calc(var(--p) * 1%) 100%);
  box-shadow: 0 0 0 1px var(--line-2), 0 22px 40px -18px var(--in-glow), 0 0 26px -6px var(--in-glow);
  transition: --p .9s cubic-bezier(.2, .8, .2, 1); animation: inDial 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes inDial { from { --p: 0; } }
.in-dial-core { position: absolute; inset: 11px; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 1px; padding: 6px;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .14), transparent 55%), linear-gradient(160deg, #141A24, #07090E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -12px 22px rgba(0, 0, 0, .55), 0 6px 16px rgba(0, 0, 0, .55); }
.in-dial-core b { font-size: 25px; font-weight: 500; line-height: 1.1; color: var(--ink); }
.in-dial-core span { font-size: 9.5px; line-height: 1.25; color: var(--ink-3); max-width: 76px; }
.in-pos-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.in-line { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.in-line b { color: var(--in-c); font-weight: 600; font-size: 1.15em; }
.in-zone { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: var(--r-ctl); font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); white-space: nowrap; }
.in-zone::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.in-zone[data-z="low"]::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.in-zone[data-z="high"]::before { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

/* range bar: low at the inline start, high at the inline end (flips in Arabic) */
/* one number (--pos, 0..100) drives the fill and the knob; only it is animated, so the logical
   (RTL-aware) positions are resolved by normal styles, never inside keyframes */
@property --pos { syntax: '<number>'; inherits: true; initial-value: 0; }
.in-range { padding-top: 30px; transition: --pos .7s cubic-bezier(.2, .8, .2, 1); animation: inPos 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes inPos { from { --pos: 0; } }
.in-track { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .05); }
.in-fill { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: calc(var(--pos) * 1%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--in-c) 18%, transparent), var(--in-c)); }
html[dir="rtl"] .in-fill { background: linear-gradient(270deg, color-mix(in srgb, var(--in-c) 18%, transparent), var(--in-c)); }
.in-knob { position: absolute; top: 50%; inset-inline-start: calc(var(--pos) * 1%); width: 22px; height: 22px; margin-top: -11px; margin-inline-start: -11px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 10%, var(--in-c2) 30%, var(--in-c) 62%, var(--in-c3) 100%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--in-c) 26%, transparent), 0 5px 12px rgba(0, 0, 0, .55), 0 0 20px var(--in-glow); }
.in-knob i { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; line-height: 1;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap; color: var(--in-c); background: color-mix(in srgb, var(--in-c) 14%, var(--bg)); border: 1px solid color-mix(in srgb, var(--in-c) 40%, transparent); }
.in-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.in-end { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.in-end.hi { align-items: flex-end; text-align: end; }
.in-end b { font-size: 17px; font-weight: 500; }
.in-date { font-size: 11.5px; color: var(--ink-3); }
.in-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.in-kpis div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); min-width: 0; }
.in-kpis dt { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.in-kpis dd { margin: 5px 0 0; font-size: 16px; }
.in-demo { margin: -4px 0 0; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.in-demo .badge { flex: none; }

/* ---------- charts (SVG, time runs left -> right in both languages) ---------- */
.in-chart-card { display: flex; flex-direction: column; padding: 18px 16px 14px; min-width: 0; }
.in-chart { position: relative; flex: 1 1 320px; min-height: 320px; border-radius: 14px; background: rgba(0, 0, 0, .24); border: 1px solid var(--line);
  overflow: hidden; touch-action: pan-y; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
.in-chart:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.in-svg { position: absolute; inset: 0; display: block; }
.in-grid { stroke: var(--line); stroke-width: 1; }
.in-grid.v { stroke-dasharray: 2 5; opacity: .8; }
.in-ax { fill: var(--ink-3); font-size: 10.5px; font-family: "Schibsted Grotesk", system-ui, sans-serif; }
html[lang="ar"] .in-ax { font-family: var(--font-ar); }
.in-gs0 { stop-color: var(--in-c); stop-opacity: .36; }
.in-gs1 { stop-color: var(--in-c); stop-opacity: 0; }
.in-ln-main { fill: none; stroke: var(--in-c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--in-glow)); }
.in-ln-inv { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.in-mark { fill: var(--bg); stroke-width: 2; }
.in-mark.hi { stroke: var(--in-c); } .in-mark.lo { stroke: var(--ink-2); }
.in-mark-t { font-size: 10.5px; fill: var(--ink-2); }
.in-mark-t.hi { fill: var(--in-c); }
.in-now-l { stroke: var(--mint); stroke-width: 1; stroke-dasharray: 3 4; opacity: .75; }
.in-now-tag { fill: var(--mint); }
.in-now-t { fill: var(--bg); font-size: 10px; font-weight: 600; font-family: "Schibsted Grotesk", system-ui, sans-serif; }
.in-cross-l { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.in-cross-d { fill: var(--in-c); stroke: var(--bg); stroke-width: 2; }
.in-cross-d2 { fill: var(--ink-2); }
.in-tip { position: absolute; top: 10px; z-index: 2; display: flex; flex-direction: column; gap: 3px; padding: 8px 11px; border-radius: 12px; pointer-events: none; white-space: nowrap;
  background: rgba(10, 13, 19, .92); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); font-size: 12px; color: var(--ink-2); backdrop-filter: blur(8px); }
.in-tip b { font-size: 15px; font-weight: 500; color: var(--ink); }
.in-tip-row { display: flex; align-items: center; gap: 7px; }
.in-tip-row .num { color: var(--ink); }
.in-tip-row.up .num { color: var(--up); } .in-tip-row.down .num { color: var(--down); }
.in-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
.in-legend { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-3); }
.in-legend span { display: inline-flex; align-items: center; gap: 6px; }
.in-sw-v { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--in-c); box-shadow: 0 0 6px var(--in-glow); }
.in-sw-i { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--ink-2); }

/* ---------- tables ---------- */
.in-month-card { margin-top: 16px; }
.in-table-wrap { overflow-x: auto; margin: 0 -4px; }
.in-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.in-table th, .in-table td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; vertical-align: top; }
.in-table thead th { font-size: 11.5px; font-weight: 500; color: var(--ink-3); padding-top: 4px; }
.in-table tbody th { font-weight: 500; color: var(--ink); }
.in-table td { text-align: end; }
.in-table td:last-child, .in-table thead th:last-child { padding-inline-start: 14px; }
.in-table thead th:not(:first-child) { text-align: end; }
.in-table tr:last-child th, .in-table tr:last-child td { border-bottom: 0; }
.in-table tbody tr { transition: background .15s; }
.in-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.in-table .num { display: inline-block; }
html[dir="rtl"] .in-table td .num { text-align: left; }
.in-table .in-sm-range { display: none; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.in-tag { font-size: 10.5px; font-weight: 400; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; margin-inline-start: 4px; white-space: nowrap; }
.in-nodata td { text-align: start; }
.in-pend-row td { color: var(--ink-2); white-space: normal; }
/* a buy whose day has come but whose snapshot is not published yet: calm, not a warning */
.in-pending { display: flex; gap: 9px; align-items: baseline; margin: 0; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .025); color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.in-pend-dot { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--in-c, #E3C07E); box-shadow: 0 0 8px var(--in-glow, rgba(227, 192, 126, .38));
  animation: inPulse 2s ease-in-out infinite; }
@keyframes inPulse { 50% { opacity: .35; } }
.in-shift { color: var(--warn); cursor: help; margin-inline-start: 2px; }

/* ---------- notes & states ---------- */
.in-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 2px 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.65; }
.in-note svg { flex: none; width: 16px; height: 16px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.in-note a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; white-space: nowrap; }
.in-note a:hover { color: var(--ink); }
.in-sout .in-note { margin-top: 0; }
.in-warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; border: 1px dashed rgba(240, 182, 90, .42); background: rgba(240, 182, 90, .06); color: #F6CF8C; font-size: 13px; line-height: 1.6; }
.in-sout .in-warn { margin: 0; }
.in-state { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 40px 20px; color: var(--ink-2); }
.in-state p { margin: 0; }
.in-spin { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: inSpin .9s linear infinite; }
@keyframes inSpin { to { transform: rotate(360deg); } }
.in-fill-card { padding: 26px 24px 22px; max-width: 640px; margin: 4px auto; overflow: visible; }
.in-fill-top { display: flex; align-items: center; gap: 12px; }
.in-fill-top h2 { margin: 0; font-size: 17px; font-weight: 500; color: var(--ink); }
.in-prog { margin: 20px 0 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); overflow: hidden; }
.in-prog span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--mint)); box-shadow: 0 0 14px rgba(16, 188, 131, .55); transition: inline-size .6s ease; }
html[dir="rtl"] .in-prog span { background: linear-gradient(270deg, var(--accent-2), var(--mint)); }
.in-fill-pct { margin: 0; font-size: 14px; color: var(--ink-2); }
.in-fill-pct .num { color: var(--ink); font-weight: 500; }

/* ---------- savings ---------- */
.in-disc { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(240, 182, 90, .45);
  background: linear-gradient(rgba(240, 182, 90, .13), rgba(240, 182, 90, .04)); color: #F8DDA4; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-in); }
.in-disc svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.in-disc p { margin: 0; line-height: 1.6; }
.in-sgrid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.in-form { display: flex; flex-direction: column; gap: 16px; padding: 18px; position: sticky; top: 76px; }
.in-field { gap: 7px; }
.in-field > span { color: var(--ink-2); }
.in-field input, .in-field select { width: 100%; min-width: 0; }
.in-field select { height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); color: var(--ink); padding: 0 12px; font: inherit; font-size: 15px; cursor: pointer; }
.in-field select:focus { outline: none; border-color: rgba(16, 188, 131, .6); box-shadow: 0 0 0 3px rgba(16, 188, 131, .15); }
.in-field select option { background: #0A0D13; color: var(--ink); }
.in-row2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.in-fs { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.in-fs legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--ink-2); }
.karat-chips.in-chips { flex-wrap: wrap; } /* the base chips stay on one line on phones; these four must wrap */
.in-chips button { height: 34px; padding: 0 13px; white-space: nowrap; }
.in-costseg { align-self: flex-start; }
.in-err { color: #F7A3A6; font-size: 12px; line-height: 1.4; }
.in-err:empty { display: none; }
.in-hint { color: var(--ink-3); font-size: 12px; line-height: 1.55; }
.in-costs-h { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); }
.in-sout { display: flex; flex-direction: column; gap: 16px; min-width: 0; transition: opacity .2s; }
.in-sout.in-stale { opacity: .45; }
.in-sv-hero { display: grid; gap: 18px; padding: 22px; overflow: visible;
  background-image: radial-gradient(120% 80% at 50% -18%, color-mix(in srgb, var(--in-c) 16%, transparent), transparent 62%), var(--glass-grad); }
.in-sv-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.in-sv-main .in-now { margin-top: 0; }
.in-pl { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px; border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 10%, transparent); }
.in-pl.flat { color: var(--ink-2); }
.in-sv-buys, .in-sv-nownote { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.in-sv-none { margin: 6px 0; color: var(--ink-2); text-align: center; }
.in-sv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.in-sv-kpis div { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); min-width: 0; }
.in-sv-kpis dt { font-size: 12px; color: var(--ink-3); }
.in-sv-kpis dd { margin: 5px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.in-sv-kpis dd small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.in-details { padding: 16px 18px; }
.in-details summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; font-size: 15px; color: var(--ink-2); border-radius: 10px; }
.in-details summary::-webkit-details-marker { display: none; }
.in-details summary > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.in-details summary > span:first-child::before { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid var(--ink-3); border-block-end: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .2s; }
html[dir="rtl"] .in-details summary > span:first-child::before { transform: rotate(45deg); }
.in-details[open] summary > span:first-child::before { transform: rotate(45deg) translate(-2px, -2px); }
html[dir="rtl"] .in-details[open] summary > span:first-child::before { transform: rotate(-45deg) translate(2px, -2px); }
.in-details[open] summary { margin-bottom: 12px; }
.in-count { font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-3); }
.in-rule { margin: 0; }

/* ---------- light theme ---------- */
html[data-theme="light"] .in-big { background: radial-gradient(120% 70% at 30% 40%, #0E241C 0%, #557468 100%); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .badge.in-snap { background: rgba(255, 255, 255, .6); color: var(--ink-2); }
html[data-theme="light"] .in-dial { background: conic-gradient(var(--in-c2) 0%, var(--in-c) calc(var(--p) * 1%), rgba(16, 48, 36, .08) calc(var(--p) * 1%) 100%); }
html[data-theme="light"] .in-dial-core { background: radial-gradient(circle at 34% 26%, #fff, transparent 60%), linear-gradient(160deg, #FFFFFF, #E6EDE8);
  box-shadow: inset 0 1px 0 #fff, inset 0 -10px 20px rgba(16, 48, 36, .08), 0 6px 16px rgba(16, 48, 36, .18); }
html[data-theme="light"] .in-zone { background: rgba(255, 255, 255, .6); }
html[data-theme="light"] .in-track, html[data-theme="light"] .in-prog { background: rgba(16, 48, 36, .08); box-shadow: inset 0 1px 2px rgba(16, 48, 36, .18); }
html[data-theme="light"] .in-knob { box-shadow: 0 0 0 3px color-mix(in srgb, var(--in-c) 22%, transparent), 0 4px 10px rgba(16, 48, 36, .3); }
html[data-theme="light"] .in-knob i { background: #fff; }
html[data-theme="light"] .in-kpis div, html[data-theme="light"] .in-sv-kpis div, html[data-theme="light"] .in-costs-h { background: rgba(255, 255, 255, .55); }
html[data-theme="light"] .in-chart { background: rgba(255, 255, 255, .72); }
html[data-theme="light"] .in-tip { background: rgba(255, 255, 255, .97); box-shadow: 0 14px 30px -12px rgba(16, 48, 36, .35); }
html[data-theme="light"] .in-table tbody tr:hover { background: rgba(16, 168, 117, .05); }
html[data-theme="light"] .in-warn { color: #8A5A12; border-color: rgba(183, 121, 31, .4); background: rgba(240, 182, 90, .1); }
html[data-theme="light"] .in-disc { color: #6E4A0C; border-color: rgba(183, 121, 31, .45); background: linear-gradient(rgba(240, 190, 100, .24), rgba(240, 190, 100, .1)); }
html[data-theme="light"] .in-field select { background: rgba(255, 255, 255, .8); }
html[data-theme="light"] .in-field select option { background: #fff; }
html[data-theme="light"] .in-err { color: #B23338; }
html[data-theme="light"] .in-ln-main { filter: none; }
html[data-theme="light"] .in-pending { background: rgba(255, 255, 255, .55); }

/* ---------- layout breakpoints ---------- */
@media (max-width: 980px) {
  .in-ygrid, .in-sgrid { grid-template-columns: minmax(0, 1fr); }
  .in-form { position: static; }
  .in-chart { flex-basis: 280px; min-height: 280px; }
}
@media (max-width: 560px) {
  .in-title { font-size: 30px; }
  .in-sub { font-size: 13.5px; }
  .in-tabs button { font-size: 14px; padding: 0 8px; }
  .in-hero, .in-sv-hero { padding: 18px 16px; }
  .in-big { font-size: 38px; }
  .in-dial { width: 100px; height: 100px; }
  .in-dial-core { inset: 10px; }
  .in-dial-core b { font-size: 22px; }
  .in-pos { gap: 14px; }
  .in-line { font-size: 14.5px; }
  .in-kpis { gap: 6px; }
  .in-kpis div { padding: 9px 9px; }
  .in-kpis dd { font-size: 14.5px; }
  .in-chart-card { padding: 14px 12px 12px; }
  .in-chart { flex-basis: 250px; min-height: 250px; }
  .in-hide-sm { display: none; }
  .in-table .in-sm-range { display: block; }
  .in-table tbody th { white-space: normal; min-width: 92px; }
  .in-table th, .in-table td { padding-inline: 4px; }
  .in-sv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .in-sv-kpis dd { font-size: 15.5px; }
  .in-disc { font-size: 13.5px; padding: 12px 14px; }
  .in-form { padding: 16px; }
}
/* phones and touch screens: every control on this page is at least 40 px tall (segs match the 40 px tabs above them) */
@media (max-width: 600px), (pointer: coarse) {
  .in-controls .seg button, .seg.in-costseg button, .karat-chips.in-chips button { height: 40px; }
  .in-controls .seg button, .seg.in-costseg button { min-width: 44px; flex-shrink: 0; } /* "21K" is narrow */
  .in-state .btn.sm { height: 40px; }
  .in-details summary { min-height: 40px; }
  /* the source link: a taller hit area that does not move the text around it */
  .in-note a { display: inline-block; padding-block: 10px; margin-block: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .in-pend-dot { animation: none; }
  .in-dial, .in-range, .in-prog span, .in-sout { animation: none; transition: none; }
  .in-spin { animation-duration: 3s; }
}
