/* Tolga Tas'al V0.17.6.1 — targeted motion and interior harmony.
   Scope: citizen-side visuals only. No API, privacy, or D1 changes. */
html[data-ui="refined"][data-experience="aurora"] {
  --hm-night: #10192c;
  --hm-panel: #141f34;
  --hm-surface: #1c2b45;
  --hm-line: rgba(173,211,249,.18);
  --hm-text: #f2f7ff;
  --hm-muted: #c3d0e4;
  --hm-cyan: #64d3f8;
}
/* When a slide changes the departing text MUST disappear before incoming
   text becomes legible. The illustration alone participates in the crossfade. */
html[data-ui="refined"][data-experience="aurora"] .portal-option:not([data-slide-position="current"]) :is(.aurora-kicker,.portal-option-copy,.aurora-cta) {
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
  transition: none !important;
}
html[data-ui="refined"][data-experience="aurora"] .portal-option[data-slide-position="current"] :is(.aurora-kicker,.portal-option-copy,.aurora-cta) {
  visibility: visible !important;
  animation: hm-caption-enter .25s cubic-bezier(.25,.75,.25,1) .13s both !important;
}
/* Earlier stability rules inadvertently showed ALL three cards on departure.
   Only the selected card may be visible while exiting the gateway. */
html[data-ui="refined"][data-experience="aurora"] .portal-gateway.portal-leaving .portal-option:not([data-slide-position="current"]) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html[data-ui="refined"][data-experience="aurora"] .portal-gateway.portal-leaving .portal-option[data-slide-position="current"] {
  opacity: 1 !important;
  visibility: visible !important;
}
@keyframes hm-caption-enter {
  from {opacity:0;translate:0 7px;}
  to {opacity:1;translate:0 0;}
}
/* A compact, clipped portrait handoff rather than a full-size image travelling
   across the form. Keep the original avatar/recipient data untouched. */
