/* ============================================================
   Delta — Overlay shell

   The full-screen takeover chrome: the .tk container, its header,
   tabs, cards, fields and buttons. Used by the legislator finder
   on Take Action.

   Split out of the former story-studio.css in this variant. The
   story-submission styles and the module that drove them have been
   removed; this file is only the shared overlay chrome the finder
   still needs.

   Tokens are the --sd-* set, scoped so a theme can remap them
   without touching the page-level :root.
   ============================================================ */

.tk{
  --sd-bg:        #F7E5D3;
  --sd-bg-warm:   #F4DFC9;
  --sd-card:      #FBEEDF;
  --sd-ink:       #2B1539;
  --sd-purple:    #382448;
  --sd-ink-soft:  rgba(43,21,57,.74);
  --sd-ink-mute:  rgba(43,21,57,.52);
  --sd-orange:    #CB5209;
  --sd-orange-lit:#D8641C;
  --sd-line:      rgba(43,21,57,.13);
  --sd-line-soft: rgba(43,21,57,.08);

  --sd-serif: "Playfair Display", Georgia, serif;
  --sd-quote: "Newsreader", Georgia, serif;
  --sd-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sd-ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --sd-pad:   clamp(20px, 3.2vw, 56px);

  position:fixed; inset:0; z-index:6000;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  background:radial-gradient(110% 70% at 50% 0%, #FAEBDB 0%, var(--sd-bg) 55%, var(--sd-bg-warm) 100%);
  display:none;
  font-family:var(--sd-sans); color:var(--sd-ink);
}
.tk.open{ display:block; animation:tkIn .42s var(--sd-ease); }
@keyframes tkIn{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }

.tk svg{ fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

.tk-inner{ max-width:1180px; margin:0 auto; padding:clamp(24px,3vw,56px) var(--sd-pad) clamp(60px,6vw,110px); }

.tk-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:22px; margin-bottom:clamp(22px,2.4vw,40px); }

.tk-eyebrow{
  margin:0 0 10px; font-size:11px; font-weight:700;
  letter-spacing:.16em; text-transform:uppercase; color:var(--sd-orange);
}
.tk-title{
  margin:0; font-family:var(--sd-serif); font-weight:700;
  font-size:clamp(30px,3.4vw,58px); line-height:1.02;
  letter-spacing:-.028em; color:var(--sd-ink);
}
.tk-sub{
  margin:14px 0 0; font-size:clamp(14px,1.05vw,18px); line-height:1.6;
  color:var(--sd-ink-soft); max-width:60ch;
}

.tk-close{
  flex:none; display:grid; place-items:center;
  width:clamp(40px,3vw,52px); aspect-ratio:1; border-radius:50%;
  border:1.5px solid var(--sd-line); background:transparent; cursor:pointer;
  color:var(--sd-ink);
  transition:background .28s var(--sd-ease), color .28s var(--sd-ease), border-color .28s var(--sd-ease);
}
.tk-close svg{ width:42%; height:42%; stroke-width:2; }
.tk-close:hover{ background:var(--sd-purple); border-color:var(--sd-purple); color:var(--sd-card); }
.tk-close:focus-visible{ outline:3px solid var(--sd-orange); outline-offset:3px; }

.tk-tabs{ display:inline-flex; gap:8px; flex-wrap:wrap; }
.tk-tabs--wide{ margin-bottom:clamp(22px,2.2vw,34px); }
.tk-tab{
  font-family:var(--sd-sans); font-size:clamp(12.5px,.92vw,15px); font-weight:600;
  color:var(--sd-ink); background:transparent; cursor:pointer;
  border:1.5px solid var(--sd-line); border-radius:999px; padding:12px 22px;
  transition:background .26s var(--sd-ease), color .26s var(--sd-ease), border-color .26s var(--sd-ease);
}
.tk-tab:hover{ border-color:var(--sd-purple); }
.tk-tab[aria-pressed="true"]{ background:var(--sd-purple); border-color:var(--sd-purple); color:var(--sd-card); }
.tk-tab:focus-visible{ outline:3px solid var(--sd-orange); outline-offset:3px; }

.tk-controls{
  display:flex; flex-wrap:wrap; gap:16px;
  align-items:flex-end;
}

.tk-field{ position:relative; display:flex; flex-direction:column; gap:8px; }
.tk-field label{
  font-size:11px; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--sd-orange);
}

.tk-select{
  font-family:var(--sd-sans); font-size:clamp(14px,1vw,16px); font-weight:500;
  color:var(--sd-ink); background:var(--sd-card);
  border:1.5px solid var(--sd-line); border-radius:12px;
  padding:13px 42px 13px 16px;
  min-width:min(300px, 72vw);
  appearance:none; -webkit-appearance:none;
  cursor:pointer;
  transition:border-color .25s var(--sd-ease);
}
.tk-select:focus{ outline:none; border-color:var(--sd-purple); }
.tk-select:focus-visible{ outline:3px solid var(--sd-orange); outline-offset:2px; }

.tk-field::after{
  content:""; position:absolute; right:17px; bottom:20px;
  width:8px; height:8px; pointer-events:none;
  border-right:2px solid var(--sd-ink-mute);
  border-bottom:2px solid var(--sd-ink-mute);
  transform:rotate(45deg) translateY(-1px);
}

.tk-foot{
  margin-top:clamp(20px,2vw,32px);
  font-size:12.5px; line-height:1.7; color:var(--sd-ink-mute); max-width:74ch;
}
.tk-foot a{ color:var(--sd-orange); }

@media (max-width:860px){
  .tk-field{ width:100%; }
  .tk-select{ min-width:0; width:100%; }
}

@media (prefers-reduced-motion:reduce){
  .tk.open{ animation:none; }
  .tk-tab, .tk-close{ transition-duration:.01ms; }
}
