/* Adapted from pgsty/oink v1.2.0, f8f476e660cf053a2645b7b923ae8d08d5448fce.
   See vendor/oink/NOTICE and LICENSE. Diff colors remain AgentLab semantics. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/vendor/oink/fonts/inter-latin-wght-normal.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: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("/vendor/oink/fonts/ibm-plex-sans-latin-wght-normal.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: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/vendor/oink/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/vendor/oink/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
}

:root[data-theme="paper"][data-color-scheme="light"] {
  --theme-page: #f7f6f3;
  --theme-surface: #ffffff;
  --theme-surface-raised: #fbfaf8;
  --theme-surface-muted: #efede8;
  --theme-text: #21201c;
  --theme-text-soft: #56534c;
  --theme-muted: #6b665d;
  --theme-border: rgba(33, 32, 28, 0.12);
  --theme-border-strong: rgba(33, 32, 28, 0.22);
  --theme-accent: #2b5f8c;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 9%, var(--theme-surface-muted));
  --theme-focus: #2b5f8c;
  --theme-link: #2b5f8c;
  --theme-link-hover: #1d68a5;
  --theme-code: #2b2925;
  --theme-code-bg: rgba(33, 32, 28, 0.06);
  --theme-pre-bg: #ffffff;
  --theme-shadow: 0 2px 10px rgba(33, 32, 28, 0.07);
}
:root[data-theme="paper"][data-color-scheme="dark"] {
  --theme-page: #161513;
  --theme-surface: #1f1e1a;
  --theme-surface-raised: #262420;
  --theme-surface-muted: #1f1e1a;
  --theme-text: #ece9e3;
  --theme-text-soft: #b6b1a7;
  --theme-muted: #958f84;
  --theme-border: rgba(236, 233, 227, 0.13);
  --theme-border-strong: rgba(236, 233, 227, 0.26);
  --theme-accent: #7db5e6;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-surface-muted));
  --theme-focus: #7db5e6;
  --theme-link: #7db5e6;
  --theme-link-hover: #a3cdf3;
  --theme-code: #e6e1d8;
  --theme-code-bg: rgba(236, 233, 227, 0.08);
  --theme-pre-bg: #121110;
  --theme-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
:root[data-theme="slate"][data-color-scheme="light"] {
  --theme-page: #f1f4f8;
  --theme-surface: #ffffff;
  --theme-surface-raised: #f6f9fc;
  --theme-surface-muted: #e9eef4;
  --theme-text: #16222e;
  --theme-text-soft: #3d4e61;
  --theme-muted: #586b80;
  --theme-border: rgba(48, 74, 105, 0.14);
  --theme-border-strong: rgba(48, 74, 105, 0.3);
  --theme-accent: #245f94;
  --theme-accent-soft: rgba(36, 95, 148, 0.14);
  --theme-focus: #245f94;
  --theme-link: #245f94;
  --theme-link-hover: #1d6fc4;
  --theme-code: #b02a37;
  --theme-code-bg: rgba(48, 74, 105, 0.06);
  --theme-pre-bg: #ffffff;
  --theme-shadow: 0 2px 10px rgba(23, 42, 66, 0.08);
}
:root[data-theme="slate"][data-color-scheme="dark"] {
  --theme-page: #0b1119;
  --theme-surface: #121c29;
  --theme-surface-raised: #182435;
  --theme-surface-muted: #121c29;
  --theme-text: #e8eef6;
  --theme-text-soft: #b6c2d2;
  --theme-muted: #7f8da1;
  --theme-border: rgba(148, 176, 210, 0.16);
  --theme-border-strong: rgba(148, 176, 210, 0.32);
  --theme-accent: #5da2dd;
  --theme-accent-soft: rgba(93, 162, 221, 0.16);
  --theme-focus: #5da2dd;
  --theme-link: #5da2dd;
  --theme-link-hover: #7fb8e8;
  --theme-code: #f0899a;
  --theme-code-bg: rgba(148, 176, 210, 0.08);
  --theme-pre-bg: #0a0f16;
  --theme-shadow: 0 4px 18px rgba(2, 8, 18, 0.35);
}
:root[data-theme="ink"][data-color-scheme="light"] {
  --theme-page: #ffffff;
  --theme-surface: #ffffff;
  --theme-surface-raised: #ffffff;
  --theme-surface-muted: #f4f4f4;
  --theme-text: #141414;
  --theme-text-soft: #474747;
  --theme-muted: #636363;
  --theme-border: rgba(20, 20, 20, 0.24);
  --theme-border-strong: rgba(20, 20, 20, 0.55);
  --theme-accent: #c8102e;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 8%, var(--theme-page));
  --theme-focus: #c8102e;
  --theme-link: #141414;
  --theme-link-hover: #c8102e;
  --theme-code: #141414;
  --theme-code-bg: rgba(20, 20, 20, 0.05);
  --theme-pre-bg: #fafafa;
  --theme-shadow: none;
}
:root[data-theme="ink"][data-color-scheme="dark"] {
  --theme-page: #0b0b0b;
  --theme-surface: #161616;
  --theme-surface-raised: #161616;
  --theme-surface-muted: #161616;
  --theme-text: #ededed;
  --theme-text-soft: #b5b5b5;
  --theme-muted: #8f8f8f;
  --theme-border: rgba(237, 237, 237, 0.24);
  --theme-border-strong: rgba(237, 237, 237, 0.5);
  --theme-accent: #ff5c4d;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 8%, var(--theme-page));
  --theme-focus: #ff5c4d;
  --theme-link: #ededed;
  --theme-link-hover: #ff5c4d;
  --theme-code: #ededed;
  --theme-code-bg: rgba(237, 237, 237, 0.06);
  --theme-pre-bg: #111111;
  --theme-shadow: none;
}
:root[data-theme="terminal"][data-color-scheme="light"] {
  --theme-page: #f4f5f2;
  --theme-surface: #f8f9f6;
  --theme-surface-raised: #f8f9f6;
  --theme-surface-muted: #e9ebe6;
  --theme-text: #1d211f;
  --theme-text-soft: #4a514d;
  --theme-muted: #606b63;
  --theme-border: rgba(29, 33, 31, 0.32);
  --theme-border-strong: rgba(29, 33, 31, 0.55);
  --theme-accent: #935400;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-page));
  --theme-focus: #935400;
  --theme-link: #0a6560;
  --theme-link-hover: #084f4b;
  --theme-code: #1d211f;
  --theme-code-bg: rgba(29, 33, 31, 0.05);
  --theme-pre-bg: #ffffff;
  --theme-shadow: none;
}
:root[data-theme="terminal"][data-color-scheme="dark"] {
  --theme-page: #0c0f0e;
  --theme-surface: #18201c;
  --theme-surface-raised: #18201c;
  --theme-surface-muted: #141a18;
  --theme-text: #d3dbd6;
  --theme-text-soft: #9aa59f;
  --theme-muted: #8b9990;
  --theme-border: rgba(211, 219, 214, 0.32);
  --theme-border-strong: rgba(211, 219, 214, 0.55);
  --theme-accent: #f0a73a;
  --theme-accent-soft: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-page));
  --theme-focus: #f0a73a;
  --theme-link: #4cc9bd;
  --theme-link-hover: #7de0d7;
  --theme-code: #d3dbd6;
  --theme-code-bg: rgba(211, 219, 214, 0.07);
  --theme-pre-bg: #0a0d0b;
  --theme-shadow: none;
}
:root[data-theme] {
  --theme-ui-font: "Inter", var(--sans);
  --theme-body-font: "Inter", var(--sans);
  --theme-heading-font: "Inter", var(--sans);
  --theme-code-font: "IBM Plex Mono", var(--mono);
}
:root[data-theme="paper"], :root[data-theme="slate"] {
  --theme-radius-s: 4px;
  --theme-radius-m: 6px;
  --theme-radius-l: 8px;
}
:root[data-theme="ink"] { --theme-radius-s: 0; --theme-radius-m: 0; --theme-radius-l: 0; }
:root[data-theme="paper"] {
  --theme-ui-font: "IBM Plex Sans", var(--sans);
  --theme-body-font: "IBM Plex Sans", var(--sans);
  --theme-heading-font: "IBM Plex Sans", var(--sans);
}
:root[data-theme="terminal"] {
  --theme-radius-s: 2px;
  --theme-radius-m: 2px;
  --theme-radius-l: 2px;
  --theme-ui-font: "IBM Plex Mono", var(--mono);
  --theme-body-font: "IBM Plex Sans", var(--sans);
  --theme-heading-font: "IBM Plex Mono", var(--mono);
}

:root[data-theme],
:root[data-theme] body {
  --page: var(--theme-page);
  --surface: var(--theme-surface);
  --surface-raised: var(--theme-surface-raised);
  --surface-muted: var(--theme-surface-muted);
  --text: var(--theme-text);
  --text-soft: var(--theme-text-soft);
  --muted: var(--theme-muted);
  --border: var(--theme-border);
  --border-strong: var(--theme-border-strong);
  --accent: var(--theme-accent);
  --accent-soft: var(--theme-accent-soft);
  --focus: var(--theme-focus);
  --shadow: var(--theme-shadow);
  --left: var(--theme-left);
  --left-soft: var(--theme-left-soft);
  --right: var(--theme-right);
  --right-soft: var(--theme-right-soft);
  --add: var(--theme-add);
  --add-soft: var(--theme-add-soft);
  --delete: var(--theme-delete);
  --delete-soft: var(--theme-delete-soft);
  --pending: var(--theme-pending);
  --pending-soft: var(--theme-pending-soft);
  --radius-s: var(--theme-radius-s);
  --radius-m: var(--theme-radius-m);
  --radius-l: var(--theme-radius-l);
}
:root[data-theme] body { font-family: var(--theme-body-font); }
:root[data-theme] :is(h1, h2, h3, h4) { font-family: var(--theme-heading-font); }
:root[data-theme] :is(button, input, select, .topbar) { font-family: var(--theme-ui-font); }
:root[data-theme] :is(pre, code, kbd, samp) { font-family: var(--theme-code-font); }

:root[data-color-scheme="light"] {
  color-scheme: light;
  --theme-left: #2767a6;
  --theme-left-soft: #e7f0fa;
  --theme-right: #936219;
  --theme-right-soft: #f7eedc;
  --theme-add: #16815c;
  --theme-add-soft: #e1f3eb;
  --theme-delete: #b64943;
  --theme-delete-soft: #fae8e6;
  --theme-pending: #8b671e;
  --theme-pending-soft: #f7efdc;
  --theme-shadow: 0 6px 20px rgb(20 24 32 / 7%);
}

:root[data-color-scheme="dark"] {
  color-scheme: dark;
  --theme-left: #74ace3;
  --theme-left-soft: #1c344a;
  --theme-right: #e0ad5e;
  --theme-right-soft: #42351f;
  --theme-add: #5fc59f;
  --theme-add-soft: #173a2f;
  --theme-delete: #ee8b84;
  --theme-delete-soft: #472725;
  --theme-pending: #e0b661;
  --theme-pending-soft: #40351f;
  --theme-shadow: 0 10px 26px rgb(0 0 0 / 28%);
}

.site-theme { position: relative; flex: 0 0 auto; font-family: var(--theme-ui-font); }
.site-theme-trigger { position: relative; }
.site-theme-trigger svg { width: 17px; height: 17px; }
.site-theme-trigger[aria-expanded="true"] { background: var(--surface-muted); color: var(--text); }
.site-theme-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 50;
  width: min(268px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.site-theme-panel[hidden] { display: none; }
.site-theme-panel fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.site-theme-panel fieldset + fieldset { margin-top: 16px; }
.site-theme-panel legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: 11px; }
.site-theme-choices { display: grid; gap: 5px; }
.site-theme-preset .site-theme-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-theme-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.site-theme-choice:hover { background: var(--surface-muted); }
.site-theme-choice[data-selected="true"] { border-color: var(--border-strong); background: var(--surface-raised); color: var(--text); }
.site-theme-choice:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.site-theme-choice input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.site-theme-swatch { width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid rgb(127 127 127 / 45%); border-radius: 50%; }
.site-theme-swatch[data-preset="paper"] { background: #f7f6f3; }
.site-theme-swatch[data-preset="slate"] { background: #245f94; }
.site-theme-swatch[data-preset="ink"] { background: #141414; }
.site-theme-swatch[data-preset="terminal"] { background: #0a6560; }
.site-theme-mode .site-theme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-muted); }
.site-theme-mode .site-theme-choice { justify-content: center; gap: 5px; min-height: 31px; padding: 5px 3px; border-color: transparent; }
.site-theme-mode .site-theme-choice[data-selected="true"] { background: var(--surface); }
.site-theme-mode svg { width: 13px; height: 13px; flex: 0 0 13px; }

@media (max-width: 640px) {
  .site-theme-panel { padding: 12px; }
}