html[data-ui="refined"][data-experience="aurora"] #ask-panel .living-flight {
  overflow:hidden !important;
  border:1px solid rgba(129,217,247,.62) !important;
  box-shadow:0 7px 18px rgba(1,13,39,.23) !important;
  contain:paint;
}
html[data-ui="refined"][data-experience="aurora"] #ask-panel .living-flight img {
  width:100% !important;height:100% !important;
  object-fit:cover !important;object-position:center 23% !important;
}
/* Shared interior colors: same night/cyan system as the animated gateway. */
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) {
  color-scheme:dark;
  --bg:#121f34;
  --paper:#121e33;
  --ink:#eff7ff;
  --muted:#c1cfe3;
  --deep:#45c4ed;
  --deep2:#75dcff;
  --deep-text:#09243b;
  --line:#354765;
  --accent:#76d8f7;
  --pale:#1d304e;
  --select:#73d4fa;
  background:linear-gradient(156deg,#15233b,#10192c 76%) !important;
  color:var(--hm-text) !important;
  border-color:var(--hm-line) !important;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) .sheet-shell {
  background:transparent !important;
  color:var(--hm-text) !important;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) .sheet-body {
  background:linear-gradient(155deg,rgba(34,51,80,.24),rgba(16,25,44,0) 54%) !important;
  color:var(--hm-text) !important;
  scrollbar-color:#517293 transparent;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) :is(.sheet-help,.privacy-small,.field-label) {
  color:var(--hm-muted) !important;
  font-size:clamp(15px,3.9vw,17px);
  line-height:1.8;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) :is(input,textarea,select) {
  background:#1b2d48 !important;
  color:var(--hm-text) !important;
  border:1px solid #47617e !important;
  min-height:52px;
  font-size:16px;
  border-radius:16px;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) :is(input,textarea,select):focus-visible {
  border-color:#83ddfd !important;
  outline:2px solid #83ddfd !important;
  outline-offset:2px;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) .fill-button {
  background:#51cff5 !important;
  color:#092239 !important;
  border-radius:16px !important;
  font-size:17px !important;
  font-weight:750;
  box-shadow:0 8px 24px rgba(8,65,119,.14);
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) .fill-button:is(:hover,:focus-visible) {
  background:#83e1ff !important;
}
html[data-ui="refined"][data-experience="aurora"] :is(#track-panel,#dialogue-panel) :is(.outline-button,.thread-switch,.thread-expand,.under-link) {
  color:#7cddfa !important;
  border-color:#496786 !important;
}
/* Published conversations are readable, uniformly dark, and easier to scan. */
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel.sheet {
  box-shadow:0 26px 80px rgba(3,9,28,.45) !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .sheet-body {
  padding:clamp(18px,4vw,28px) clamp(16px,4.8vw,35px) max(30px,env(safe-area-inset-bottom)) !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .sheet-help {
  max-width:660px;
  margin-bottom:20px;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-list {
  border:0 !important;
  display:grid;
  gap:12px;
  padding:0;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item {
  border:1px solid var(--hm-line) !important;
  border-radius:19px;
  background:#1c2b44;
  box-shadow:0 3px 16px rgba(3,9,27,.10);
  overflow:hidden;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item[open] {
  border-color:rgba(98,206,251,.48) !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item summary {
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px !important;
  padding:16px 17px !important;
  color:#f4f8ff !important;
  line-height:1.75 !important;
  font-size:16px !important;
  font-weight:650;
  overflow-wrap:anywhere;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item summary span:not(.example-badge) {
  flex:1 1 65%;
  min-width:0;
  color:#f4f8ff !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item summary::after {
  color:#83ddfd !important;
  font-size:23px;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .example-badge {
  color:#8ee5ff !important;
  background:rgba(86,199,243,.12) !important;
  border:1px solid rgba(118,216,247,.20);
  border-radius:99px;
  font-size:12px !important;
  line-height:1.4;
  padding:5px 10px;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation {
  padding:0 15px 14px !important;
  color:var(--hm-muted) !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation .tracked-message {
  background:#142139 !important;
  border:1px solid rgba(148,195,229,.18) !important;
  border-radius:15px;
  box-shadow:none !important;
  padding:14px 16px;
  margin-bottom:9px;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation .tracked-message[data-author="candidate"] {
  background:#213853 !important;
  border-color:rgba(114,211,246,.32) !important;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation .tracked-message strong {
  font-size:14px !important;
  color:#8de3fd !important;
  font-weight:740;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation .tracked-message p {
  font-size:16px !important;
  line-height:1.85 !important;
  color:#f0f6ff !important;
  overflow-wrap:anywhere;
}
html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-bottom {
  display:flex;flex-wrap:wrap;gap:12px;
  color:var(--hm-muted) !important;
  border-top:1px solid var(--hm-line);
  padding-top:20px;
  font-size:15px;
}
/* The initial tracking form is its own concise stage instead of a tiny form
   pinned to the top of a giant white screen. Tracking results remain untouched. */
html[data-ui="refined"][data-experience="aurora"] #track-panel:not(.track-active) .sheet-body {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:min(100%,620px);
  margin-inline:auto;
  padding:clamp(26px,6dvh,62px) 20px max(26px,env(safe-area-inset-bottom)) !important;
  overflow-y:auto;
}
html[data-ui="refined"][data-experience="aurora"] #track-panel:not(.track-active) .sheet-body .sheet-help {
  font-size:17px !important;
  margin-bottom:14px;
}
html[data-ui="refined"][data-experience="aurora"] #track-panel:not(.track-active) #track-form {
  background:rgba(26,45,73,.75);
  border:1px solid rgba(120,196,234,.24);
  border-radius:23px;
  padding:clamp(18px,5vw,28px);
  box-shadow:0 15px 42px rgba(3,12,36,.13);
}
html[data-ui="refined"][data-experience="aurora"] #track-panel .code-input {
  letter-spacing:.07em;
  direction:ltr;
  text-align:center;
  font-size:clamp(16px,4.2vw,20px) !important;
  margin:7px 0 13px;
}
html[data-ui="refined"][data-experience="aurora"] #track-panel .empty-track {
  background:transparent !important;
  border:0 !important;
  color:#aebed7 !important;
  font-size:14px;
  padding:clamp(20px,5dvh,48px) 10px 16px;
  line-height:1.8;
  text-align:center;
}
html[data-ui="refined"][data-experience="aurora"] #track-panel .preview-track-hint {
  color:#8bdff7 !important;
  background:transparent;
  padding:0;
  margin-bottom:16px;
  font-size:14px;
  line-height:1.7;
}
/* Keep actual thread/consent controls legible when an already existing ticket
   is opened; no changes to privacy choices or form visibility. */
html[data-ui="refined"][data-experience="aurora"] #track-panel.track-active .sheet-body {background:#121e33 !important;}
html[data-ui="refined"][data-experience="aurora"] #track-panel.track-active .tracked-timeline {background:#1a2b44 !important;border-color:#405775 !important;}
html[data-ui="refined"][data-experience="aurora"] #track-panel.track-active .tracked-message {background:#20334c !important;border-color:#405775 !important;color:#eff7ff !important;}
html[data-ui="refined"][data-experience="aurora"] #track-panel.track-active .tracked-message p {color:#eff7ff !important;line-height:1.7;}
html[data-ui="refined"][data-experience="aurora"] #track-panel.track-active #followup-form {background:#15243b !important;border-color:#405775 !important;}
@media(max-width:650px) {
  html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-item summary {padding:15px 14px !important;}
  html[data-ui="refined"][data-experience="aurora"] #dialogue-panel .dialogue-explanation {padding:0 12px 12px !important;}
  html[data-ui="refined"][data-experience="aurora"] #track-panel:not(.track-active) .sheet-body {padding:clamp(24px,6dvh,56px) 16px 20px !important;}
}
@media(prefers-reduced-motion:reduce){
  html[data-ui="refined"][data-experience="aurora"] .portal-option[data-slide-position="current"] :is(.aurora-kicker,.portal-option-copy,.aurora-cta) {animation:none!important;opacity:1!important;translate:0 0!important;}
}
