/* Studio's base: the two typefaces, the type tokens, and the few components every screen shares. Taken from
   Rheaface's app.css; only what the frame uses came over. Every colour is a token from tokens.css. */

/* Schibsted Grotesk for words, Martian Mono narrowed for what a program reads: names, text of a class, numbers.
   Both OFL, served from fonts/ with their licences beside them, never from another site. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap;
  src: url(fonts/martian-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap;
  src: url(fonts/martian-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --f-voice: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;  /* the agent's words: the same face, larger */
  --f-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-fig: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-code: var(--f-fig);
  --fig-stretch: 87.5%;   /* the narrow cut */
  --fig-scale: .88;       /* Schibsted's x-height over Martian's: one line, one x-height */
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: var(--ground); color: var(--ink);
  font: 400 15px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* type */
.kicker { font: 500 11.5px/1.3 var(--f-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.fig, .code {
  font-family: var(--f-fig); font-stretch: var(--fig-stretch); font-size: calc(var(--fig-scale) * 1em);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0;
}
.code { color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 400; }

/* the agent's mark: a dot and the name */
.agent-mark { font: 600 17px/1 var(--f-voice); letter-spacing: .01em; color: var(--accent-text); }
.agent-mark::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; vertical-align: 3px; }

/* buttons */
.btn {
  border: 1px solid var(--accent-fill); background: var(--accent-fill); color: var(--on-accent);
  border-radius: 999px; padding: 9px 16px; font-weight: 500; font-size: 14px; cursor: pointer;
}
.btn.ghost { background: none; color: var(--ink); border-color: var(--rule-2); }
.btn.opt { background: none; color: var(--ink); border-color: var(--rule-2); padding: 7px 12px; font-weight: 400; }
.btn.opt:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }   /* a button that cannot act now says so */

/* a chip */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.chip.due { color: var(--due); }
.chip.ok { color: var(--ok); }
.chip.accent { color: var(--accent-text); }
.chip.warn { color: var(--warn); }

/* the conversation */
.thread { display: grid; gap: 10px; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.bubble.q { justify-self: end; background: var(--ink); color: var(--sheet); border-bottom-right-radius: 4px; }
.bubble.a { justify-self: start; background: var(--doc); border: 1px solid var(--rule); border-bottom-left-radius: 4px; font: 400 15.5px/1.5 var(--f-voice); }
.bubble.a .from { display: block; font: 600 12.5px/1.2 var(--f-voice); letter-spacing: .01em; color: var(--accent-text); margin-bottom: 4px; }
.bubble.a .src { display: block; font: 400 11.5px/1.3 var(--f-ui); color: var(--ink-3); margin-top: 6px; }
.compose { display: flex; gap: 8px; }
.compose input { flex: 1; min-width: 0; border: 1px solid var(--rule-2); border-radius: 999px; padding: 9px 14px; background: var(--doc); color: var(--ink); font: inherit; font-size: 14px; }
.compose input::placeholder { color: var(--ink-3); }

/* rows of settings: what is set on the left, the choices on the right */
.mem { display: grid; font-size: 13.5px; }
.mem-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.mem-row button { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 12.5px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.look-opts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.mem-row .look-opts button { border: 1px solid var(--rule-2); border-radius: 999px; padding: 2px 10px; text-decoration: none; color: var(--ink-2); }
.mem-row .look-opts button[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }

/* a menu that opens at a control or at the pointer */
.g-pop { position: absolute; z-index: 20; width: 290px; max-height: 62vh; overflow: auto; background: var(--doc); border: 1px solid var(--rule-2); border-radius: 12px; box-shadow: var(--doc-shadow); padding: 6px; }
.g-menu { display: grid; gap: 1px; }
.g-menu > button { text-align: left; background: none; border: 0; border-radius: 7px; padding: 6px 9px; font-size: 13px; color: var(--ink); cursor: pointer; }
.g-menu > button:hover { background: var(--sunk); }
.g-pop-sec { font: 500 10.5px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 9px 4px; border-top: 1px solid var(--rule); margin-top: 4px; }
.g-menu > .g-pop-sec:first-child { border-top: 0; margin-top: 0; }
.g-menu > button[aria-current="true"] { background: color-mix(in srgb, var(--accent-fill) 34%, var(--doc)); }

/* a short word from the frame, at the foot */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 80;
  max-width: min(400px, calc(100% - 32px)); background: var(--ink); color: var(--sheet); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; box-shadow: var(--doc-shadow); }
