/* The playground's look (22 Oct): a conversation, and on its left a panel that folds away (the sentences to try,
   the inbox, teaching a skill, the pretend board). On a phone the panel slides over the conversation. */
:root {
  --bg: #f2f4f3; --panel: #ffffff; --ink: #1b2422; --muted: #5c6b67; --line: #d5dcd9;
  --accent: #1f6670; --accent-soft: #e1eef0;
  --act: #2e7d4f; --act-soft: #e2f2e8; --ask: #2a5d9f; --ask-soft: #e3ecf8;
  --approve: #9a6200; --approve-soft: #f8edd8; --abstain: #8a3b3b; --abstain-soft: #f6e4e4;
  --term-bg: #18201e; --term-ink: #d8e6e1; --term-dim: #7f9690;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121816; --panel: #1a2220; --ink: #e3ebe8; --muted: #93a39f; --line: #2c3734;
  --accent: #6fb7c0; --accent-soft: #1d3236;
  --act: #7cc79a; --act-soft: #1c3226; --ask: #8fb4e8; --ask-soft: #1d2a3c;
  --approve: #e3b45c; --approve-soft: #382c14; --abstain: #e39a9a; --abstain-soft: #3a2222;
  --term-bg: #0b0f0e; --term-ink: #d8e6e1; --term-dim: #7f9690; color-scheme: dark } }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent); }
.wrap { max-width: 1240px; height: 100%; margin: 0 auto; padding: 16px; display: grid; gap: 16px 20px;
        grid-template-columns: 360px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "head head" "panel chat"; }
.wrap.folded { grid-template-columns: 0 minmax(0, 1fr); column-gap: 0; }
header { grid-area: head; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
h1 span { font-family: var(--mono); font-weight: 600; color: var(--accent); }
header p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; min-width: 240px; }
.toggle-panel { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
                padding: 6px 12px; border-radius: 8px; font-size: 14px; order: -1; }
.toggle-panel svg { width: 18px; height: 18px; }

/* the conversation */
.chat { grid-area: chat; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.where { padding: 10px 16px; border-bottom: 1px solid var(--line); font: 13px/1.4 var(--mono); color: var(--muted); display: flex; gap: 12px; }
.where b { color: var(--accent); font-weight: 600; }
.where .learning { margin-left: auto; color: var(--approve); }
.log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.hello { margin: auto; max-width: 440px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hello b { color: var(--ink); font-size: 18px; }
.hello .chips { justify-content: center; }
.you { align-self: flex-end; max-width: 80%; background: var(--accent); color: var(--panel); padding: 8px 12px; border-radius: 12px 12px 2px 12px; }
.turn { display: flex; flex-direction: column; gap: 8px; max-width: 92%; min-width: 0; }
.typing { align-self: flex-start; display: flex; gap: 5px; background: var(--bg); padding: 14px 14px; border-radius: 12px 12px 12px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.say { align-self: flex-start; background: var(--bg); padding: 10px 12px; border-radius: 12px 12px 12px 2px; white-space: pre-wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13px; color: var(--muted); }
.out { font: 600 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; }
.out.act { color: var(--act); background: var(--act-soft); }
.out.ask { color: var(--ask); background: var(--ask-soft); }
.out.approve { color: var(--approve); background: var(--approve-soft); }
.out.abstain { color: var(--abstain); background: var(--abstain-soft); }
.tag { font-family: var(--mono); font-size: 12px; }
.new { color: var(--approve); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--accent); color: var(--accent); background: transparent; padding: 3px 10px; border-radius: 999px; font-size: 14px; text-align: left; }
.chip:hover:not(:disabled), .chip:focus-visible { background: var(--accent-soft); }
.chip:disabled { opacity: .4; cursor: default; }
.cmd { background: var(--term-bg); color: var(--term-ink); font: 13px/1.5 var(--mono); padding: 8px 12px; border-radius: 6px;
       overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd b { color: var(--term-dim); font-weight: 400; }
.cmd i { color: var(--term-dim); font-style: normal; }
.cmd.none { color: var(--term-dim); }
form.entry { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
#say { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
#say:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.send { background: var(--accent); color: var(--panel); border: 0; padding: 0 16px; border-radius: 8px; font-weight: 700; }

/* what the board read: a table, files with their icons, gauges */
.scroll { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; font-size: 14px; background: var(--bg); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 5px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 700; color: var(--muted); font-size: 12px; }
tr:last-child td { border-bottom: 0; }
td.warm, td.high, td.busy, td.filling-up, td.weak { color: var(--approve); }
td.hot, td.full, td.struggling { color: var(--abstain); }
td .ico { display: inline-flex; vertical-align: -3px; margin-right: 8px; color: var(--accent); }
td .ico svg, .mark svg { width: 17px; height: 17px; }
.mark { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.gauges { display: flex; flex-direction: column; gap: 12px; background: var(--bg); border-radius: 8px; padding: 12px 14px; min-width: min(340px, 100%); }
.gauge { display: flex; flex-direction: column; gap: 5px; --level: var(--act); }
.gauge.warm, .gauge.high, .gauge.filling-up, .gauge.busy, .gauge.weak { --level: var(--approve); }
.gauge.hot, .gauge.full, .gauge.struggling { --level: var(--abstain); }
.g-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.g-head b { font: 600 18px/1 var(--mono); color: var(--ink); }
.g-track { position: relative; height: 10px; border-radius: 999px; background: var(--line); }
.g-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--level); transform-origin: left; }
.g-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; }
.g-scale { display: flex; justify-content: space-between; font: 11px/1 var(--mono); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .turn, .you { animation: in .18s ease-out; } @keyframes in { from { opacity: .4; transform: translateY(4px); } }
  .g-fill { animation: grow .5s ease-out; } @keyframes grow { from { transform: scaleX(0); } }
}

/* the panel, on the left */
.intro { margin: 0; font-size: 15px; }
.o { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; }
.o.act { color: var(--act); background: var(--act-soft); } .o.ask { color: var(--ask); background: var(--ask-soft); }
.o.approve { color: var(--approve); background: var(--approve-soft); } .o.abstain { color: var(--abstain); background: var(--abstain-soft); }
details { border-top: 1px solid var(--line); padding-top: 6px; }
details:first-of-type { border-top: 0; padding-top: 0; }
summary { cursor: pointer; font-size: 14px; padding: 4px 0; list-style-position: inside; }
summary small { color: var(--muted); font: 12px var(--mono); margin-left: 4px; }
details .pills { padding: 6px 0 4px; }
aside { grid-area: panel; min-height: 0; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.wrap.folded aside { display: none; }
aside section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
aside .top { display: none; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; }
h3 { font-size: 13px; margin: 4px 0 0; color: var(--muted); font-weight: 400; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 4px 10px; border-radius: 999px; font-size: 14px; text-align: left; }
.pill:hover, .pill:focus-visible { border-color: var(--accent); }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.inbox { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.inbox li { display: flex; flex-direction: column; border-left: 3px solid var(--abstain); padding-left: 8px; }
.inbox li.teach { border-color: var(--approve); }
.inbox small { color: var(--muted); font: 12px var(--mono); }
textarea { width: 100%; min-height: 240px; resize: vertical; font: 12.5px/1.5 var(--mono); padding: 10px; border-radius: 8px;
           border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; flex-wrap: wrap; }
.do { background: var(--accent); color: var(--panel); border: 0; padding: 6px 14px; border-radius: 8px; font-weight: 700; }
.do:disabled { opacity: .5; cursor: default; }
.taught { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.taught.bad { color: var(--abstain); }
.switch { border: 1px solid var(--line); background: var(--bg); padding: 4px 12px; border-radius: 6px; font: 13px var(--mono); min-width: 56px; }
.switch[aria-pressed="true"] { background: var(--approve-soft); color: var(--approve); border-color: var(--approve); }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .wrap, .wrap.folded { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "chat"; padding: 12px; }
  header p { display: none; }
  aside { position: fixed; inset: 0 auto 0 0; width: min(380px, 92vw); z-index: 5; background: var(--bg); padding: 12px;
          box-shadow: 8px 0 30px rgb(0 0 0 / .25); }
  aside .top { display: flex; justify-content: space-between; align-items: center; }
}
