/* Zen: gemeinsame Farben, Typografie, Abstände und Oberflächen. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/css/fonts/InterVariable.woff2') format('woff2'); }
:root {
  color-scheme: dark;
  --bg: #080B0A;
  --sidebar: #101713;
  --surface: #0D1414;
  --surface-2: #141F1D;
  --surface-3: #1D2A27;
  --surface-raised: var(--surface-2);
  --line: rgba(217, 232, 228, .085);
  --line-strong: rgba(217, 232, 228, .17);
  --text: #F5F7F5;
  --text-2: #C0CACC;
  --muted: #9BA8AF;
  --accent: #9BFF5A;
  --teal: #00C6A7;
  --gold: var(--accent);
  --gold-bright: var(--accent);
  --m-gold: #9BFF5A;
  --m-silber: #75D8CB;
  --m-platin: #80B7F4;
  --m-palladium: #B9A0F5;
  --gold-deep: #76BF2F;
  --gold-hover: #B0FF7A;
  --green: var(--teal);
  --red: #FF8585;
  --warn: #E8C783;
  --on-accent: #101709;
  --on-gold: var(--on-accent);
  --on-green: #06221A;
  --on-red: #321313;
  --green-titel: #4ADBB9;
  --green-titel-2: #83EBD0;
  --green-voll: #38DBB5;
  --red-titel: #FF9E9E;
  --red-titel-2: #FFC0B8;
  --red-voll: #FF8C8C;
  --accent-soft: rgba(155, 255, 90, .09);
  --positive-soft: rgba(0, 198, 167, .09);
  --negative-soft: rgba(255, 133, 133, .09);
  --warning-soft: rgba(232, 199, 131, .08);
  --track: rgba(190, 200, 193, .16);
  --track-2: rgba(190, 200, 193, .12);
  --hover: rgba(245, 247, 245, .025);
  --hover-2: rgba(163, 255, 75, .045);
  --backdrop: rgba(1, 7, 4, .78);
  --schatten-dialog: 0 28px 90px rgba(0, 0, 0, .52);
  --schatten-toast: 0 12px 40px rgba(0, 0, 0, .4);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --chart-grid: rgba(225, 235, 232, .045);
  --chart-label: #7B8E91;
  --chart-crosshair: #64776A;
  --chart-tip-bg: #26332B;
  --chart-tip-text: #F5F7F5;
  --chart-dot-ring: #080B0A;
  --placeholder: #6D7B71;
  --fehler-text: #FFABAB;
  --neutral-flaeche: #64766A;
  --on-neutral: #F5F7F5;
  --dot-still: #5D6C62;
  --chev: #607266;
  --topbar: rgba(8, 11, 10, .9);
}

/* Helle Fassung: ruhige Steinflächen, weiße Karten und präzise Waldgrün-Akzente. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7F2;
  --sidebar: #EEF2F0;
  --rail: #F0F4F2;
  --surface: #FFFFFF;
  --surface-2: #F0F3F1;
  --surface-3: #E4EBE6;
  --surface-raised: #F8FAF8;
  --line: rgba(38, 66, 52, .13);
  --line-strong: rgba(38, 66, 52, .25);
  --text: #192D27;
  --text-2: #485D55;
  --muted: #596D63;
  --accent: #22684B;
  --teal: #087568;
  --gold: var(--accent);
  --gold-bright: #28734C;
  --m-gold: #347547;
  --m-silber: #0E8077;
  --m-platin: #2D6EA7;
  --m-palladium: #8050AE;
  --gold-deep: #194E39;
  --gold-hover: #194E39;
  --green: var(--teal);
  --red: #B44148;
  --warn: #8A5A10;
  --on-accent: #FFFFFF;
  --on-gold: #FFFFFF;
  --on-green: #FFFFFF;
  --on-red: #FFFFFF;
  --button-primary-bg: #C6ED9F;
  --button-primary-hover: #B3E287;
  --on-primary: #183015;
  --green-titel: #08765E;
  --green-titel-2: #075D4D;
  --green-voll: #087C68;
  --red-titel: #A5353E;
  --red-titel-2: #8E2530;
  --red-voll: #B44148;
  --accent-soft: rgba(34, 104, 75, .075);
  --positive-soft: rgba(8, 124, 104, .075);
  --negative-soft: rgba(180, 65, 72, .075);
  --warning-soft: rgba(173, 123, 34, .09);
  --track: rgba(55, 87, 70, .15);
  --track-2: rgba(55, 87, 70, .1);
  --hover: rgba(40, 96, 66, .04);
  --hover-2: rgba(40, 96, 66, .065);
  --backdrop: rgba(33, 48, 34, .3);
  --schatten-dialog: 0 26px 85px rgba(28, 54, 40, .16), 0 5px 18px rgba(28, 54, 40, .06);
  --schatten-toast: 0 10px 34px rgba(28, 54, 40, .12);
  --chart-label: #596D63;
  --chart-grid: rgba(50, 80, 44, .11);
  --chart-crosshair: #718C70;
  --chart-tip-bg: #FFFFFF;
  --chart-tip-text: #192D27;
  --chart-dot-ring: #FFFFFF;
  --chart-basis-physical: #8A6715;
  --chart-basis-savings: #087C68;
  --chart-basis-combined: #8050AE;
  --chart-savings-marker: #087C68;
  --marker: #8A6715;
  --placeholder: #596D63;
  --fehler-text: #A73540;
  --neutral-flaeche: #607460;
  --on-neutral: #FFFFFF;
  --dot-still: #788876;
  --chev: #70826F;
  --topbar: rgba(245, 247, 242, .94);
}

/* Grundelemente und eindeutige Funktionszustände. */
* { box-sizing: border-box; }
html { scrollbar-color: var(--surface-3) var(--bg); scrollbar-width: thin; }
[hidden] { display: none !important; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--on-accent); background: var(--accent); }


body {
  margin: 0; min-width: 320px; min-height: 100vh;
  color: var(--text); background: radial-gradient(ellipse at 92% 0, rgba(0, 198, 167, .035), transparent 38%), var(--bg);
  font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 600; letter-spacing: -.025em; line-height: 1.35;
}
a {
  color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.muted { color: var(--muted); }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }

