
:root { --bg:#0b0f14; --fg:#e7eef7; --muted:#9fb2c6; --card:#121a24; --line:#263244; --accent:#57a6ff; --good:#3ee07a; --bad:#ff6b6b; --input-bg:var(--input-bg); --font-body:system-ui,Segoe UI,Roboto,Arial,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; font-family:var(--font-body); background:var(--bg); color:var(--fg); }
a { color:var(--accent); text-decoration:none; }
.container { max-width:1400px; margin:0 auto; padding:16px; }
.topbar { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); margin-bottom:12px; flex-wrap:wrap;}
.brand { display:flex; gap:10px; align-items:center; }
.brand h1 { font-size:18px; margin:0; }
.badges { display:flex; gap:8px; flex-wrap:wrap; }
.badge { background:var(--card); border:1px solid var(--line); padding:6px 10px; border-radius:999px; font-size:12px; color:var(--muted); }
.grid { display:grid; grid-template-columns: 1fr 1.55fr; gap:12px; }
@media (max-width: 920px) { .grid { grid-template-columns: 1fr; } }


@media (min-width: 1200px){
  .container, .wrap, .footer-inner{ max-width: 1400px; }
  .grid{ grid-template-columns: 1fr 1.8fr; }
}

.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; }
.card h2 { margin:0 0 10px 0; font-size:16px; }
.small { color:var(--muted); font-size:12px; }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.btn { background:transparent; color:var(--fg); border:1px solid var(--line); padding:10px 12px; border-radius:12px; cursor:pointer; }
.btn.primary { border-color: var(--accent); }
.btn.good { border-color: var(--good); }
.btn.bad { border-color: var(--bad); }
.btn:active { transform: translateY(1px); }
input, select, textarea { width:100%; padding:10px; border-radius:12px; border:1px solid var(--line); background:var(--input-bg); color:var(--fg); }

/* edudataui: lang-dropdown */
#edudataui-lang{
  width: auto;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--fg);
}

#edudataui-lang option{
  background: var(--input-bg);
  color: var(--fg);
}
/* /edudataui: lang-dropdown */

