/* interpret.css v6 — stacked layout on iPad, 2-col only on large screens */

:root{
  --bg1:#0b1020;
  --bg2:#243b77;
  --card:rgba(255,255,255,.10);
  --stroke:rgba(255,255,255,.18);
  --text:#f3f5ff;
  --muted:rgba(243,245,255,.78);
  --shadow:0 18px 55px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 900px at 20% 0%, var(--bg2), var(--bg1));
}

/* Easy-read font */
body.easyread{
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Reduce motion */
body.reduceMotion *{
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

/* Top bar */
.topbar{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px 16px;
}

.pillLink{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  color:var(--text);
  text-decoration:none;
  font-weight:900;
  padding:10px 14px;
  border-radius:999px;
}

.titles h1{ margin:0; font-size:22px; }
.subtitle{ margin:4px 0 0; color:var(--muted); font-size:14px; }

.modeToggle{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
}
.modeTitle{ font-weight:1000; font-size:14px; }
.modeHint{ font-size:12px; color:var(--muted); }

/* Switch */
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position:absolute; cursor:pointer; inset:0;
  background: rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
}
.slider:before {
  position:absolute; content:"";
  height:22px; width:22px; left:3px; top:2px;
  background:white; border-radius:50%;
}
.switch input:checked + .slider{ background: rgba(34,197,94,.35); }
.switch input:checked + .slider:before{ transform: translateX(24px); }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 18px;

  /* ✅ DEFAULT: single column (great for iPad) */
  display:flex;
  flex-direction: column;
  gap:18px;
}

/* ✅ Only go 2-column on large laptop/desktop */
@media (min-width: 1200px){
  .container{
    display:grid;
    grid-template-columns: 1fr 1fr;
    align-items:start;
  }
}

.card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:22px;
  padding:16px;
  box-shadow:var(--shadow);
}

.bigCard{ min-height: 520px; }

h2{ margin:0 0 12px; font-size:18px; }

.row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.rowBetween{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

.label{ font-weight:1000; }

.input, .textarea, select{
  width:100%;
  font-size:18px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color:var(--text);
  outline:none;
}

.textarea{
  min-height: 220px;
  resize: vertical;
  line-height: 1.45;
  margin-top: 10px;
}

.miniBtn{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color:var(--text);
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}

.divider{
  height:1px;
  background: rgba(255,255,255,.14);
  margin: 14px 0;
}

.stimTitle{
  margin:0 0 8px;
  font-size:20px;
  font-weight:1000;
}

.metaGrid{
  display:grid;
  gap:8px;
}
.metaItem{ color: var(--muted); }
.metaItem strong{ color: var(--text); }

.stimText{
  white-space: pre-wrap;
  margin: 0;
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
}

.wcBadge{
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:8px 12px;
  font-weight:1000;
}

.lockMsg{
  margin-top:10px;
  color: var(--muted);
  font-weight:700;
}

.hint{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 14px;
}

.btn{
  border:0;
  border-radius:16px;
  padding:12px 16px;
  font-size:16px;
  font-weight:1000;
  cursor:pointer;
}
.btn.primary{ background: rgba(34,197,94,.95); color:#07110a; }
.btn.secondary{ background: rgba(168,85,247,.95); color:#0f0720; }
.btn.ghost{ background: rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.14); color:var(--text); }

.feedback{
  margin-top: 12px;
  background: rgba(0,0,0,.12);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:12px;
  color: var(--muted);
}

.exemplar{
  margin-top: 12px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:12px;
  color: var(--muted);
}

.hidden{ display:none; }

.smallStrong{ font-weight:1000; }
.smallHint{ color: var(--muted); font-size: 13px; }

.assistRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* nCCD controls */
.nccdControls{
  display:grid;
  gap:10px;
  margin: 12px 0 0;
}
.checkRow{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-weight:900;
}
.checkRow input{ transform: scale(1.2); }

.tips{ display:grid; gap:10px; margin-top:10px; }
.tip{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  padding:10px 12px;
  color: var(--muted);
}

/* nCCD bigger text */
body.nccd .input,
body.nccd .textarea,
body.nccd select{
  font-size:22px;
  padding: 14px 16px;
  border-radius:18px;
}
body.nccd .textarea{ min-height: 200px; }

/* keyword chips */
.chipRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 10px 0 6px;
}
.chip{
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  color:var(--text);
  font-weight:1000;
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
}
.chip:active{ transform: scale(.98); }

/* chunked answer boxes */
.chunkGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-top: 10px;
}
@media (min-width: 900px){
  .chunkGrid{ grid-template-columns: 1fr 1fr; }
}
.chunkCard{
  background: rgba(0,0,0,.14);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:12px;
}
.chunkLabel{
  font-weight:1000;
  margin-bottom:8px;
  color: var(--muted);
}
.chunkBox{
  width:100%;
  min-height: 90px;
  resize: vertical;
  font-size: 22px;
  padding: 12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: var(--text);
  outline: none;
  line-height: 1.45;
}

.dividerLine{
  height:1px;
  background: rgba(255,255,255,.14);
  margin: 12px 0;
}

/* nCCD quick checks */
.simpleChecks{
  display:grid;
  gap:10px;
  margin-top: 10px;
}
.simpleCheck{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  padding:10px 12px;
  font-weight:1000;
  color: var(--muted);
}