/* TGAA Intelligence – iOS-lag (v2.10-ios). Lastes bare med media="(max-width: 760px), (display-mode: standalone)",
   så PC-visningen er uendret. Apple Human Interface Guidelines så tett som en webapp tillater: systemskrift, Large Title,
   inset grouped lister, iOS-segmenter, fast fanelinje med blur og iOS systemfarger (lys/mørk). Innhold, tall, rangering
   og rekkefølge er de samme som på nettsiden; bare utseende og navigasjon er tilpasset.
   «.standalone» settes på <html> i base.html når siden er åpnet fra Hjem-skjermen. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --mono: var(--font);
  --bg: #F2F2F7; --surface: #FFFFFF; --surface-2: #EEEEF0; --ink: #000000; --ink-2: rgba(60, 60, 67, .6); --muted: rgba(60, 60, 67, .6); --ink-3: rgba(60, 60, 67, .3);
  --line: #C6C6C8; --line-2: #C6C6C8; --link: #007AFF; --accent: #007AFF; --accent-2: #0062CC; --brand: #000000; --brand-ink: #FFFFFF;
  --ios-g: #34C759; --ios-r: #FF3B30; --ios-y: #FF9F0A; --ios-b: #007AFF; --fill: rgba(120, 120, 128, .12); --fill-2: rgba(120, 120, 128, .16);
  /* Tekstfarger med lesbar kontrast på hvit/grå (systemfargenes «tilgjengelige» varianter); flater bruker systemfargene. */
  --opp: #248A3D; --ned: #D70015; --amber: #B25000; --amber-bg: rgba(255, 159, 10, .16);
  --kjop: #248A3D; --kjop-bg: rgba(52, 199, 89, .14); --selg: #FF3B30; --selg-bg: rgba(255, 59, 48, .12);
  --bar: rgba(249, 249, 249, .86); --nav: rgba(242, 242, 247, .86); --skygge: none;
  --r: 14px; --r-s: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #FFFFFF; --ink-2: rgba(235, 235, 245, .6); --muted: rgba(235, 235, 245, .6); --ink-3: rgba(235, 235, 245, .3);
  --line: #38383A; --line-2: #48484A; --link: #0A84FF; --accent: #0A84FF; --accent-2: #409CFF; --brand: #FFFFFF; --brand-ink: #000000;
  --ios-g: #30D158; --ios-r: #FF453A; --ios-y: #FFD60A; --ios-b: #0A84FF; --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .32);
  --opp: #30D158; --ned: #FF453A; --amber: #FFD60A; --amber-bg: rgba(255, 214, 10, .15);
  --kjop: #30D158; --kjop-bg: rgba(48, 209, 88, .16); --selg: #FF453A; --selg-bg: rgba(255, 69, 58, .16);
  --bar: rgba(22, 22, 24, .84); --nav: rgba(0, 0, 0, .8);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #FFFFFF; --ink-2: rgba(235, 235, 245, .6); --muted: rgba(235, 235, 245, .6); --ink-3: rgba(235, 235, 245, .3);
  --line: #38383A; --line-2: #48484A; --link: #0A84FF; --accent: #0A84FF; --accent-2: #409CFF; --brand: #FFFFFF; --brand-ink: #000000;
  --ios-g: #30D158; --ios-r: #FF453A; --ios-y: #FFD60A; --ios-b: #0A84FF; --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .32);
  --opp: #30D158; --ned: #FF453A; --amber: #FFD60A; --amber-bg: rgba(255, 214, 10, .15);
  --kjop: #30D158; --kjop-bg: rgba(48, 209, 88, .16); --selg: #FF453A; --selg-bg: rgba(255, 69, 58, .16);
  --bar: rgba(22, 22, 24, .84); --nav: rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- grunnlag ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); font-size: 17px; line-height: 1.35; letter-spacing: -.41px; -webkit-font-smoothing: antialiased; padding-bottom: calc(49px + env(safe-area-inset-bottom, 0px)); }
