/* Portal appearance. theme.js is shared with the website; auth stays independent. */
:root { --theme-control-bg: #091a27; --theme-control-text: #e7f2f8; --theme-control-line: #315064; --surface-hover: #173443; }
html[data-theme='light'] {
  color-scheme: light;
  --bg: #f3f8fc; --surface: #fff; --surface-light: #e7f3f8; --surface-hover: #e7f3f8;
  --text: #123047; --body: #3d5a6d; --muted: #567182; --line: #bfd4df;
  --accent: #006b84; --mint: #08785e; --danger: #b22e34;
  --theme-control-bg: #fff; --theme-control-text: #123047; --theme-control-line: #a3bfce;
}
html[data-theme='dark'] { color-scheme: dark; }
.theme-picker { position: relative; flex: 0 0 auto; margin: 0; color: var(--theme-control-text); }
.theme-picker summary { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0; border: 1px solid var(--theme-control-line); border-radius: 50%; background: var(--theme-control-bg); cursor: pointer; list-style: none; }
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary::marker { content: ''; }
.theme-picker summary:hover, .theme-picker[open] summary { border-color: var(--accent); }
.theme-picker summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.theme-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.theme-icon-sun { display: none; }
html[data-theme='light'] .theme-icon-sun { display: block; }
html[data-theme='light'] .theme-icon-moon { display: none; }
.theme-mobile-label { display: none; }
.theme-options { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: 174px; min-width: 0; margin: 0; padding: 7px; border: 1px solid var(--theme-control-line); border-radius: 12px; background: var(--theme-control-bg); color: var(--theme-control-text); box-shadow: 0 10px 35px #00192826; }
.theme-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 12px; border-radius: 7px; cursor: pointer; font: 14px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; }
.theme-options label:hover, .theme-options label:has(:checked) { background: var(--surface-hover); }
.theme-options label:has(:checked) { font-weight: 600; }
.theme-options input[type='radio'] { appearance: auto; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); }
.theme-options label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.brand-logo-light { display: none; height: auto; }
html[data-theme='light'] .brand-logo-dark { display: none; }
html[data-theme='light'] .brand-logo-light { display: block; }
.brand .brand-logo-light, .account-footer-brand .brand-logo-light { width: 100%; }
html[data-theme='light'] body,
html[data-theme='light'] body.portal-redesign:has(#signed-out-view:not([hidden])) {
  background: radial-gradient(ellipse at 80% 22%, #c7edf9a6, transparent 52%), radial-gradient(ellipse at 12% 3%, #fff, transparent 44%), var(--bg);
}
html[data-theme='light'] :is(.studio-navigation a, .site-footer) { color: var(--body); }
html[data-theme='light'] .studio-navigation :is(a:hover, a[aria-current]) { color: var(--accent); }
html[data-theme='light'] #studio-header .studio-menu-toggle { color: var(--text); }
html[data-theme='light'] #studio-header :is(a, button):focus-visible { outline-color: var(--accent); }
html[data-theme='light'] :is(.site-header, .site-footer, .landing-bottom) { border-color: var(--line); }
html[data-theme='light'] .panel { background: linear-gradient(140deg,#fff,#eef7fb); border-color: var(--line); box-shadow: 0 8px 30px #295e780a; }
html[data-theme='light'] input:not([type='checkbox']):not([type='radio']),
html[data-theme='light'] select { color: var(--text); background: #fff; border-color: #7394a6; }
html[data-theme='light'] input::placeholder { color: var(--muted); opacity: 1; }
html[data-theme='light'] .button.primary { color: #fff; background: linear-gradient(135deg,#006eb9,#00579b); border-color: #087db5; }
html[data-theme='light'] .button.primary:hover { background: linear-gradient(135deg,#0061a5,#004c88); }
html[data-theme='light'] .button.quiet { color: var(--text); border-color: #a3bfce; background: #ffffffb3; }
html[data-theme='light'] .button.quiet:hover { background: #e2f1f8; border-color: #408da6; }
html[data-theme='light'] .button.danger-text { color: var(--danger); border-color: #d1a8aa; background: transparent; }
html[data-theme='light'] .button.danger-text:hover { background: #fff0ef; }
html[data-theme='light'] .button.danger { color: #fff; background: #b22e34; }
html[data-theme='light'] .button.danger:hover { background: #96232a; }
html[data-theme='light'] :is(.notice, .badge) { color: #08664e; background: #e7f6ef; border-color: #95c8b9; }
html[data-theme='light'] :is(.notice.error, .inline-error) { color: #9a252c; background: #fff0ef; border-color: #d4a0a3; }
html[data-theme='light'] .item-icon { background: #e2f1f8; color: var(--accent); border-color: var(--line); }
html[data-theme='light'] dialog { background: #f8fcff; border-color: #a3bfce; box-shadow: 0 25px 100px #10394d44; }
html[data-theme='light'] dialog::backdrop { background: #14364e70; }
html[data-theme='light'] .subscription-note { background: #fff6e1; border-color: #d8bd7b; color: #79501b; }
/* Frosted ice card in the same app orbit. Original icons and Apple artwork stay intact. */
html[data-theme='light'] .kmcid-ecosystem::before { background: radial-gradient(ellipse,#61cbea30,transparent 68%); }
html[data-theme='light'] .kmcid-card {
  background: linear-gradient(135deg,#fffffff5 0%,#e2f4fbe8 35%,#f9fdfff7 65%,#bde6f4e8 100%);
  border-color: #6eb9d2;
  box-shadow: 0 25px 60px #2b66832e,0 0 25px #14a6d218,inset 0 1px 2px #fff,inset 0 0 30px #77c5e021;
}
html[data-theme='light'] .kmcid-card::before { background: linear-gradient(155deg,#fff9,transparent 30%,transparent 70%,#61bbd518); }
html[data-theme='light'] .kmcid-card-monogram { color: var(--accent); background: linear-gradient(135deg,#fff,#ceebf6); border-color: #7bbbd0; box-shadow: inset 0 0 20px #98d0e22b,0 3px 14px #27758f17; }
html[data-theme='light'] .kmcid-benefits { border-color: #91bbcd; }
html[data-theme='light'] .kmcid-benefits .kmcid-check { background: #007e96; color: #fff; }
html[data-theme='light'] .kmcid-card .kmcid-card-motto { color: var(--accent); }
html[data-theme='light'] .kmcid-node { fill: #0088ac; filter: drop-shadow(0 0 4px #36bade66); }
html[data-theme='light'] .kmcid-orbit-dotted { stroke: #1680a6; }
html[data-theme='light'] .kmcid-orbit-soft { stroke: #1680a6; opacity: .32; }
html[data-theme='light'] .kmcid-app { box-shadow: 0 9px 22px #19496129,0 0 20px #5abbd21a; }
html[data-theme='light'] #signed-out-view .apple-link { box-shadow: 0 0 0 1px #93afc0,0 5px 15px #17445d0e; }
html[data-theme='light'] #signed-out-view .kmcid-info { border-color: #7294a8; }
html[data-theme='light'] .kmcid-motion-toggle span { border-color: #7394a6; background: #ffffff80; }
@media(min-width:721px) and (max-width:1100px) {
  #studio-header .studio-navigation { gap: 16px; font-size: 14px; }
  #studio-header .brand { width: 176px; }
}
@media(max-width:720px) {
  #studio-header .theme-picker summary { width: 100%; min-height: 46px; border: 0; border-radius: 6px; justify-content: flex-start; padding: 0 12px; background: transparent; font-size: 14px; }
  #studio-header .theme-mobile-label { display: inline; }
  #studio-header .theme-options { position: static; width: 100%; margin-block: 5px; box-shadow: none; }
  html[data-theme='light'] #studio-header.navigation-ready .studio-navigation { background: #f9fcfffa; border-color: var(--line); box-shadow: 0 15px 40px #214f7026; }
  html[data-theme='light'] #studio-header .studio-navigation a:hover { background: var(--surface-hover); }
}
@media print { .theme-picker { display: none; } }
/* Long German legal headings must wrap even on the narrowest screens. */
.privacy-content h1 { overflow-wrap: anywhere; hyphens: auto; }
@media(max-width:380px) {
  .site-header:not(#studio-header) { gap: 12px; }
  .site-header:not(#studio-header) .portal-label { display: none; }
}