.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card {
  width: 100%; max-width: 400px; padding: 36px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.auth-logo {
  width: 48px; height: 48px; margin: 0 auto 24px; display: grid; place-items: center;
  border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 750; font-size: 18px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card form { margin-top: 28px; text-align: left; }
.auth-card label { display: block; margin-bottom: 7px; font-size: 13px; color: var(--muted); }
.auth-card input { margin-bottom: 16px; }

input, select, textarea {
  width: 100%; min-width: 0; padding: 11px 13px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus {
  outline: none; background: var(--surface-2); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 68px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 15px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  font: 600 12px/1.4 var(--font); text-decoration: none; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover {
  color: var(--text); background: var(--surface-3); border-color: var(--line-strong);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700;
}
.btn-primary:hover {
  background: var(--gold-hover); border-color: var(--gold-hover); color: var(--on-accent);
}
.btn-block { width: 100%; justify-content: center; margin-top: 12px; padding: 13px; }
.btn-sm {
  min-height: 32px; padding: 7px 11px; font-size: 11px;
}
.btn-danger:hover {
  color: var(--red); background: var(--negative-soft); border-color: rgba(255, 133, 133, .25);
}
.btn[disabled] {
  opacity: .4; cursor: not-allowed; transform: none;
}

.form-error {
  margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(255, 133, 133, .18);
  border-radius: 8px; background: var(--negative-soft); color: var(--fehler-text); font-size: 12px;
}

.topbar {
  position: relative; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--topbar);
}
.brand {
  display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 650; white-space: nowrap;
}
.brand .dot {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800;
}
.topbar .spacer { flex: 1; }

.topbar-icons {
  display: flex; align-items: center; gap: 6px;
}
.topbar .user {
  color: var(--muted); font-size: 12px;
}
.topbar-menu { position: relative; }
.topbar-menu > summary { list-style: none; }
.topbar-menu > summary::-webkit-details-marker { display: none; }
.topbar-menu[open] > summary { background: var(--surface-3); }
.topbar-menu-content { position: absolute; top: calc(100% + 9px); right: 0; z-index: 25; display: grid; gap: 4px; min-width: 184px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--schatten-dialog); }
.topbar-menu-content .btn { justify-content: flex-start; white-space: nowrap; border-radius: 7px; }
.topbar-menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

main {
  min-width: 0; max-width: 1120px; margin: 0 auto; padding: 24px 24px 48px;
}
section {
  margin-bottom: 24px;
}
.section-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 0 0 16px;
}
.section-head h2 {
  margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.025em;
}
.section-head .spacer { flex: 1; }
.section-head select { width: auto; min-width: 130px; max-width: 220px; }

.card {
  min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}

.grid {
  display: grid; gap: 16px; min-width: 0;
}
.two-col { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }

.prices, .analysis { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 520px) {
  .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 620px) {
  .analysis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1060px) {
  .prices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hero {
  padding: 24px 0; text-align: center;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); font-size: 12px;
}
.hero-pill b { color: var(--muted); font-weight: 500; }
.hero-amount {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-top: 18px;
}
.hero-amount strong {
  font-size: clamp(38px, 5.6vw, 56px); font-weight: 600; letter-spacing: -.05em; line-height: 1.1;
}
.hero-unit { color: var(--muted); font-size: clamp(15px, 1.7vw, 19px); font-weight: 400; }
.hero-change { margin-top: 12px; font-size: 16px; font-weight: 500; }
.hero-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.hero-meta span + span::before { content: '·'; margin: 0 8px; opacity: .55; }
.hero-meta b { color: var(--text-2); font-weight: 500; }

.dashboard {
  max-width: none; margin: 0; padding-top: 24px;
}
.dashboard-hero {
  padding: 0; text-align: left; margin-bottom: 12px;
}
.dashboard-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; min-height: 58px;
}
.eyebrow {
  margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.dashboard-heading h1 {
  margin: 0; font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.dashboard-intro { flex: 1; min-width: 0; }
.heading-name { color: var(--accent); }
.portfolio-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.kpi {
  container-type: inline-size; position: relative; min-width: 0; min-height: 119px; padding: 13px 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: radial-gradient(ellipse at 0 0, rgba(114, 155, 142, .04), transparent 65%), linear-gradient(145deg, #111918, #0B1112);
  box-shadow: inset 0 1px 0 rgba(233, 246, 238, .018), 0 4px 12px rgba(0, 0, 0, .07);
}
.kpi-value {
  background: radial-gradient(ellipse at 0 0, rgba(155, 255, 90, .22), transparent 63%), radial-gradient(ellipse at 100% 100%, rgba(180, 255, 32, .18), transparent 54%), #101A14;
  border-color: rgba(155, 255, 90, .3); box-shadow: inset 0 1px 0 rgba(185, 255, 156, .1), 0 3px 18px rgba(61, 151, 41, .025);
}

/* Ein schmaler Lichtschweif umrundet nur den aktuellen Metallwert. */
@property --portfolio-beam-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .portfolio-kpis .kpi-value { isolation: isolate; }
  .portfolio-kpis .kpi-value > * { position: relative; z-index: 1; }
  .portfolio-kpis .kpi-value::before,
  .portfolio-kpis .kpi-value::after {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    border-radius: inherit; padding: 1.5px;
    pointer-events: none;
    background: conic-gradient(from var(--portfolio-beam-angle, 0deg),
      transparent 0deg 265deg,
      rgba(85, 215, 121, .05) 285deg,
      rgba(107, 242, 99, .24) 312deg,
      rgba(163, 255, 75, .7) 334deg,
      #D6FFB0 346deg,
      #A3FF4B 350deg,
      transparent 354deg 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: portfolio-border-beam 7s linear infinite;
  }
  .portfolio-kpis .kpi-value::after { padding: 3px; filter: blur(3px); opacity: .65; }
}
@keyframes portfolio-border-beam {
  to { --portfolio-beam-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-kpis .kpi-value::before,
  .portfolio-kpis .kpi-value::after { animation: none; }
}
.kpi h2 {
  display: flex; align-items: center; gap: 6px; margin: 0; font-size: 10px; line-height: 14px; font-weight: 450; color: var(--muted); letter-spacing: 0;
}
.kpi-icon { display: inline-flex; flex: 0 0 13px; width: 13px; height: 13px; align-items: center; color: var(--muted); }
.kpi-icon svg { display: block; width: 13px; height: 13px; }
.kpi-value .kpi-icon { color: var(--accent); }
.dashboard-hero .hero-amount {
  justify-content: flex-start; margin-top: 12px; gap: 4px; flex-wrap: nowrap;
}
.dashboard-hero .hero-amount strong {
  min-width: 0; font-size: clamp(18px, 17.5cqi, 30px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere; max-width: 100%;
}
.dashboard-hero .hero-unit { font-size: 8px; color: var(--muted); }
.kpi-amount, .dashboard-hero #hero-change {
  display: block; margin: 12px 0 0; font-size: clamp(17px, 19cqi, 28px); font-weight: 500;
  line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere;
}
.kpi-money-currency { display: block; margin-bottom: 2px; color: var(--muted); font-size: 8px; line-height: 8px; letter-spacing: 0; font-weight: 400; }
.kpi-money-number { display: block; min-width: 0; font-size: inherit; letter-spacing: inherit; }
.kpi p { margin: 8px 0 0; font-size: 8px; line-height: 12px; color: var(--muted); }
.kpi .kpi-return { margin-top: 5px; font-size: 9px; line-height: 12px; color: var(--text-2); }
.kpi small { display: block; margin-top: 3px; font-size: 8px; line-height: 11px; color: var(--muted); }
.kpi .kpi-link { margin-top: 5px; font-size: 8px; line-height: 11px; }
.dashboard-status {
  margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7;
}
.dashboard-status.warnung { color: var(--warn); }
.dashboard-status.fehler { color: var(--fehler-text); }
.dashboard-hero .hero-meta { margin: 7px 2px 0; font-size: 11px; }
.dashboard-hero .quick { margin: 0; justify-content: flex-end; gap: 8px; }
.dashboard-hero .quick button {
  min-height: 36px; padding: 8px 12px; flex-direction: row; gap: 7px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.dashboard-hero .quick button i { width: auto; height: auto; border-radius: 0; background: none; font-size: 15px; color: inherit; }
.dashboard-hero .quick button.accent {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.dashboard-hero .quick button.accent i { background: none; color: inherit; }
.section-context { margin-left: auto; font-size: 11px; color: var(--muted); }
.metal-overview {
  grid-template-columns: minmax(0, 1fr); gap: 0;
}
/* Portfolio: präzise Zahlen und ruhige, klar getrennte Karten. */
.overview-card {
  min-width: 0; min-height: 54px; display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1.6fr; align-items: center; gap: 10px;
  padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; transition: background .18s ease;
}
.overview-card:hover { background: var(--hover); }
.overview-card:nth-child(even) { background: rgba(215, 235, 224, .012); }
.market-overview { overflow: hidden; padding: 0; background: linear-gradient(135deg, rgba(221, 237, 231, .012), transparent 65%), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.market-overview .market-overview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.market-heading-copy { min-width: 0; }
.market-heading-copy h2 { margin: 0; font-size: 13px; font-weight: 600; }
.market-heading-copy p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.market-overview-header .portfolio-search { flex: 0 1 180px; margin: 0; }
.market-overview-header .portfolio-search input { min-height: 32px; }
.market-table-labels { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr .8fr .8fr; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(201, 229, 223, .025); color: var(--muted); font-size: 9px; letter-spacing: 0; }
.overview-head { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.overview-symbol {
  width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 27px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: color-mix(in srgb, currentColor 8%, transparent);
  border-radius: 7px; font-size: 9px; font-weight: 600;
}
.overview-head h3 {
  margin: 0; font-size: 10px; font-weight: 500;
}
.overview-price {
  margin: 0; font-size: 11px; font-weight: 500; letter-spacing: -.01em; line-height: 1.4;
}
.overview-price small, .overview-unit { margin-left: 3px; color: var(--muted); font-size: 8px; letter-spacing: 0; }
.overview-day { margin: 0; font-size: 9px; line-height: 1.5; }
.overview-stale { grid-column: 2 / -1; grid-row: 2; margin: 0; color: var(--warn); font-size: 10px; line-height: 1.5; }
.overview-facts {
  grid-column: 4; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; font-size: 10px;
}
.overview-facts > div { min-width: 0; display: grid; gap: 4px; }
.overview-facts dt { color: var(--muted); }
.overview-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.market-overview .overview-facts dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.overview-facts dd { overflow-wrap: anywhere; }
.overview-value { font-weight: 500; }
/* Auf schmalen Inhaltsflächen stehen Kurs, Tagesvergleich und Bestand
   in drei kurzen Zeilen. Die Werte bleiben vollständig und beschriftet. */
@container content (max-width: 600px) {
  .market-table-labels { display: none; }
  .market-overview .market-overview-header { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 13px 14px; }
  .market-heading-copy h2 { font-size: 14px; }
  .market-heading-copy p { font-size: 10px; }
  .market-overview-header .portfolio-search { flex: 1 1 100%; max-width: none; }
  .market-overview-header .portfolio-search input { min-height: 34px; font-size: 11px; }
  .overview-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "metal price" "change change" "facts facts"; gap: 7px 10px; min-height: 0; padding: 12px 14px; }
  .overview-head { grid-area: metal; gap: 7px; }
  .overview-head h3 { font-size: 12px; }
  .overview-symbol { flex-basis: 26px; width: 26px; height: 26px; font-size: 9px; }
  .overview-price { grid-area: price; text-align: right; font-size: 14px; overflow-wrap: anywhere; }
  .overview-unit { margin-left: 2px; font-size: 9px; }
  .overview-day { grid-area: change; display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; font-size: 10px; line-height: 1.3; }
  .overview-day .market-change-badge { padding: 2px 6px; font-size: 10px; line-height: 14px; }
  .overview-day .overview-date { display: inline; margin: 0; font-size: 9px; line-height: 1.3; }
  .overview-stale { grid-column: 1 / -1; grid-row: auto; font-size: 10px; }
  .overview-facts { grid-area: facts; gap: 12px; padding: 2px 0 0; border: 0; font-size: 11px; line-height: 1.4; }
  .overview-facts > div { gap: 2px; }
  .market-overview .overview-facts dt { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 9px; }
  .overview-facts dd { font-size: 11px; }
  .market-overview .market-footer { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; padding: 11px 14px; font-size: 9px; }
  .market-footer .dashboard-data-status { margin-left: auto; }
  .market-footer .dashboard-data-status > summary { font-size: 9px; }
}
.portfolio-chart {
  padding: 14px 16px 12px; margin-bottom: 12px;
}
.portfolio-chart .chart {
  height: 150px;
}
.portfolio-chart .section-head { gap: 10px; margin-bottom: 8px; }
.portfolio-chart .section-head h2 { font-size: 12px; }
.chart-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-left: auto; }
.chart-toolbar .chart-legend { margin: 0; gap: 10px; font-size: 8px; }
.chart-toolbar .chart-legend span { gap: 5px; }
.chart-toolbar .chart-legend i { width: 5px; height: 5px; }
.chart-legend.chart-header-legend { justify-content: flex-end; margin: -2px 0 4px; gap: 12px; font-size: 8px; line-height: 12px; }
.chart-legend.chart-header-legend span { gap: 5px; }
.chart-legend.chart-header-legend i { width: 5px; height: 5px; }
.market-change-badge { display: inline-flex; padding: 3px 7px; border-radius: 10px; background: var(--positive-soft); font-size: 9px; }
.overview-day.neg .market-change-badge { background: var(--negative-soft); }
.overview-date { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.portfolio-search { display: flex; align-items: center; gap: 8px; min-width: 120px; max-width: 210px; margin-left: auto; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); }
.portfolio-search input { width: 100%; min-width: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; font-size: 9px; }
.market-search-empty { padding: 18px; font-size: 11px; color: var(--muted); }
.chart-toolbar select { width: auto; min-width: 66px; max-width: 110px; height: 25px; padding: 4px 7px; border-radius: 5px; font-size: 8px; }
.chart-explanation { margin-top: 6px; }
.chart-explanation > summary { width: fit-content; color: var(--muted); font-size: 8px; line-height: 12px; cursor: pointer; }
.chart-explanation .chart-note { margin-top: 8px; font-size: 10px; }
.portfolio-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; min-height: 34px; margin: 14px 0 12px; }
.portfolio-tools h2 { margin: 0; font-size: 13px; font-weight: 500; }
.portfolio-tools .quick { display: flex; align-items: center; justify-content: flex-start; gap: 7px; margin: 0; }
.portfolio-tools .quick button { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; min-height: 31px; padding: 7px 10px; color: var(--text-2); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 9px; font-weight: 500; }
.portfolio-tools .quick button i { display: inline-grid; place-items: center; width: 12px; height: 12px; border: 0; border-radius: 0; background: none; color: inherit; font-size: 13px; }
.portfolio-tools .quick button.accent { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.portfolio-tools .quick button.accent i { color: inherit; background: none; }
@media (max-width: 560px) {
  .portfolio-tools { display: block; margin: 12px 0; }
  .portfolio-tools .quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .portfolio-tools .quick button { justify-content: center; width: 100%; min-width: 0; min-height: 36px; padding: 7px 5px; font-size: 10px; }
  .portfolio-tools .quick button i { flex: 0 0 12px; }
  .portfolio-tools .quick button i svg { width: 13px; height: 13px; }
}

.dashboard-data-status { position: relative; margin-left: auto; }
.dashboard-data-status > summary { color: var(--muted); font-size: 8px; cursor: pointer; line-height: 16px; }
.dashboard-data-status > summary::marker { color: var(--muted); }
.dashboard-data-status[open] { flex-basis: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.dashboard-data-status .dashboard-status { margin: 8px 0 0; font-size: 10px; }
.dashboard-data-status .hero-meta { margin-top: 6px; font-size: 9px; }
.market-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 16px; color: var(--muted); font-size: 8px; }
.market-footer a { color: var(--text-2); text-decoration: none; }
.portfolio-chart .chart-note { margin-bottom: 0; }
.details-heading {
  display: flex; align-items: baseline; gap: 14px; margin: 32px 0 16px;
}
.details-heading h2 { margin: 0; font-size: 15px; font-weight: 500; }
.details-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.dashboard-details {
  margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.dashboard-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 20px;
  cursor: pointer; list-style: none; transition: background .18s ease;
}
.dashboard-details > summary::-webkit-details-marker { display: none; }
.dashboard-details > summary strong {
  display: block; font-size: 13px; font-weight: 600;
}
.dashboard-details > summary small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.details-indicator {
  flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line);
  border-radius: 7px; color: var(--muted); font-size: 18px; font-weight: 400; transition: transform .18s ease, color .18s ease;
}
.dashboard-details[open] > summary .details-indicator { transform: rotate(45deg); }
.dashboard-details > summary:hover { background: var(--hover); }
.details-content {
  padding: 16px 20px 4px; border-top: 1px solid var(--line);
}
.details-content section { margin-bottom: 26px; }
.details-content .card { background: var(--surface-2); }
.details-content .section-note { max-width: 78ch; }
.dashboard-details > summary:focus-visible, .dashboard-hero .quick button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 860px) {
  .dashboard { padding-top: 22px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .dashboard-hero .quick { justify-content: flex-start; }
  .metal-overview { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 19px 16px; }
  .dashboard-hero .hero-amount strong { font-size: 32px; }
  .kpi-amount, .dashboard-hero #hero-change { font-size: 23px; }
}
@media (max-width: 560px) {
  .dashboard { padding-top: 18px; }
  .dashboard-heading { margin-bottom: 20px; }
  .portfolio-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .dashboard-hero .hero-amount { margin-top: 12px; }
  .dashboard-hero .hero-amount strong { font-size: clamp(21px, 17cqi, 30px); }
  .kpi-amount, .dashboard-hero #hero-change { margin-top: 13px; font-size: clamp(18px, 14cqi, 24px); }
  .kpi p { font-size: 10px; }
  .dashboard-hero .hero-meta { display: block; max-width: none; margin-inline: 2px; }
  .dashboard-hero .hero-meta span { display: inline; }
  .dashboard-hero .hero-meta span + span::before { content: '·'; }
  .section-context { margin-left: 0; font-size: 10px; }
  .portfolio-chart { padding: 18px 12px 14px; }
  .portfolio-chart .chart { height: 200px; }
  .details-heading { display: block; }
  .details-heading p { margin-top: 4px; }
  .dashboard-details > summary { padding: 16px; }
  .details-content { padding: 10px 10px 0; }
}

.quick {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 24px;
}
.quick button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0;
  background: none; border: none;
  color: var(--text-2);
  font: inherit; font-size: 12px;
  cursor: pointer;
}
.quick button i {
  width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 18px; font-style: normal;
  transition: background .18s ease, transform .18s ease;
}
.quick button:hover i { background: var(--surface-3); }
.quick button:active i { transform: scale(.93); }
.quick button.accent i { background: var(--gold); color: var(--on-gold); }
.quick button.accent:hover i { background: var(--gold-hover); }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.btn-icon {
  min-width: 34px; padding: 8px;
}
.btn-icon svg { display: block; }

.mond { opacity: 0; }
:root[data-theme="light"] .sonne { opacity: 0; }
:root[data-theme="light"] .mond { opacity: 1; }

.eye-slash { opacity: 0; transition: opacity .15s; }
body.privat .eye-slash { opacity: 1; }
body.privat .eye-open { opacity: .45; }

body.privat .verdeckt {
  filter: blur(9px);
  cursor: pointer;
  user-select: none;
}
body.privat .verdeckt:hover { filter: blur(7px); }
body.privat #chart-portfolio, body.privat #chart-allocation { filter: blur(11px); cursor: pointer; }

body.animiert .verdeckt,
body.animiert #chart-portfolio,
body.animiert #chart-allocation { transition: filter .28s ease; }
@media (prefers-reduced-motion: reduce) {
  body.animiert .verdeckt,
  body.animiert #chart-portfolio,
  body.animiert #chart-allocation { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.privat .verdeckt { transition: none; }
}

.live {
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px;
}
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: puls 2.4s ease-out infinite; }
.live.stale .dot-live { background: var(--dot-still); animation: none; }
@keyframes puls {
  0%   { box-shadow: 0 0 0 0 rgba(0, 198, 167, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(0, 198, 167, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 198, 167, 0); }
}
/* Price numbers keep their normal, readable color throughout an update. */
.price-card .big, .price-card .price-secondary, .overview-price { position: relative; padding-inline-end: 18px; }
.quote-number { display: inline-block; }
.quote-value { --quote-update-color: var(--teal); }
.quote-value.flash-up { --quote-enter-y: 2px; }
.quote-value.flash-down { --quote-enter-y: -2px; }
.quote-value :is(.quote-number, .quote-update-cue), .quote-value::after { pointer-events: none; }
.quote-value .quote-number { animation: quote-number-settle 620ms cubic-bezier(.2,.7,.2,1) both; }
.quote-update-cue { position: absolute; inset-inline-end: 0; top: 50%; display: grid; place-items: center; width: 13px; height: 16px; margin-top: -8px; color: var(--quote-update-color); font: 550 13px/1 var(--font); animation: quote-direction 1.8s ease-out both; }
.quote-update-cue[data-direction="up"]::before { content: '↗'; }
.quote-update-cue[data-direction="down"]::before { content: '↘'; }
.quote-value::after { content: ''; position: absolute; inset-inline: 0 18px; bottom: -2px; height: 1px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--quote-update-color), transparent); transform-origin: left center; animation: quote-trace 1.5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes quote-number-settle {
  from { transform: translateY(var(--quote-enter-y)); }
  to { transform: translateY(0); }
}
@keyframes quote-direction {
  0% { opacity: 0; transform: translateY(var(--quote-enter-y)); }
  18%, 62% { opacity: .85; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}
@keyframes quote-trace {
  0% { opacity: 0; transform: scaleX(.15); }
  30% { opacity: .45; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dot-live, .flash-up, .flash-down { animation: none; }
  .quote-value .quote-number, .quote-value .quote-update-cue, .quote-value::after { animation: none; }
  .quote-value .quote-number { transform: none; }
  .quote-value .quote-update-cue { opacity: .8; }
  .quote-value::after { opacity: 0; }
}

.unit-tabs {
  display: flex; gap: 3px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
}
.unit-tabs button {
  padding: 7px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px;
  font: 500 11px/1.35 var(--font); white-space: nowrap; cursor: pointer; transition: background .18s ease, color .18s ease;
}
.unit-tabs button[aria-pressed="true"] {
  color: var(--on-accent); background: var(--accent); border-color: var(--accent);
}

.price-card {
  min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.price-card .head { display: flex; align-items: center; gap: 9px; }
.price-card .swatch { width: 9px; height: 9px; border-radius: 50%; }
.price-card .name {
  font-weight: 600; font-size: 12px;
}
.price-card .big {
  margin-top: 14px;
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 400;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.price-card .unit { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.price-card .row {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 12px;
  color: var(--muted); font-size: 12px;
}
.price-card .row + .row { margin-top: 5px; }

.price-card .row > span:last-child { white-space: nowrap; }

.sub-line.warn, .chart-legend .warn { color: var(--warn); }

.feld-knopf { margin-top: 6px; }

#pruef-fazit {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 15px 17px;
  font-size: 14.5px; font-weight: 500;
}
#pruef-fazit .zeichen {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 14px; font-weight: 700; line-height: 1;
}
#pruef-fazit.ok { background: rgba(0, 198, 167, .12); color: var(--green); }
#pruef-fazit.ok .zeichen { background: var(--green); color: var(--on-green); }
#pruef-fazit.warnung { background: rgba(163, 255, 75, .12); color: var(--warn); }
#pruef-fazit.warnung .zeichen { background: var(--gold); color: var(--on-gold); }
#pruef-fazit.fehler { background: rgba(255, 133, 133, .15); color: var(--red); }
#pruef-fazit.fehler .zeichen { background: var(--red); color: var(--on-red); }

.pruef-zeile {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 10px;
  padding: 13px 16px;
  background: var(--surface); border-radius: var(--radius-sm);
}
.pruef-zeile > i {
  width: 9px; height: 9px; flex: 0 0 9px; margin-top: 6px;
  border-radius: 50%; background: var(--muted);
}
.pruef-zeile.ok > i { background: var(--green); }
.pruef-zeile.warnung > i { background: var(--gold); }
.pruef-zeile.fehler > i { background: var(--red); }
.pruef-zeile b { display: block; font-size: 13.5px; font-weight: 600; }
.pruef-zeile p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.pruef-zeile small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.pruef-stand { color: var(--muted); font-size: 12.5px; }

.chart-note {
  margin: 10px 0 0;
  max-width: 78ch;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.chart-note b { color: var(--text); font-weight: 500; }

.chip-label { color: var(--muted); font-size: 11px; letter-spacing: .03em; }
.section-note { margin: -4px 0 16px; max-width: 70ch; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.chip {
  display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface-2); font-size: 10px; font-weight: 600;
}
.chip.pos { color: var(--green); background: rgba(0, 198, 167, .13); }
.chip.neg { color: var(--red); background: rgba(255, 133, 133, .13); }

.banner {
  margin-bottom: 16px; padding: 13px 16px; background: var(--warning-soft);
  border: 1px solid rgba(232, 199, 131, .16); border-radius: 9px; color: var(--warn); font-size: 12px;
}

.ampel {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px;
}
.ampel .zeichen {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
  border-radius: 8px; font-size: 14px; font-weight: 700; line-height: 1;
}
.ampel .titel { font-weight: 600; font-size: 14.5px; }
.ampel .grund { margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.45; }

.ampel.guenstig { background: rgba(0, 198, 167, .1); }
.ampel.guenstig .zeichen { background: var(--green); color: var(--on-green); }
.ampel.guenstig .titel { color: var(--green); }

.ampel.sehr { background: rgba(0, 198, 167, .16); }
.ampel.sehr .zeichen { background: var(--green); color: var(--on-green); }
.ampel.sehr .titel { color: var(--green-titel); }

.ampel.extrem { background: rgba(0, 198, 167, .24); box-shadow: inset 0 0 0 1px rgba(0, 198, 167, .35); }
.ampel.extrem .zeichen { background: var(--green-voll); color: var(--on-green); }
.ampel.extrem .titel { color: var(--green-titel-2); }

.ampel.sehr_teuer { background: rgba(255, 133, 133, .15); }
.ampel.sehr_teuer .zeichen { background: var(--red); color: var(--on-red); }
.ampel.sehr_teuer .titel { color: var(--red-titel); }

.ampel.extrem_teuer { background: rgba(255, 133, 133, .22); box-shadow: inset 0 0 0 1px rgba(255, 133, 133, .35); }
.ampel.extrem_teuer .zeichen { background: var(--red-voll); color: var(--on-red); }
.ampel.extrem_teuer .titel { color: var(--red-titel-2); }

.ampel-staerke { display: flex; gap: 3px; margin-top: 8px; }
.ampel-staerke i {
  width: 16px; height: 3px;
  border-radius: var(--radius-xs);
  background: var(--track);
}
.ampel-staerke i.an { background: currentColor; }

.ampel.neutral { background: var(--surface-2); }
.ampel.neutral .zeichen { background: var(--neutral-flaeche); color: var(--on-neutral); }
.ampel.neutral .titel { color: var(--text); }

.ampel.teuer { background: rgba(255, 133, 133, .1); }
.ampel.teuer .zeichen { background: var(--red); color: var(--on-red); }
.ampel.teuer .titel { color: var(--red); }

.ampel.unbekannt { background: var(--surface-2); }
.ampel.unbekannt .zeichen { background: var(--surface-3); color: var(--muted); }
.ampel.unbekannt .titel { color: var(--text-2); }

.fazit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px;
}
.fazit .satz { font-weight: 500; }
.fazit .liste { display: flex; flex-wrap: wrap; gap: 7px; }
.fazit .tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.fazit .tag.guenstig { background: rgba(0, 198, 167, .14); color: var(--green); }
.fazit .tag.sehr { background: rgba(0, 198, 167, .2); color: var(--green-titel); }
.fazit .tag.extrem { background: rgba(0, 198, 167, .28); color: var(--green-titel-2); }
.fazit .tag.teuer { background: rgba(255, 133, 133, .12); color: var(--red); }
.fazit .tag.sehr_teuer { background: rgba(255, 133, 133, .18); color: var(--red-titel); }
.fazit .tag.extrem_teuer { background: rgba(255, 133, 133, .26); color: var(--red-titel-2); }

.abdeckung { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
.abdeckung.knapp { color: var(--warn); }

.ana {
  padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.ana-head { display: flex; align-items: center; gap: 11px; }
.ana-head .mark {
  width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 9px;
  color: var(--on-accent); font-size: 12px; font-weight: 700;
}
.ana-head .name { font-weight: 500; }
.ana-head .spacer { flex: 1; }
.ana-line { margin-top: 15px; font-size: 13px; color: var(--text-2); }
.ana-line b { color: var(--text); font-weight: 500; }

.ana-range { margin-top: 14px; }

.ana-bar {
  position: relative;
  height: 5px;
  border-radius: var(--radius-xs);
  background: var(--track-2);
}
.ana-bar i {
  position: absolute; top: 50%;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--surface);
  transform: translateY(-50%);
}
.ana-scale {
  display: flex; justify-content: space-between;
  margin-top: 7px;
  color: var(--muted); font-size: 11px;
}
.ana-facts { margin-top: 14px; display: grid; gap: 7px; font-size: 13px; }
.ana-facts div { display: flex; justify-content: space-between; gap: 12px; }
.ana-facts span:first-child { color: var(--muted); }
.ana-thin {
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
}
.disclaimer {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.metal-tag { display: inline-flex; align-items: center; gap: 12px; }
.metal-tag .mark {
  width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px;
  color: var(--on-accent); font-size: 12px; font-weight: 700; letter-spacing: -.02em;
}
.metal-tag .txt { min-width: 0; }
.metal-tag .txt > span:first-child { display: block; font-weight: 500; }

/* Tabellen, Diagramme und Dialoge teilen dieselbe Oberflächenhierarchie. */
.table-wrap {
  max-width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
th, td {
  padding: 16px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line);
}
th:first-child, td:first-child, th.left, td.left { text-align: left; }
thead th {
  padding-top: 12px; padding-bottom: 12px; color: var(--muted); background: var(--surface);
  font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
}
tbody tr:hover { background: var(--hover); }
tfoot td { padding-top: 15px; border-top: 1px solid var(--line); }

tbody tr.tap { cursor: pointer; }
tbody tr.tap:hover { background: var(--hover-2); }
th.chev, td.chev { width: 26px; padding-left: 0; padding-right: 4px; }
td.chev { color: var(--chev); font-size: 17px; }
tbody tr.tap:hover td.chev { color: var(--text-2); }

.foot-left { margin-right: auto; display: flex; gap: 8px; }

.sub-line {
  display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400;
}
.empty { padding: 34px; text-align: center; color: var(--muted); }

.netto {
  margin: 12px 0 16px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; color: var(--text-2); font-size: 12px; line-height: 1.65;
}
.netto b { color: var(--text); font-weight: 600; }

.chart { width: 100%; height: 250px; display: block; -webkit-tap-highlight-color: transparent; }
.chart.is-empty { height: 66px; }
.chart.is-interactive { touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.chart-interaction-target { touch-action: pan-y pinch-zoom; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.chart:focus, .chart-interaction-target:focus { outline: none; }
.chart:focus-visible, .chart-interaction-target:focus-visible { outline: 1px solid var(--accent); outline-offset: -2px; }
body.privat #chart-portfolio .chart-interaction-target { visibility: hidden; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.range-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.range-tabs button {
  padding: 6px 10px; color: var(--muted); background: transparent; border: 1px solid transparent;
  border-radius: 6px; font: 500 10px/1.4 var(--font); cursor: pointer; transition: background .18s ease, color .18s ease;
}
.range-tabs button:hover { background: var(--surface-2); }
.range-tabs button[aria-pressed="true"] {
  color: var(--accent); background: var(--accent-soft); border-color: rgba(163, 255, 75, .14);
}
/* Marktdaten gehören zum Dashboard und bleiben ohne Aufklappen sichtbar. */
.dashboard-market { min-width: 0; margin: 20px 0; }
.market-section-heading { margin-bottom: 14px; }
.market-section-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }
.market-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.market-content { display: grid; gap: 18px; min-width: 0; }
.market-content > section { min-width: 0; margin: 0; }
.dashboard-market .section-head { gap: 8px 10px; margin-bottom: 12px; }
.dashboard-market .section-head h3 { flex: 1 1 140px; margin: 0; font-size: 13px; font-weight: 600; }
.dashboard-market .section-head .spacer { display: none; }
.dashboard-market .section-head select { width: auto; min-width: 90px; max-width: 150px; padding: 6px 8px; font-size: 11px; }
.dashboard-market .unit-tabs { flex: 0 0 auto; gap: 2px; padding: 3px; border-radius: 7px; }
.dashboard-market .unit-tabs button { padding: 5px 8px; font-size: 10px; }
.dashboard-market .live { flex-basis: 100%; font-size: 9px; }
.dashboard-market .section-note { margin: 0 0 12px; font-size: 10px; line-height: 1.65; }
.dashboard-market .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-market .price-card { container-type: inline-size; padding: 14px; }
.dashboard-market .price-card .head { gap: 6px; }
.dashboard-market .price-card .name { font-size: 11px; }
.dashboard-market .price-card .swatch { width: 6px; height: 6px; flex: 0 0 6px; }
.dashboard-market .price-card .chip-label { font-size: 8px; }
.dashboard-market .price-card .chip { padding: 2px 5px; font-size: 9px; }
.dashboard-market .price-card .big { margin-top: 10px; font-size: clamp(16px, 9cqi, 25px); line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.price-secondary { display: block; margin-top: 5px; color: var(--text-2); font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.price-secondary-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.price-secondary.is-unavailable { color: var(--warn); font-size: 11px; }
.market-refresh-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.market-trends-intro { margin: -2px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.metal-trends-list { display: grid; gap: 12px; }
.metal-trend { min-width: 0; padding: 15px 16px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.metal-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.metal-trend-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.metal-trend-symbol { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 600; background: var(--surface-2); }
.metal-trend-name h4 { margin: 0; font-size: 14px; font-weight: 600; }
.metal-trend-values { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; text-align: right; }
.metal-trend-price { font-size: 16px; font-weight: 550; }
.metal-trend-change { font-size: 12px; }
.metal-trend-difference { flex-basis: 100%; color: var(--muted); font-size: 10px; }
.metal-trend-chart, .metal-trend-chart.is-empty { display: block; width: 100%; height: 130px; }
.metal-trend-period, .metal-trend-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.metal-trend-readout { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 42px; }
.metal-trend-readout .metal-trend-period { min-width: 0; margin: 0; padding-top: 7px; font-size: 11px; }
.metal-trend-reset { flex: 0 0 auto; align-self: center; min-height: 28px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 11px; cursor: pointer; }
.metal-trend-reset:hover { color: var(--accent); border-color: var(--line-strong); }
.metal-trend-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.metal-trend.is-inspecting .metal-trend-readout .metal-trend-period { color: var(--text-2); }
.metal-trend-note.is-warning { color: var(--warn); }
.metal-trend-gap-details { margin-top: 7px; color: var(--text-2); font-size: 11px; line-height: 1.6; }
.metal-trend-gap-details summary { color: var(--warn); cursor: pointer; }
.metal-trend-gap-details ul { margin: 8px 0 0; padding-left: 18px; }
.spot-detail-disclosure { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.spot-detail-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: var(--text-2); font-size: 12px; cursor: pointer; list-style: none; }
.spot-detail-disclosure > summary::-webkit-details-marker { display: none; }
.spot-detail-disclosure > summary:hover { color: var(--text); background: var(--hover); }
.spot-detail-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.spot-detail-disclosure[open] > summary > span { transform: rotate(180deg); }
.spot-detail-disclosure #spot-section { margin: 0; border: 0; background: transparent; }
.dashboard-market .price-card .unit { margin-top: 2px; font-size: 9px; letter-spacing: .02em; }
.dashboard-market .price-card .row { flex-wrap: wrap; gap: 3px 8px; margin-top: 9px; font-size: 9px; line-height: 1.5; }
.dashboard-market .price-card .row + .row { margin-top: 5px; }
.dashboard-market .price-card .row > span:last-child { margin-left: auto; white-space: normal; text-align: right; overflow-wrap: anywhere; }
.dashboard-market #spot-section { padding: 15px; }
.dashboard-market #chart-spot { height: 210px; }
.dashboard-market #spot-legend { gap: 9px 12px; margin-top: 10px; font-size: 10px; }
.dashboard-market .chart-note { font-size: 10px; line-height: 1.65; }
.dashboard-market .analysis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.market-analysis-details { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.market-analysis-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; color: var(--text-2); font-size: 11px; cursor: pointer; list-style: none; }
.market-analysis-details > summary::-webkit-details-marker { display: none; }
.market-analysis-details > summary:hover { color: var(--text); background: var(--hover); }
.market-analysis-details[open] > summary { border-bottom: 1px solid var(--line); }
.market-analysis-details[open] > summary > span { transform: rotate(180deg); }
.market-analysis-details .analysis { padding: 10px; }
.dashboard-market .fazit { gap: 8px 10px; padding: 12px 14px; font-size: 11px; }
.dashboard-market .fazit .tag { padding: 4px 7px; font-size: 10px; }
.dashboard-market .ana { padding: 14px; }
.dashboard-market .ana-head { flex-wrap: wrap; gap: 7px; font-size: 11px; }
.dashboard-market .ana-head .mark { flex: 0 0 25px; width: 25px; height: 25px; font-size: 10px; }
.dashboard-market .ana-head .name { font-size: 11px; }
.dashboard-market .ampel { gap: 8px; margin-top: 12px; }
.dashboard-market .ampel .titel { font-size: 12px; }
.dashboard-market .ampel .grund, .dashboard-market .ampel-lage, .dashboard-market .ampel-vorbehalt { font-size: 10px; }
.dashboard-market .ana-facts { gap: 5px; font-size: 10px; }
.dashboard-market .ana-facts div { gap: 8px; }
.dashboard-market .ana-facts span:last-child { flex-shrink: 0; text-align: right; }
.dashboard-market .ana-scale, .dashboard-market .ana-line, .dashboard-market .abdeckung, .dashboard-market .ana-thin { font-size: 10px; line-height: 1.6; }
.dashboard-market .disclaimer { font-size: 10px; line-height: 1.7; }
@container content (max-width: 600px) {
  .dashboard-market { margin-top: 22px; }
  .market-section-heading h2 { font-size: 18px; }
  .market-section-heading p { font-size: 11px; }
  .dashboard-market .section-head h3 { flex-basis: 100%; }
  .dashboard-market .price-card { padding: 11px; }
  .dashboard-market .price-card .head { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 5px; }
  .dashboard-market .price-card .head > span:nth-child(3) { display: none; }
  .dashboard-market .price-card .head .swatch { grid-column: 1; grid-row: 1; }
  .dashboard-market .price-card .head .name { grid-column: 2 / -1; grid-row: 1; }
  .dashboard-market .price-card .head .chip-label { grid-column: 1 / 3; grid-row: 2; }
  .dashboard-market .price-card .head .chip { grid-column: 3; grid-row: 2; }
  .dashboard-market .price-card .big { font-size: clamp(15px, 12cqi, 21px); }
  .price-secondary { font-size: 12px; }
  .price-secondary-meta { font-size: 10px; }
  .metal-trend { padding: 13px 12px 10px; }
  .metal-trend-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .metal-trend-name { gap: 7px; }
  .metal-trend-name h4 { font-size: 13px; }
  .metal-trend-values { min-width: 0; justify-content: space-between; gap: 3px 6px; text-align: left; }
  .metal-trend-difference { text-align: right; }
  .metal-trend-price { font-size: 14px; }
  .metal-trend-change { font-size: 11px; }
  .dashboard-market .price-card .row { gap: 2px 5px; }
  .dashboard-market .analysis { grid-template-columns: minmax(0, 1fr); }
  .dashboard-market .ana { padding: 14px; }
  .dashboard-market .ana-head, .dashboard-market .ana-head .name { font-size: 12px; }
  .dashboard-market .ampel .grund, .dashboard-market .ampel-lage, .dashboard-market .ampel-vorbehalt, .dashboard-market .ana-facts, .dashboard-market .ana-scale, .dashboard-market .ana-line, .dashboard-market .abdeckung, .dashboard-market .ana-thin { font-size: 11px; }
  .dashboard-market #chart-spot { height: 210px; }
}

.donut-legend { margin-top: 12px; }
.donut-legend .row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; }
.donut-legend .row .spacer { flex: 1; }

dialog {
  width: min(640px, 94vw); max-height: min(86vh, 860px); padding: 0; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--schatten-dialog); overflow: auto;
}
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-head {
  display: flex; align-items: center; padding: 22px 24px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0; font-size: 18px; font-weight: 600;
}
.modal-head .spacer { flex: 1; }
.modal-body {
  padding: 22px 24px;
}
.modal-foot {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 18px 24px;
  border-top: 1px solid var(--line); background: var(--surface-2);
}
.account-profile { border-bottom: 1px solid var(--line); }
.account-profile h4, .account-password h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.profile-hint { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
#profile-login-note { margin: 9px 0 0; }
#profile-username { color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.profile-status { margin: 12px 0 0; color: var(--accent); font-size: 12px; }
.field-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }
.field.span-2 { grid-column: 1 / -1; }
.input-group { display: flex; gap: 7px; }
.input-group select { max-width: 88px; }
.calc-note {
  margin-top: 16px;
  padding: 13px 15px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(92vw, 460px);
  padding: 13px 20px; color: var(--text); background: var(--surface-3); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--schatten-toast); font-size: 12px; text-align: center; z-index: 60;
}
.toast.error { color: var(--fehler-text); border-radius: var(--radius-sm); }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  main { padding: 4px 14px 34px; }
  .topbar { padding: 12px 15px; }
  .topbar .user { display: none; }
  .quick { gap: 18px; }
}

@media (max-width: 640px) {
  .section-head h2 { width: 100%; }
  .section-head .spacer { display: none; }
  .live { margin-left: auto; }
}

@media (max-width: 560px) {
  .brand .label { font-size: 15px; }
  .topbar .btn { padding: 6px 12px; font-size: 13px; }
  .quick button i { width: 46px; height: 46px; font-size: 17px; }

  .hero-meta {
    display: grid; gap: 7px;
    max-width: 290px; margin-inline: auto;
    text-align: left;
  }
  .hero-meta span { display: flex; justify-content: space-between; gap: 12px; }
  .hero-meta span + span::before { content: none; }
  th, td { padding: 12px 7px; }
  .metal-tag { gap: 10px; }
  .metal-tag .mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
}

.mittel { color: var(--text); }
.unbekannt { color: var(--muted); }

.chip.demo {
  color: var(--warn);
  background: rgba(163, 255, 75, .14);
  letter-spacing: .08em;
}

.chance-kuerzel {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px;
  background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 650;
}

.gesundheit {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.gesundheit-zeichen {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: var(--radius-xs);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; line-height: 1;
}
.gesundheit > div:not([class]) { flex: 1 1 220px; }
.gesundheit-bericht { flex: 0 0 auto; margin-left: auto; }
.gesundheit .bericht-feld { flex: 0 0 100%; margin-bottom: 0; min-height: 160px; }
.gesundheit-titel { font-size: 13.5px; font-weight: 600; }
.gesundheit-gruende { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.gesundheit-gruende:not(ul) { padding-left: 0; }
.gesundheit.gruen { border-left-color: var(--green); }
.gesundheit.gruen .gesundheit-zeichen { background: var(--green); color: var(--bg); }
.gesundheit.gelb { border-left-color: var(--warn); }
.gesundheit.gelb .gesundheit-zeichen { background: var(--warn); color: var(--bg); }
.gesundheit.rot { border-left-color: var(--red); }
.gesundheit.rot .gesundheit-zeichen { background: var(--red); color: var(--bg); }

.aufschlag-vorschau { padding: 16px 18px; margin-bottom: 12px; }
.aufschlag-erklaerung { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.55; max-width: 78ch; }
.aufschlag-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Kostenrechner und Vergleichsansichten. */
.rechner {
  padding: 22px; margin-bottom: 18px;
}
.rechner-felder {
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.rechner-feld { display: grid; gap: 4px; }
.rechner-label { font-size: 12.5px; font-weight: 500; }
.rechner-hinweis { color: var(--muted); font-size: 11.5px; }
.rechner-quelle { margin: 14px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

.uebersicht-steuerung {
  display: flex; flex-wrap: wrap; gap: 18px 24px; padding: 20px; margin-bottom: 16px;
}
.uebersicht-steuerung .rechner-feld { grid-template-columns: none; }
.ueber-gitter {
  display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
@container content (max-width: 430px) { .ueber-gitter { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .ueber-gitter { grid-template-columns: minmax(0, 1fr); } }
.ueber-karte { padding: 16px 18px; border-left: 3px solid var(--line); }
.ueber-karte.haendler, .ueber-karte.abo { border-left-color: var(--green); }
.ueber-kopf { display: flex; align-items: center; gap: 8px; }
.ueber-name { font-size: 14px; font-weight: 600; }
.ueber-zahl {
  margin-top: 18px; font-size: 32px; font-weight: 600; letter-spacing: -.045em; line-height: 1.1;
}
.ueber-satz { margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.ueber-klein { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.ueber-urteil { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.ueber-urteil.haendler, .ueber-urteil.abo { color: var(--text-2); }
.ueber-urteil.offen, .ueber-urteil.gleich { color: var(--muted); }

.handlung-karte {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.handlung-zeichen {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: var(--radius-xs);
  display: grid; place-items: center;
  background: var(--gold); color: var(--bg);
  font-size: 13px; font-weight: 700; line-height: 1;
}

.handlung-karte.vermutet { border-left-color: var(--muted); }
.handlung-karte.vermutet .handlung-zeichen { background: var(--muted); }
.handlung-titel { font-size: 14px; font-weight: 600; }
.handlung-satz { margin: 5px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.55; max-width: 78ch; }
.handlung-klein { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; max-width: 78ch; }
#handlung { display: grid; gap: 8px; margin-bottom: 24px; }
#handlung[hidden] { display: none; }
#handlung .handlung-karte { margin: 0; padding: 12px 14px; }
#handlung .handlung-karte > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center; width: 100%; }
#handlung .handlung-titel { font-size: 13px; }
#handlung .handlung-satz { grid-column: 1; font-size: 12px; }
#handlung .btn { grid-column: 2; grid-row: 1 / 3; }
@media (max-width: 640px) {
  #handlung .handlung-karte > div { grid-template-columns: minmax(0, 1fr); }
  #handlung .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 7px; }
}
#plans-notiz { display: grid; gap: 5px; }

.kosten-lead { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 74ch; }
.kosten-lead b { color: var(--text); }
.kosten-schritt { margin-top: 26px; }
.kosten-schritt h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.kosten-satz { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; max-width: 74ch; }
.kosten-satz b { color: var(--text); }

.aufbau-gitter {
  display: grid; gap: 16px;
}
@media (min-width: 780px) { .aufbau-gitter { grid-template-columns: 1fr 1fr; } }
.kosten-aufbau {
  padding: 20px;
}
.aufbau-liste {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 14px;
  margin: 14px 0 0; font-size: 13px; align-items: baseline;
}
.aufbau-liste dt { color: var(--text-2); }
.aufbau-liste dd { margin: 0; text-align: right; white-space: nowrap; }
.aufbau-bei { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.aufbau-liste dt.zwischen, .aufbau-liste dd.zwischen { color: var(--text); }
.aufbau-strich { grid-column: 1 / -1; height: 1px; margin: 2px 0; background: var(--line); }
.aufbau-liste dt.summe, .aufbau-liste dd.summe { color: var(--text); font-weight: 600; }

.aufbau-spaeter {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.aufbau-spaeter dt, .aufbau-spaeter dd { color: var(--muted); }

.angebot-felder {
  display: flex; flex-wrap: wrap; gap: 18px 24px; padding: 20px; margin-bottom: 16px;
}
.angebot-felder .rechner-feld { grid-template-columns: none; }
.angebot-urteil {
  padding: 22px; margin-bottom: 16px; border-left: 3px solid var(--line);
}
.angebot-urteil.guenstig { border-left-color: var(--green); }
.angebot-urteil.ueblich { border-left-color: var(--gold); }
.angebot-urteil.teuer, .angebot-urteil.sehr_teuer { border-left-color: var(--red); }
.angebot-urteil.pruefen { border-left-color: var(--warn); }
.angebot-zahl {
  font-size: 36px; font-weight: 600; letter-spacing: -.045em; line-height: 1.1;
}
.angebot-satz { margin-top: 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; max-width: 76ch; }
.angebot-titel { margin-top: 12px; font-size: 15px; font-weight: 600; }
.angebot-warnung { margin: 8px 0 0; color: var(--warn); font-size: 13px; line-height: 1.55; max-width: 76ch; }
.angebot-massstaebe {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.angebot-massstab { padding: 14px 16px; border-left: 3px solid var(--line); }
.angebot-massstab.gut { border-left-color: var(--green); }
.angebot-massstab.schlecht { border-left-color: var(--red); }
.angebot-massstab-titel { font-size: 13px; font-weight: 600; }
.angebot-massstab-zahlen { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.angebot-massstab-urteil { margin: 7px 0 0; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }

.rechner-details { margin-top: 18px; }
.rechner-details > summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: 8px 0; }

.kosten-urteil { padding: 16px 18px; margin-bottom: 12px; border-left: 3px solid var(--line); }
.kosten-urteil.physisch, .kosten-urteil.sparplan { border-left-color: var(--green); }
.kosten-urteil.gleich { border-left-color: var(--muted); }
.kosten-urteil-titel { font-size: 17px; font-weight: 600; }
.kosten-urteil-satz { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; max-width: 76ch; }

.kosten-urteil-kipp {
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 13px; line-height: 1.55; max-width: 76ch;
}
.kosten-urteil.haendler, .kosten-urteil.abo { border-left-color: var(--green); }

.kosten-paar {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.kosten-weg {
  padding: 20px;
}
.kosten-weg-titel { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.kosten-quote {
  font-size: 32px; font-weight: 600; letter-spacing: -.045em; line-height: 1.1;
}
.kosten-quote-satz { margin-top: 2px; color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.kosten-liste { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; margin: 14px 0 0; font-size: 13px; }
.kosten-liste dt { color: var(--muted); }
.kosten-liste dd { margin: 0; text-align: right; }

.was-hier-steht {
  margin: 0 0 16px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2); font-size: 13px; line-height: 1.6; max-width: 82ch;
}
.was-hier-steht p { margin: 0 0 8px; }
.was-hier-steht p:last-child { margin-bottom: 0; }
.was-hier-steht ol { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 5px; }
.was-hier-steht b { color: var(--text); }

.aufschlag-tabelle { table-layout: fixed; }
.aufschlag-tabelle th:last-child, .aufschlag-tabelle td:last-child { width: 92px; }
.aufschlag-tabelle td.left { white-space: normal; }
.aufschlag-name { font-weight: 500; }
.aufschlag-rechnung { margin-top: 3px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.aufschlag-wert { font-size: 15px; font-weight: 500; }
.aufschlag-fehlend { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.langfrist { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.langfrist-kopf { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.langfrist-zahl { font-size: 20px; font-weight: 500; }
.langfrist-satz { color: var(--text-2); font-size: 13px; }
.langfrist-band { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.langfrist-pruefung { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.langfrist-warnung { margin-top: 6px; color: var(--warn); font-size: 12px; line-height: 1.5; }

.ampel-lage { margin-top: 6px; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }

.ampel-vorbehalt { margin-top: 4px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }

.bericht-feld {
  width: 100%; min-height: 220px; margin-bottom: 12px; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; line-height: 1.5; white-space: pre;
}

.ana-hinweis { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; max-width: 78ch; }

.teile { display: grid; gap: 18px; }

.regime { display: grid; gap: 8px; }

.termine {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--line);
}
.termine .termin {
  flex: 1 1 33%; min-width: 130px;
  padding: 13px 15px;
}
.termine .termin + .termin { border-left: 1px solid var(--line); }
.termine .was { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.termine .wann { margin-top: 4px; font-size: 15px; font-weight: 600; }
.termine .noch { margin-top: 2px; color: var(--text-2); font-size: 12px; }

.termine .termin.frist .wann { color: var(--gold); }
.termine .termin.frist.dringend { background: rgba(163, 255, 75, .1); }

@media (max-width: 560px) {
  .termine .termin { flex: 1 1 100%; }
  .termine .termin + .termin { border-left: 0; border-top: 1px solid var(--line); }
}

.auf-ziel { color: var(--muted); }
.auf-pfeil { color: var(--text-2); }
#ziel-felder { margin-top: 14px; }

/* Marktbrief: Fakten, Zusammenhänge und Quellen. */
.outlook-summary-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; margin-bottom: 24px;
  background: linear-gradient(100deg, rgba(0, 198, 167, .035), transparent 70%), var(--surface);
}
.outlook-summary-card h2 {
  margin: 0 0 8px; font-size: 16px; font-weight: 600;
}
.outlook-summary-card p {
  margin: 0; max-width: 78ch; color: var(--text-2); font-size: 12px; line-height: 1.75;
}
.outlook-summary-card .btn { flex-shrink: 0; }
.outlook-limited { color: var(--warn); }
.outlook-summary-card .outlook-limited { color: var(--warn); }
.outlook-live-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; max-width: 85ch;
  color: var(--muted); font-size: 9px; line-height: 1.7;
}
.outlook-new-button { padding: 0; border: 0; color: var(--gold); background: none; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.outlook-brief { margin: 2px 0 26px; }
.outlook-brief-head { max-width: 95ch; margin-bottom: 20px; }
.outlook-eyebrow { margin: 0 0 7px; color: var(--gold); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.outlook-brief-head h3 {
  margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -.04em; line-height: 1.35;
}
.outlook-brief-intro { margin: 12px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.outlook-brief-check { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.outlook-brief-warning { margin: 12px 0 18px; padding-left: 11px; border-left: 2px solid var(--warn); color: var(--warn); font-size: 12px; line-height: 1.7; }
.outlook-read { margin-top: 12px; }
.outlook-read[hidden] { display: none; }
.outlook-explain-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px;
}
.outlook-explain-card {
  min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.outlook-explain-card h4 {
  margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; line-height: 1.5;
}
.outlook-explain-card p { margin: 10px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.outlook-explain-card p.outlook-what { color: var(--text); font-size: 14px; }
.outlook-explain-card strong, .outlook-news-item strong { font-weight: 500; color: var(--text); }
.outlook-explain-card p.outlook-source { font-size: 10px; color: var(--muted); }
.outlook-connections article + article { margin-top: 22px; }
.outlook-connections h4 { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.outlook-connections article > p { max-width: 90ch; margin: 10px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.outlook-causal-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.outlook-causal-chain li {
  max-width: 28ch; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text-2); font-size: 11px; line-height: 1.7;
}
.outlook-causal-chain li + li::before { content: '→'; margin-right: 9px; color: var(--gold); }
.outlook-news-item {
  position: relative; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.outlook-news-item h4 {
  max-width: 85ch; margin: 0; font-size: 15px; line-height: 1.6; font-weight: 600; letter-spacing: -.02em;
}
.outlook-news-item > p { max-width: 95ch; margin: 9px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.8; }
.outlook-news-item > p.outlook-news-meaning { color: var(--text); font-size: 13px; }
.outlook-news-item > p.outlook-news-kind { color: var(--muted); font-size: 10px; }
.outlook-news-source { max-width: 95ch; margin-top: 12px; color: var(--muted); font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.outlook-news-source a { color: var(--text-2); text-underline-offset: 3px; }
.outlook-news-source span { display: block; margin-top: 3px; }
.outlook-new-label { display: inline-block; margin: 0 0 8px; color: var(--gold); font-size: 10px; }
.outlook-news-new { border-left: 2px solid var(--gold); padding-left: 14px; }
.outlook-data-notes { padding-left: 17px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.outlook-forecast-details { margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.outlook-forecast-details > summary { cursor: pointer; padding: 18px 0; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.outlook-forecast-details > summary strong { font-weight: 500; color: var(--text); }
.outlook-forecast-details > summary span { display: block; padding-left: 16px; font-size: 11px; color: var(--muted); }
.outlook-forecast-content { padding: 8px 0 4px; }
.outlook-status { margin: 0 0 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.outlook-metals { width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; margin-bottom: 20px; }
.outlook-metals button { min-height: 36px; }
.outlook-lead { margin-bottom: 20px; }
.outlook-lead h3 { margin: 0; max-width: 78ch; font-size: 17px; font-weight: 500; line-height: 1.5; }
.outlook-lead p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.outlook-warning { padding: 12px 14px; margin: 0 0 16px; color: var(--warn); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--radius-sm); font-size: 12px; line-height: 1.6; }
.outlook-warning li { margin-left: 14px; }
.outlook-quality { padding: 0; margin: 0 0 22px; max-width: 85ch; font-size: 12px; color: var(--text-2); line-height: 1.7; }
.outlook-block { margin: 0 0 24px; }
.outlook-block > h3 { margin: 0 0 13px; font-size: 14px; font-weight: 500; }
.outlook-drivers { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.outlook-driver {
  min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.outlook-driver-head h4 { margin: 0; font-size: 13px; font-weight: 500; }
.outlook-direction { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.outlook-factor-value { margin-top: 12px; font-size: 20px; }
.outlook-driver p { margin: 9px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.65; }
.outlook-driver .outlook-factor-change { color: var(--muted); font-size: 11px; }
.outlook-source { margin-top: 12px; color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.outlook-source a, .outlook-evidence a { color: var(--text-2); text-underline-offset: 3px; }
.outlook-old { color: var(--warn); }
.outlook-evidence { padding-left: 15px; margin: 10px 0 0; font-size: 10px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.outlook-evidence li + li { margin-top: 6px; }
.outlook-releases { padding: 0; margin: 0; list-style: none; }
.outlook-releases li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.outlook-releases a { color: var(--text-2); text-underline-offset: 3px; }
.outlook-releases span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.outlook-centralbanks { list-style: none; margin: 0 0 16px; padding: 0; color: var(--text-2); font-size: 11px; line-height: 1.65; }
.outlook-centralbanks li + li { margin-top: 8px; }
.outlook-centralbanks a { color: var(--text-2); text-underline-offset: 3px; }
.outlook-centralbanks span { display: block; color: var(--muted); }
.outlook-horizons { margin-bottom: 16px; }
.outlook-scenarios { width: 100%; border-collapse: collapse; }
.outlook-scenarios th, .outlook-scenarios td { padding: 13px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13px; }
.outlook-scenarios th:first-child { text-align: left; }
.outlook-scenarios thead th { font-size: 10px; color: var(--muted); font-weight: 500; }
.outlook-scenarios tbody th { color: var(--text-2); font-weight: 500; }
.outlook-method, .outlook-assumption { max-width: 90ch; margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.outlook-assumption { color: var(--text-2); }
.outlook-empty { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.outlook-sources-details { margin: 20px 0; }
.outlook-sources-details > summary { cursor: pointer; padding: 10px 0; color: var(--text-2); font-size: 12px; }
.outlook-sources-details[open] > summary { margin-bottom: 12px; }
.outlook-history-table { width: 100%; border-collapse: collapse; }
.outlook-history-table th, .outlook-history-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; line-height: 1.65; }
.outlook-history-table th { font-weight: 500; color: var(--text-2); }
.outlook-history-table thead th { color: var(--muted); font-size: 10px; }
.outlook-history-table tbody th { width: 24%; vertical-align: top; }
.outlook-history-summary { margin: 0; }
.outlook-quality-groups { margin: 0 0 18px; padding-left: 16px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.outlook-quality-groups li + li { margin-top: 6px; }
.outlook-history-origin { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); font-weight: 400; }
.outlook-history-details > summary { margin-top: 7px; cursor: pointer; color: var(--text-2); font-size: 11px; }
.outlook-comparisons { list-style: none; padding: 0; margin: 10px 0 0; }
.outlook-comparisons li + li { margin-top: 10px; }
.outlook-comparisons strong { display: block; font-size: 11px; font-weight: 500; }
.outlook-comparisons span { display: block; color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
  .outlook-explain-grid { grid-template-columns: 1fr; }
  .outlook-drivers { grid-template-columns: 1fr; }
  .outlook-summary-card { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px 16px; }
}
@media (max-width: 560px) {
  .outlook-brief-intro { font-size: 13px; }
  .outlook-explain-card { padding: 15px; }
  .outlook-causal-chain { align-items: stretch; flex-direction: column; }
  .outlook-causal-chain li { max-width: none; }
  .outlook-causal-chain li + li::before { content: '↓'; }
  .outlook-scenarios th, .outlook-scenarios td { padding: 10px 7px; font-size: 11px; }
  .outlook-scenarios thead th { font-size: 9px; }
  .outlook-history-table th, .outlook-history-table td { padding: 10px 7px; font-size: 11px; }
}

/* Erklärungen bleiben erreichbar, ohne die Übersicht mit Kleingedrucktem zu füllen. */
.ui-disclosure { min-width: 0; color: var(--text-2); font-size: 12px; line-height: 1.65; }
.ui-disclosure > summary, .metal-trend-details > summary {
  display: flex; align-items: center; gap: 9px; min-height: 34px; width: fit-content; max-width: 100%;
  padding: 5px 0; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5;
  list-style: none; cursor: pointer; border-radius: 5px;
  transition: color .16s ease, background .16s ease;
}
.ui-disclosure > summary::-webkit-details-marker, .metal-trend-details > summary::-webkit-details-marker { display: none; }
.ui-disclosure > summary::before, .metal-trend-details > summary::before {
  content: '›'; display: inline-block; flex: 0 0 auto; color: var(--accent); font-size: 16px;
  transform-origin: center; transition: transform .16s ease;
}
.ui-disclosure[open] > summary::before, .metal-trend-details[open] > summary::before { transform: rotate(90deg); }
.ui-disclosure > summary:hover, .metal-trend-details > summary:hover { color: var(--text); }
.ui-disclosure > summary:focus-visible, .metal-trend-details > summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.ui-disclosure[open] > summary { margin-bottom: 7px; }
.ui-disclosure > p { line-height: 1.7; }
.section-help { margin: 8px 0 12px; }
.section-help[open] { padding-bottom: 8px; }
.section-help .section-note, .section-help .market-trends-intro { margin: 4px 0 8px; font-size: 12px; }
.rail-help { margin-top: 8px; }
.rail-help > summary { min-height: 30px; font-size: 11px; }
.rail-help-list { display: grid; gap: 5px; margin: 0; font-size: 12px; }
.rail-help-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.rail-help-list dt, .rail-help-list dd { margin: 0; }
.rail-help-list dt { color: var(--text); }
.rail-help-list dd { color: var(--text-2); }
.price-details { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 3px; }
.dashboard-market .price-details .row, .price-details .price-secondary-meta { font-size: 11px; }
.compact-status { margin: 7px 0 0; font-size: 12px; line-height: 1.5; }
.compact-status.is-warning { color: var(--warn); }
.price-card-status { font-size: 11px; }
.metal-trend-footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 4px; }
.metal-trend-status { flex: 1 1 auto; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.metal-trend-status.is-warning { color: var(--warn); }
.metal-trend-details { flex: 0 1 auto; min-width: 0; color: var(--text-2); }
.metal-trend-details[open] { flex-basis: 100%; }
.metal-trend-details > summary { font-size: 11px; }
.metal-trend-details .metal-trend-note { font-size: 12px; }
.metal-trend-details .metal-trend-difference { display: block; text-align: left; font-size: 11px; }
.market-analysis-details.ui-disclosure > summary { justify-content: flex-start; width: 100%; padding: 11px 14px; }
.market-analysis-details > .section-head, .market-analysis-details > .disclaimer { margin: 12px 14px; }
.market-analysis-details > .fazit { margin: 0 14px 12px; }
@media (pointer: coarse) {
  .ui-disclosure > summary, .metal-trend-details > summary { min-height: 42px; }
}

/* Kleine Bewegungen unterstützen die Bedienung, ohne Daten zu verdecken. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