body, .num, .mono { font-family: var(--font); }
.num, .mono, .hk-tall, .hk-kurs, .ios-rad-k { font-variant-numeric: tabular-nums; }
p { letter-spacing: -.24px; }
.liten, .fg-meta, .v3-lenker, .graf-forklaring, small { font-size: 13px; letter-spacing: -.08px; color: var(--ink-2); }
h1 { font-size: 28px; font-weight: 700; letter-spacing: .36px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: .38px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.41px; }
.h-liten, .overskrift-liten { font-size: 13px; font-weight: 400; letter-spacing: -.08px; color: var(--ink-2); text-transform: uppercase; }
a { color: var(--link); }
.innhold { padding: 6px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.seksjon { margin: 22px 0; }
.kort, .v4-kort, .v4-beslut, .hk, .kpi, .tabell-ramme, .graf, .tk-ramme, .nyhetsliste.kompakt, .instrument, .diagramkort, .v3-beslut, .v3-tall, .v3-flis {
  background: var(--surface); border: 0; border-radius: 14px; box-shadow: none;
}
.kort { padding: 12px 14px; }
.tabell th, .tabell td { border-color: var(--line); }
.tabell thead th { background: var(--surface); color: var(--ink-2); font-weight: 400; letter-spacing: -.08px; }
a, button, summary, [role="button"] { touch-action: manipulation; }

/* ---------- signal (samme språk: grønt = kjøp når kravene er oppfylt, gult = betinget/vent, rød ramme ⛔ = unngå, rød fylt ▼ = selg, nøytral = info) ---------- */
.sig { font-size: 13px; font-weight: 600; letter-spacing: -.08px; text-transform: none; padding: 3px 10px; gap: 5px; border-width: 1.5px; line-height: 1.25; }
.sig-s { font-size: 13px; }
.sig-g { background: var(--kjop-bg); color: var(--kjop); border-color: transparent; }
.sig-y { background: var(--amber-bg); color: var(--amber); }
.sig-n { background: var(--fill); color: var(--ink-2); }
.sig-ro { background: transparent; color: var(--ned); border-color: var(--ios-r); }
.sig-r { background: var(--ios-r); color: #FFFFFF; }
.sig-stor { font-size: 15px; padding: 4px 12px; } .sig-stor .sig-s { font-size: 15px; }

/* ---------- iOS-segmentkontroll ---------- */
.segment { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 0; }
.segment button { flex: 1 1 0; min-height: 32px; font-size: 13px; font-weight: 500; color: var(--ink); border-radius: 7px; padding: 4px 8px; letter-spacing: -.08px; transition: background-color .2s ease; }
.segment button.aktiv { background: var(--surface); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
:root[data-theme="dark"] .segment button.aktiv { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segment button.aktiv { background: #636366; } }
.knapp-liten { min-height: 32px; border-radius: 8px; border: 0; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 500; }
.knapp-liten.aktiv { background: var(--ios-b); color: #FFFFFF; }

/* ---------- Large Title og navigasjonslinje ---------- */
.ios-stor { display: block; padding: 2px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.ios-lt { display: block; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .37px; margin: 4px 0 0; }
.ios-under { display: block; font-size: 13px; color: var(--ink-2); margin: 0 0 4px; }

/* ---------- fanelinje ---------- */
.ios-tabbar { display: flex; position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; justify-content: space-around; align-items: flex-start;
  height: calc(49px + env(safe-area-inset-bottom, 0px)); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: inset 0 .5px 0 var(--line); }
.ios-tabbar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; min-height: 49px; padding-top: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: .1px; color: #8E8E93; text-decoration: none; transition: transform .12s ease, opacity .12s ease; }
.ios-tabbar a.aktiv { color: var(--ios-b); }
.ios-tabbar a:active { opacity: .6; }
.ios-tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ios-tabbar svg .f { fill: currentColor; stroke: none; }
.ios-tabbar a.aktiv svg path:first-child { fill: currentColor; fill-opacity: .14; }

/* ---------- «Mer»-ark (bunnark) ---------- */
.ios-ark { display: none; position: fixed; inset: 0; z-index: 90; }
.ios-ark:target, .ios-ark.apen { display: block; }
.ios-ark-bak { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); animation: ios-fade .2s ease; }
.ios-ark-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); border-radius: 12px 12px 0 0;
  padding: 6px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); animation: ios-opp .25s cubic-bezier(.2, .8, .2, 1); }
.ios-ark-topp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; }
.ios-ark-topp h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.41px; }
.ios-ark-lukk { justify-self: end; font-size: 17px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
.ios-ark-sok .sok { display: block; margin: 0 0 16px; }
.ios-ark-sok .sok input { width: 100%; max-width: none; font-size: 17px; min-height: 36px; border: 0; border-radius: 10px; background: var(--fill); color: var(--ink); padding: 7px 12px; }
.ios-ark-sok .sok input::placeholder { color: var(--ink-2); }
.ios-ark-sok .sok-resultat { position: static; width: auto; margin-top: 8px; max-height: none; border: 0; border-radius: 12px; box-shadow: none; }
.ios-ark-sok .sok-resultat a { min-height: 44px; border-color: var(--line); }
:root[data-theme="dark"] .ios-ark-panel { background: #1C1C1E; } :root[data-theme="dark"] .ios-ark .ios-gruppe { background: #2C2C2E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ios-ark-panel { background: #1C1C1E; } :root:not([data-theme="light"]) .ios-ark .ios-gruppe { background: #2C2C2E; } }
@keyframes ios-opp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ios-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- inset grouped lister ---------- */
.ios-gruppe { list-style: none; margin: 0 0 22px; padding: 0 0 0 16px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.ios-gruppe > li { border-bottom: .5px solid var(--line); }
.ios-gruppe > li:last-child { border-bottom: 0; }
.ios-gruppe a, .ios-gruppe button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 11px 16px 11px 0; font: inherit; font-size: 17px;
  color: var(--ink); background: none; border: 0; text-align: left; text-decoration: none; cursor: pointer; }
.ios-gruppe a::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-top: 2px solid var(--ink-3); transform: rotate(45deg); margin-right: 4px; flex: none; }
.ios-gruppe a[aria-current="page"] { color: var(--ios-b); }
.ios-gruppe button { color: var(--ios-b); }
.ios-gruppe a:active, .ios-gruppe button:active { background: var(--fill); }
.ios-gruppe-h { display: block; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: -.08px; color: var(--ink-2); margin: 22px 16px 7px; }
.ios-bare { display: block; }
.ios-verdier li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px 11px 0; min-height: 44px; font-size: 17px; }
.ios-verdier li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- topp (nettleser på smal skjerm) og ferskhet ---------- */
.topp { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
.topp-inner, .strip-inner { border: 0; box-shadow: none; border-radius: 14px; }
.ferskhet { background: transparent; border: 0; color: var(--ink-2); font-size: 13px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.ferskhet-inner { padding: 0 2px; gap: 0 10px; background: none; border: 0; border-radius: 0; line-height: 1.4; font-size: 12px; }
.ferskhet .fersk-ingen, .ferskhet .fersk-forsinket { font-size: 13px; }
.ferskhet strong { color: var(--ink); font-weight: 600; }
.bunn { background: transparent; border-top: .5px solid var(--line); }

/* ---------- Oversikt (forside) ---------- */
.v4-beslut { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px 14px; margin: 10px 0 12px; }
.v4-h1 { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 20px; line-height: 1.22; letter-spacing: .38px; flex: none; }
.v4-tall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.v4-t { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border-radius: 10px; background: var(--fill); color: var(--ink-2);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: normal; text-align: center; line-height: 1.15; border: 1.5px solid transparent; }
.v4-t b { font-size: 20px; line-height: 1.2; color: var(--ink); }
.v4-tl { display: block; font-size: 10px; letter-spacing: -.2px; white-space: nowrap; }
.v4-t.y { background: var(--amber-bg); color: var(--amber); } .v4-t.y b { color: var(--amber); }
.v4-t.g { background: var(--kjop-bg); color: var(--kjop); } .v4-t.g b { color: var(--kjop); }
.v4-t.r { background: transparent; border-color: var(--ios-r); color: var(--ned); } .v4-t.r b { color: var(--ned); }
.v4-t.null { opacity: .45; }
.v4-tid { font-size: 13px; color: var(--ink-2); }
.v4-marked { gap: 0; margin-bottom: 8px; }
.v4-kort { padding: 12px 14px; margin-bottom: 12px; }
.v4-kh { gap: 10px; margin-bottom: 10px; }
.v4-kh h2 { flex: 1 1 100%; margin: 0; font-size: 20px; }
.v4-kh .segment { flex: 1 1 100%; }
.fg-leg { gap: 4px 14px; font-size: 13px; } .fg-leg b { font-size: 13px; }
.sk-liste { gap: 0; }
.sk { grid-template-columns: minmax(78px, 8em) 1fr 70px; font-size: 15px; padding: 7px 0; border-bottom: .5px solid var(--line); }
.sk:last-child, .sk-skille { border-bottom: 0; }
.sk b { font-size: 15px; }
.sk-b { height: 8px; border-radius: 4px; background: var(--fill); } .sk-b i { border-radius: 4px; }
.sk-b i.p { background: var(--ios-g); } .sk-b i.m { background: var(--ios-r); }
.sk-alle summary { font-size: 15px; min-height: 44px; display: flex; align-items: center; }
/* Aksjegruppene vises som lister; kortene (med grafer) er for PC. Rekkefølge, rangering og sortering er de samme. */
.v4-aksjer .v4-gh, .v4-plukk, .v4-aksjer .hk-rad { display: none; }
.v4-gh-rad { display: block; margin-top: 0; }
.ios-gh { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 4px 8px; }
.ios-gh h2 { margin: 0; font-size: 20px; }
.ios-gh span { font-size: 15px; color: var(--ink-2); }
.sorter { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin: 0 0 10px; }
.sorter .knapp-liten { flex: 1 1 0; background: transparent; color: var(--ink); border-radius: 7px; }
.sorter .knapp-liten.aktiv { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.ios-liste { display: block; list-style: none; margin: 0 0 6px; padding: 0 0 0 16px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.ios-liste > li { border-bottom: .5px solid var(--line); }
.ios-liste > li:last-child { border-bottom: 0; }
.ios-liste > li[hidden] { display: none; }
.ios-rad { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; min-height: 60px; padding: 9px 12px 9px 0; color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
.ios-rad:hover { text-decoration: none; }
.ios-rad:active { background: var(--fill); }
.ios-rad-v { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ios-rad-1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ios-tick { font-size: 17px; font-weight: 600; letter-spacing: -.41px; }
.ios-rad-1 .sig { font-size: 12px; padding: 2px 8px; } .ios-rad-1 .sig-s { font-size: 12px; }
.ios-rad-2, .ios-rad-3 { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.08px; }
.ios-rad-3 { font-size: 12px; color: var(--ink-3); }
.ios-rad-k { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.25; }
.ios-rad-k b { font-size: 17px; font-weight: 600; }
.ios-rad-k span { font-size: 13px; font-weight: 600; }
.ios-rad-k small { font-size: 12px; color: var(--ink-2); }
.ios-chev, .ios-gruppe .ios-chev { width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-top: 2px solid var(--ink-3); transform: rotate(45deg); justify-self: center; }
.opp { color: var(--opp); } .ned { color: var(--ned); } .noytral { color: var(--ink-2); }
.kort-rad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.instrument { padding: 10px 12px; }
.kpi-rad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { padding: 10px 12px; }
.nyhet-rad { min-height: 44px; }

/* ---------- aksjedetalj ---------- */
/* Rekkefølge som i mockupen: kurs, graf, PLAN, STØTTE, deretter RSI/MACD og forklaring. */
.seksjon[aria-labelledby="graf-h"] { display: flex; flex-direction: column; }
.seksjon[aria-labelledby="graf-h"] > .seksjon-topp { order: 1; } .seksjon[aria-labelledby="graf-h"] > #graf { order: 2; }
.seksjon[aria-labelledby="graf-h"] > .ios-gruppe-h { order: 3; } .seksjon[aria-labelledby="graf-h"] > .nivastripe { order: 4; }
.seksjon[aria-labelledby="graf-h"] > .ios-gruppe-h ~ .ios-gruppe-h { order: 5; } .seksjon[aria-labelledby="graf-h"] > .ios-verdier { order: 6; margin-bottom: 8px; }
.seksjon[aria-labelledby="graf-h"] > #graf-rsi, .seksjon[aria-labelledby="graf-h"] > #graf-macd { order: 7; } .seksjon[aria-labelledby="graf-h"] > .graf-forklaring { order: 8; }
.seksjon[aria-labelledby="graf-h"] > .tomtilstand { order: 2; }
/* I appen viser navigasjonslinjen ticker og tilbake; global status vises på detaljsider bare når den varsler noe. */
.standalone body:has(.ios-tilbake) .ferskhet .fersk-el { display: none; }
.standalone body:has(.ios-tilbake) .ferskhet:not(:has(.fersk-ingen, .fersk-forsinket:not([hidden]))) { display: none; }
.aksje-topp { gap: 6px; margin-bottom: 12px; }
.aksje-topp h1 { font-size: 20px; line-height: 1.2; letter-spacing: .35px; margin: 0; }
.aksje-topp .overskrift-liten { text-transform: none; font-size: 15px; letter-spacing: -.24px; }
.aksje-kurs .num.stor { font-size: 40px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.aksje-kurs .num.stor .liten { font-size: 17px; font-weight: 500; letter-spacing: -.41px; }
.aksje-kurs > div:nth-child(2) { font-size: 17px; font-weight: 600; }
.graf { border-radius: 14px; }
.seksjon-topp .graf-verktoy { flex: 1 1 100%; }
.graf-verktoy .knapp-liten { white-space: nowrap; }
.graf-verktoy { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 0; }
.graf-verktoy .knapp-liten { flex: 1 1 0; background: transparent; color: var(--ink); border-radius: 7px; }
.graf-verktoy .knapp-liten.aktiv { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.nivastripe { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0 0 0 16px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.ns { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 2px 6px; padding: 11px 16px 11px 0; min-height: 44px; border: 0; border-left: 0 !important;
  border-bottom: .5px solid var(--line); border-radius: 0; background: none; }
.ns:last-child { border-bottom: 0; }
.ns-k { font-size: 17px; color: var(--ink); text-transform: none; letter-spacing: -.41px; }
.ns b { font-size: 17px; font-weight: 400; }
.ns .liten { font-size: 17px; color: inherit; }
.ns-stopp .liten::before, .ns-maal .liten::before { content: "· "; }
.ns-stopp b, .ns-stopp .liten { color: var(--ned); } .ns-maal b, .ns-maal .liten { color: var(--opp); } .ns-sone b { color: var(--ink); }
.ns-sone .liten, .ns:not(.ns-stopp):not(.ns-maal):not(.ns-sone) .liten { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.ns-sone { order: 1; } .ns-stopp { order: 2; } .ns-maal { order: 3; } .ns:not(.ns-stopp):not(.ns-maal):not(.ns-sone):not(.ns-na) { order: 5; }
.ns-na { display: none; }
.nivastripe + .ios-gruppe-h, .graf-forklaring + .ios-gruppe-h { margin-top: 22px; }
.chips { gap: 6px; } .chip-rund { background: var(--fill); }

/* ---------- tilbakemelding ved trykk og bevegelse ---------- */
.ios-rad, .ios-gruppe a, .ios-gruppe button, .segment button, .knapp-liten, .ios-tabbar a { -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- dra ned for å oppdatere ---------- */
.ios-ptr { display: flex; position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 75; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.ios-ptr span { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--fill-2); border-top-color: var(--ink-2); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.ios-ptr.klar span, .ios-ptr.laster span { border-top-color: var(--ios-b); }
.ios-ptr.laster span { animation: ios-snurr .8s linear infinite; }
@keyframes ios-snurr { to { transform: rotate(360deg); } }

/* ---------- standalone (åpnet fra Hjem-skjermen) ---------- */
.standalone body { padding-top: calc(env(safe-area-inset-top, 0px) + 44px); }
.standalone body:has(.ios-lt) { padding-top: env(safe-area-inset-top, 0px); }
.standalone .topp, .standalone .meny-knapp, .standalone .nav, .standalone .hopp { display: none !important; }
.standalone .brodsmule { display: none; }
.standalone .ios-navbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; position: fixed; z-index: 65; left: 0; right: 0; top: 0;
  height: calc(44px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  background: transparent; transition: background-color .2s ease, box-shadow .2s ease; }
.standalone .ios-navbar.rullet { background: var(--nav); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: inset 0 -.5px 0 var(--line); }
.standalone body:not(:has(.ios-lt)) .ios-navbar { background: var(--nav); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.ios-nb-t { font-size: 17px; font-weight: 600; letter-spacing: -.41px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; transition: opacity .2s ease; }
.ios-navbar.skjul-tittel .ios-nb-t { opacity: 0; }
.ios-nb-h { justify-self: end; }
.ios-tilbake, .ios-del { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px; font: inherit; font-size: 17px; letter-spacing: -.41px; color: var(--ios-b); background: none; border: 0; text-decoration: none; cursor: pointer; }
.ios-tilbake::before { content: ""; width: 11px; height: 11px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); margin: 0 4px 0 4px; border-radius: 1px; }
.ios-tilbake:active, .ios-del:active { opacity: .4; }
.standalone .ios-stor { padding-top: 8px; }
.standalone .uten-nett { top: calc(44px + env(safe-area-inset-top, 0px)); }

/* ---------- Følger (v2.12-ios): favoritter lagret lokalt på enheten ---------- */
.ios-fav { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 6px; background: none; border: 0; color: var(--ios-b); cursor: pointer; }
.ios-fav svg, .ios-fav-linje svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ios-fav.pa svg, .ios-fav-linje.pa svg { fill: currentColor; }
.ios-fav:active, .ios-fav-linje:active { opacity: .4; }
.ios-nb-h { display: flex; align-items: center; }
.ios-fav-linje { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--fill); color: var(--ios-b); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ios-fav-linje svg { width: 18px; height: 18px; }
.standalone .ios-fav-linje { display: none; }
.ios-mine[hidden] { display: none; }
.ios-mine-fot { margin: 6px 16px 4px; font-size: 12px; color: var(--ink-2); }
/* Sveip fra venstre kant for å gå tilbake (standalone har ingen innebygd tilbake-bevegelse) */
.ios-sveip { position: fixed; z-index: 80; left: 6px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 18px; background: var(--nav); box-shadow: 0 2px 10px rgba(0,0,0,.18); opacity: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; transition: opacity .12s ease; }
.ios-sveip::before { content: ""; width: 9px; height: 9px; border-left: 2.5px solid var(--ios-b); border-bottom: 2.5px solid var(--ios-b); transform: translateX(2px) rotate(45deg); }
.ios-sveip.klar { background: var(--ios-b); } .ios-sveip.klar::before { border-color: #fff; }

/* Kursgraf med sju perioder (v2.13): alle får plass i én rad uten horisontal rulling */
.graf-verktoy .knapp-liten { min-width: 0; padding-left: 0; padding-right: 0; font-size: 13px; min-height: 44px; font-variant-numeric: tabular-nums; }

/* Informasjonsfelt på to linjer (v2.13): dato · rapport · kurs / oppdatert · neste · børsstatus. Varsler (INGEN HANDEL, forsinket) står som før. */
.ferskhet { padding-top: 4px; }
.ferskhet .fersk-el, .ios-under { display: none; }
.ferskhet-inner { display: block; line-height: 1.3; }
.fersk-kompakt { display: block; font-size: 11px; line-height: 1.3; color: var(--ink-2); letter-spacing: 0; }
.fersk-kompakt .fk-l { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fersk-kompakt b { color: var(--ink); font-weight: 600; }
.fersk-kompakt a { color: inherit; text-decoration: none; }
.fk-p { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 4px 0 2px; vertical-align: 0; background: var(--ios-r, #FF3B30); }
.fk-p.apen { background: var(--ios-g, #34C759); }
.ferskhet .fersk-ingen, .ferskhet .fersk-forsinket { margin-top: 4px; font-size: 12px; padding: 3px 8px; }
.v4-tid { display: none; }   /* tidspunktene står i informasjonsfeltet over */
.fk-fase { color: var(--ink-2); }
@media (max-width: 359px) { .fk-fase { display: none; } }