textarea { min-height: 90px; resize: vertical; }
label { font-size:12px; color:var(--muted); display:block; margin:8px 0 6px; }
.hr { height:1px; background:var(--line); margin:12px 0; }
.helpbox { position:sticky; top:12px; }
.helpbox h3 { margin:0 0 6px 0; font-size:14px; }
.help-title { font-weight:600; }
.help-body { color:var(--muted); font-size:13px; line-height:1.35; }
.force-list { display:flex; flex-direction:column; gap:10px; }
.force { border:1px solid var(--line); border-radius:14px; padding:12px; background:var(--input-bg); }
.force-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.force-head .tag { font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid var(--line); color:var(--muted); }
.tag.driving { border-color: rgba(62,224,122,.35); }
.tag.restraining { border-color: rgba(255,107,107,.35); }
.kv { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
@media (max-width: 680px) { .kv { grid-template-columns: 1fr; } }
.qmark { display:inline-block; width:18px; height:18px; line-height:18px; text-align:center; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:12px; cursor:help; margin-left:6px; }
details { border:1px dashed rgba(159,178,198,.25); border-radius:12px; padding:8px 10px; margin-top:10px; }
summary { cursor:pointer; color:var(--muted); font-size:13px; }
.notice { border-left:3px solid var(--accent); padding:8px 10px; background:var(--input-bg); border-radius:10px; }
pre { white-space:pre-wrap; word-break:break-word; color:#cfe6ff; }
.footer {
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  opacity: 0.95;
}

.footer-inner {
  max-width: 1100px;     /* keeps content nicely centered */
  margin: 0 auto;        /* centers the whole footer block */
  padding: 0 16px;       /* prevents touching page edges */
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;       /* responsive wrap on small screens */
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.footer .dot {
  margin: 0 6px;
  opacity: 0.7;
}

.footer-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 3px;
}

.footer-link {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.footer-link:hover {
  border-bottom-style: solid;
}


/* wordcount overflow */
textarea.over { outline: 2px solid rgba(255, 92, 92, 0.55); }


/* --- Added for Base Data Interview templates (aliases + footer) --- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 16px; }

.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); background: rgba(0,0,0,0.18); }
.pill.ok  { border-color: var(--good); }
.pill.bad { border-color: var(--bad); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 10px; border-bottom: 1px solid rgba(255,255,255,0.10); vertical-align: top; text-align: left; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }

.code { background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; padding: 10px; overflow: auto; }

.muted { opacity: 0.78; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 880px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.footer { margin-top: 18px; padding: 10px 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px; align-items: flex-start; justify-content: center; }
.footer-icon { width: 18px; height: 18px; border-radius: 4px; flex: 0 0 auto; margin-top: 2px; }
.footer-text { text-align: left; opacity: 0.86; font-size: 13px; line-height: 1.35; }
.footer-text a { color: inherit; text-decoration: underline; }


/* --- Standard footer links (wrap-friendly) --- */
.footer-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.footer-dot { opacity: 0.65; }
.footer-contact { margin-top: 6px; overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 560px) {
  .topbar { flex-direction:column; align-items:stretch; }
  .topbar .row { justify-content:space-between; }
}

/* --- AI notes readability (wide screens) --- */
.ai-notes-card pre,
.ai-notes-card pre.code,
.ai-notes-card pre.ai{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-size: 14px;
  max-width: 110ch;
}
/* Keep full width on small screens */
@media (max-width: 880px){
  .ai-notes-card pre,
  .ai-notes-card pre.code,
  .ai-notes-card pre.ai{
    max-width: none;
  }
}

/* edudataui: export-dropdown */
.export-dd{
  margin-left: 0;            /* no forced right alignment */
  position: relative;
  display: inline-grid;      /* allows centering the button neatly */
  margin: 0 auto;
  justify-self: center;
}
.export-dd > summary{
  list-style:none;
  cursor:pointer;
}
.export-dd > summary::-webkit-details-marker{ display:none; }

/* slightly smaller button */
.export-dd-btn{
  padding: 6px 9px;
  font-size: 13px;
  border-radius: 10px;
}

/* menu opens inward (anchored to right edge) */
.export-dd-menu{
  position:absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 190px;
  max-width: min(360px, 92vw);
  z-index: 80;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  box-sizing: border-box;
}

.export-dd-item{
  display:block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration:none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.export-dd-item:hover{
  background: rgba(255,255,255,0.06);
  text-decoration:none;
}
.export-dd-sep{
  height:1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 4px;
}
.export-dd-item.disabled{
  opacity: 0.55;
  cursor: default;
}

/* edudataui: export-dd overrides */
.export-dd-btn{ color: var(--text, #e8eef7); }
.export-dd > summary:hover .export-dd-btn{
  color: var(--text, #e8eef7);
  border-color: #2b6cff;
  background: rgba(255,255,255,.03);
}
.export-dd[open] .export-dd-btn{
  color: var(--text, #e8eef7);
  border-color: #2b6cff;
}
.export-dd-item{ color: var(--text, #e8eef7); }
.export-dd-item:hover{
  color: var(--text, #e8eef7);
  background: rgba(255,255,255,.04);
}
/* /edudataui: export-dd overrides */


.export-dd-hint{
  color:#e8eef7;
  opacity:.92;
  font-size:13px;
  margin-right:10px;
  white-space:nowrap;
  cursor: default;
  position:relative;
  display:inline-flex;
  align-items:center;
}


/* Tooltip on Download As button (right-anchored + wrapped) */
.export-dd-btn{ position:relative; cursor:help; }
.export-dd-btn:hover::after,
.export-dd-btn:focus::after,
.export-dd-btn:focus-visible::after{
  content: attr(data-tip);
  position:absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background:#0e1622;
  border:1px solid #25344a;
  color:#e8eef7;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  line-height:1.25;
  width: 320px;
  max-width: 70vw;
  white-space: normal;
  overflow-wrap: anywhere;
  z-index:9999;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  pointer-events:none;
  text-align:left;
}
.export-dd-btn:hover::before,
.export-dd-btn:focus::before,
.export-dd-btn:focus-visible::before{
  content:"";
  position:absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  border:6px solid transparent;
  border-right-color:#25344a;
  z-index:9999;
  pointer-events:none;
}
/* Tooltip */
/* AI notes: keep same width but visually centred and comfortable */
.ai-notes-pre{
  display:block;
  margin: 0 auto;
  max-width: 1200px;
}


/* edudataui: details-caret (sessions manager) */
.prev-polls > summary,
.deleted-polls > summary{
  list-style: none;
  cursor: pointer;
}

.prev-polls > summary::-webkit-details-marker,
.deleted-polls > summary::-webkit-details-marker{ display: none; }

.prev-polls > summary::marker,
.deleted-polls > summary::marker{ content: ""; }

.prev-polls > summary::after,
/* edudataui: caret removed (using inline caret in summary text)
.deleted-polls > summary::after{
  content: "▾";
  margin-left: auto;
  opacity: 0.75;
}

*/
.prev-polls[open] > summary::after,
/* edudataui: caret removed (using inline caret in summary text)
.deleted-polls[open] > summary::after{
  content: "▴";
}


*/
/* edudataui: btn-hover-fill (beta) */
:root{
  --edudataui_btn_hover_fill: rgba(255,255,255,0.06);
  --edudataui_btn_active_fill: rgba(255,255,255,0.10);
}

/* Adds a subtle "fill" on hover/press so buttons feel interactive */
.btn:hover{ background-color: var(--edudataui_btn_hover_fill); }
.btn:active{ background-color: var(--edudataui_btn_active_fill); }
/* /edudataui: btn-hover-fill (beta) */


/* edudataui: sessions-btn-hover */
.prev-polls .btn:hover,
.deleted-polls .btn:hover{
  background-color: rgba(255,255,255,0.08);
  transition: background-color 120ms ease, border-color 120ms ease, filter 120ms ease;
}
/* /edudataui: sessions-btn-hover */


/* edudataui: ai-glow-frame */
.ai-status-frame{
  padding: 12px !important;
  border-radius: 12px !important;
  border: 2px solid rgba(159,178,198,0.28) !important;
  background: rgba(0,0,0,0.10) !important;
}
.ai-status-frame.ai-ok{
  border-color: rgba(46, 204, 113, 0.95) !important;
  background: rgba(46, 204, 113, 0.06) !important;
  box-shadow:
    0 0 0 3px rgba(46, 204, 113, 0.20),
    0 0 22px rgba(46, 204, 113, 0.18) !important;
}
.ai-status-frame.ai-bad{
  border-color: rgba(245, 158, 11, 0.95) !important;
  background: rgba(245, 158, 11, 0.05) !important;
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.18),
    0 0 22px rgba(245, 158, 11, 0.14) !important;
}
/* /edudataui: ai-glow-frame */


/* edudataui: ai-status-pill */
.ai-status-pill{
  display:inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid rgba(159,178,198,0.28);
  background: rgba(0,0,0,0.10);
}
.ai-status-pill.ai-ok{
  border-color: rgba(46, 204, 113, 0.95);
  background: rgba(46, 204, 113, 0.06);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.20), 0 0 22px rgba(46, 204, 113, 0.18);
}
.ai-status-pill.ai-bad{
  border-color: rgba(245, 158, 11, 0.95);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18), 0 0 22px rgba(245, 158, 11, 0.14);
}
/* /edudataui: ai-status-pill */



/* The REAL OpenDyslexic (2026-06-07): self-hosted woff2, same files as
   the main site. Relative URLs resolve beside this sheet: /static/fonts/. */
@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ═══ NISI theme system (2026-06-07) ════════════════════════════════════
   Dark = the original :root palette above. Light / Dyslexia / High
   Contrast carry over from the launcher via the domain-wide
   edudataui_theme cookie (pre-paint script in each template head).  */
html[data-theme="light"]{ --bg:#f3f6fa; --fg:#16202e; --muted:#5a6b80; --card:#ffffff; --line:#c9d4e2; --accent:#1d6fd1; --input-bg:#ffffff; --edudataui_btn_hover_fill:rgba(0,0,0,0.05); --edudataui_btn_active_fill:rgba(0,0,0,0.09); }
html[data-theme="dyslexia"]{ --bg:#fdf6e3; --fg:#3b3530; --muted:#5a4a3a; --card:#fff8e1; --line:#907858; --accent:#1d5fb8; --input-bg:#fffdf2; --font-body:'OpenDyslexic','OpenDyslexic3','Comic Sans MS',sans-serif; --edudataui_btn_hover_fill:rgba(0,0,0,0.05); --edudataui_btn_active_fill:rgba(0,0,0,0.09); }
html[data-theme="dyslexia"] body{ line-height:1.75; }
html[data-theme="hicon"]{ --bg:#000000; --fg:#ffffff; --muted:#e6e6e6; --card:#000000; --line:#ffffff; --accent:#ffff00; --good:#00ff00; --bad:#ff5555; --input-bg:#000000; --edudataui_btn_hover_fill:rgba(255,255,0,0.18); --edudataui_btn_active_fill:rgba(255,255,0,0.28); }

.themebar{ display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.theme-btn{ padding:6px 9px; font-size:12px; cursor:pointer; background:var(--card); color:var(--fg); border:1px solid var(--line); border-radius:8px; font-weight:600; width:auto; }
.theme-btn.active{ background:var(--accent); color:var(--bg); border-color:var(--accent); }
.theme-btn:hover:not(.active){ filter:brightness(1.12); }

/* light/dyslexia: white-alpha hovers + dark-tuned fragments flipped */
html[data-theme="light"] .pill{ background:rgba(0,0,0,0.05); }
html[data-theme="light"] .table th, html[data-theme="light"] .table td{ border-bottom-color:rgba(0,0,0,0.12); }
html[data-theme="light"] .code{ background:rgba(0,0,0,0.05); border-color:rgba(0,0,0,0.12); }
html[data-theme="light"] .export-dd-item:hover{ background:rgba(0,0,0,0.06); }
html[data-theme="light"] pre{ color:#16202e; }
html[data-theme="dyslexia"] pre{ color:#3b3530; }
html[data-theme="hicon"] a{ color:#ffff00; }

/* Theme dropdown — the language selector's twin (2026-06-07). */
#edudataui-theme{ width:auto; max-width:220px; padding:8px 10px; border-radius:10px; border:1px solid var(--line); background:var(--input-bg); color:var(--fg); }
#edudataui-theme option{ background:var(--input-bg); color:var(--fg); }
/* ═══ /NISI theme system ═══ */
