.frontier-shell {
  min-height: 0;
  height: 100dvh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background: #fbfbfa;
  color: #141414;
  overflow: hidden;
  font-size: 15px;
}

.frontier-shell *,
.frontier-shell *::before,
.frontier-shell *::after {
  box-sizing: border-box;
}

.frontier-shell[hidden] {
  display: none !important;
}

.frontier-sidebar {
  border-right: 1px solid #ececea;
  background: #f7f7f5;
  padding: 20px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.frontier-sidebar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 8px;
}

.frontier-settings-nav {
  display: none;
  align-content: start;
  gap: 8px;
  padding-top: 24px;
}

.frontier-settings-nav-kicker {
  color: #8b8982;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.frontier-settings-nav-title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 750;
}

.frontier-settings-nav-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #e3e2dc;
  border-radius: 8px;
  background: #ffffff;
  color: #242421;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.frontier-settings-nav-item span {
  font-weight: 700;
}

.frontier-settings-nav-item small {
  color: #8b8982;
  font-size: 12px;
}

.frontier-settings-nav-item.is-active {
  border-color: #242421;
  box-shadow: inset 3px 0 #242421;
}

.frontier-settings-nav-item:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.frontier-settings-nav-item small {
  line-height: 1.2;
}

.frontier-settings-page[hidden] {
  display: none !important;
}

.frontier-access-head,
.frontier-access-directory-head,
.frontier-access-editor-head,
.frontier-access-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.frontier-access-head {
  margin-bottom: 18px;
}

.frontier-access-head h3,
.frontier-access-editor-head h3 {
  margin: 0;
  font-size: 20px;
}

.frontier-access-head p,
.frontier-access-fieldset p {
  color: #746f63;
  margin: 5px 0 0;
  line-height: 1.45;
}

.frontier-access-head > span,
.frontier-access-directory-head span,
.frontier-access-policy-status,
#frontierAccessStatus {
  color: #746f63;
  font-size: 13px;
}

.frontier-access-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.28fr);
  gap: 18px;
  min-height: 0;
  position: relative;
}

.frontier-access-directory,
.frontier-access-editor {
  border: 1px solid #e4e3dd;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.frontier-access-directory {
  padding: 16px;
}

.frontier-access-directory-head {
  margin-bottom: 12px;
}

.frontier-access-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #deddd7;
  border-radius: 7px;
  padding: 0 11px;
  font: inherit;
  color: inherit;
  background: #fbfbfa;
}

.frontier-access-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  max-height: 520px;
  overflow-y: auto;
}

.frontier-access-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.frontier-access-user:hover,
.frontier-access-user.is-selected {
  background: #f2f2ed;
  border-color: #deddd7;
}

.frontier-access-user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.frontier-access-user-meta {
  display: block;
  color: #8b8982;
  font-size: 12px;
  margin-top: 3px;
}

.frontier-access-user-state {
  border-radius: 999px;
  padding: 4px 8px;
  color: #746f63;
  background: #f0f0eb;
  font-size: 11px;
  white-space: nowrap;
}

.frontier-access-user-state.is-enabled {
  color: #1d5a46;
  background: #e5f1eb;
}

.frontier-access-editor {
  padding: 20px;
}

.frontier-access-editor-head {
  padding-bottom: 16px;
  border-bottom: 1px solid #ecebe6;
}

.frontier-settings-eyebrow-label {
  display: block;
  color: #8b8982;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.frontier-access-policy-status {
  border: 1px solid #e1e0da;
  border-radius: 999px;
  padding: 6px 9px;
}

.frontier-access-switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 17px 0;
  border-bottom: 1px solid #ecebe6;
  cursor: pointer;
}

.frontier-access-switch input,
.frontier-access-options input {
  accent-color: #285b4b;
}

.frontier-access-switch span,
.frontier-access-switch small {
  display: block;
}

.frontier-access-switch small {
  color: #746f63;
  margin-top: 3px;
}

.frontier-access-fieldset {
  border: 0;
  border-bottom: 1px solid #ecebe6;
  margin: 0;
  padding: 17px 0;
}

.frontier-access-fieldset legend {
  font-weight: 750;
  padding: 0;
}

.frontier-access-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.frontier-access-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e0dfd9;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fbfbfa;
  cursor: pointer;
}

.frontier-access-options label.is-unavailable {
  cursor: not-allowed;
  opacity: 0.62;
}

.frontier-access-options label small,
.frontier-access-options label em {
  color: #8b8982;
  font-size: 11px;
  font-style: normal;
}

.frontier-access-budget {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  margin-top: 12px;
}

.frontier-access-budget label {
  display: grid;
  gap: 5px;
  color: #746f63;
  font-size: 12px;
}

.frontier-access-budget input,
.frontier-access-budget select {
  min-height: 38px;
  width: 100%;
  border: 1px solid #deddd7;
  border-radius: 7px;
  padding: 0 10px;
  background: #fbfbfa;
  color: #242421;
  font: inherit;
}

.frontier-access-editor-actions {
  padding-top: 17px;
}

.frontier-primary-action {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 15px;
  background: #20201d;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#frontierAccessSaveStatus {
  color: #746f63;
  font-size: 13px;
}

.frontier-access-no-selection {
  grid-column: 2;
  padding: 44px 20px;
  border: 1px dashed #d8d7d1;
  border-radius: 8px;
  color: #746f63;
  text-align: center;
}

.frontier-access-no-selection[hidden] {
  display: none;
}

.frontier-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #20201d;
  color: #f7f7f3;
  font-weight: 700;
}

.frontier-kicker {
  font-size: 11px;
  letter-spacing: 0;
  color: #746f63;
  font-weight: 700;
}

.frontier-sidebar h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.frontier-collapse {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
}

.frontier-back,
.frontier-send,
.frontier-capability,
.frontier-model-pill,
.frontier-admin-link,
.frontier-side-action {
  border: 1px solid rgba(32, 32, 29, 0.14);
  background: #ffffff;
  color: #20201d;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
}

.frontier-sidebar-actions {
  display: grid;
  gap: 8px;
}

.frontier-side-action {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 0 6px;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
}

.frontier-side-action span {
  width: 22px;
  text-align: center;
}

.frontier-search-wrap input {
  width: 100%;
  border: 1px solid rgba(32, 32, 29, 0.12);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 11px;
  color: inherit;
}

.frontier-history-empty {
  color: #746f63;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 0;
}

.frontier-history-group {
  display: grid;
  gap: 8px;
}

.frontier-history-label {
  color: #8b8982;
  font-size: 13px;
}

.frontier-history-item {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #3b3b39;
  cursor: pointer;
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.frontier-history-row .frontier-history-item {
  min-width: 0;
  width: 100%;
}

.frontier-history-date {
  color: #9a978f;
  font-size: 11px;
  white-space: nowrap;
}

.frontier-history-delete {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a8780;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.frontier-history-row:hover .frontier-history-delete,
.frontier-history-row:focus-within .frontier-history-delete {
  opacity: 1;
}

.frontier-history-delete:hover {
  background: #ebe9e3;
  color: #9f2d2d;
}

.frontier-history-item.is-active {
  background: #eeeee9;
}

.frontier-admin-card {
  border-top: 1px solid rgba(32, 32, 29, 0.1);
  margin-top: auto;
  padding: 12px 4px 0;
  display: grid;
  gap: 8px;
}

.frontier-admin-card[hidden] {
  display: none !important;
}

.frontier-admin-card-title {
  color: #746f63;
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px;
}

.frontier-admin-link {
  width: 100%;
  text-align: left;
  min-height: 34px;
  background: transparent;
}

.frontier-admin-link.is-active {
  background: #ffffff;
  border-color: rgba(32, 32, 29, 0.2);
  font-weight: 650;
}

.frontier-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.frontier-topbar {
  min-height: 56px;
  border-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 26px 0;
  background: #fbfbfa;
}

.frontier-topbar-context {
  display: grid;
  gap: 1px;
  min-width: 84px;
  margin-left: 4px;
}

.frontier-topbar-context span {
  color: #8b8982;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.frontier-topbar-context strong {
  font-size: 14px;
  line-height: 1.2;
}

.frontier-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.frontier-mode-pill,
.frontier-budget {
  border: 1px solid #e7e7e3;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ffffff;
  color: #5d594f;
  font-size: 13px;
  white-space: nowrap;
}

.frontier-model-pill,
.frontier-provider-select {
  border-radius: 999px;
  color: #2d5a48;
  background: #e8f3ed;
  max-width: min(360px, 45vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-provider-select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #e2e2dd;
  font: inherit;
  color: #141414;
  background: #ffffff;
}

.frontier-topbar-actions {
  display: flex;
  gap: 8px;
}

.frontier-topbar-actions button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #696965;
  font: inherit;
  font-size: 20px;
}

.frontier-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.frontier-chat-stage {
  min-width: 0;
  display: grid;
  align-items: stretch;
  justify-items: center;
  padding: 68px 32px 28px;
  overflow: auto;
}

.frontier-workspace.is-settings-open {
  grid-template-columns: minmax(0, 1fr);
}

.frontier-workspace.is-settings-open .frontier-chat-stage,
.frontier-workspace.is-settings-open .frontier-artifact-rail {
  display: none;
}

.frontier-empty-state {
  width: min(780px, 100%);
  text-align: center;
  align-self: center;
}

.frontier-empty-title {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.18;
  font-weight: 700;
  margin-bottom: 10px;
}

.frontier-empty-state p {
  margin: 0 auto 22px;
  max-width: 560px;
  color: #625e55;
  line-height: 1.5;
}

.frontier-thread {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.frontier-message {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.frontier-message-avatar {
  display: none;
}

.frontier-message-body {
  font-size: 17px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.frontier-message.user .frontier-message-body {
  background: #ffffff;
  color: #1e1e1c;
  justify-self: end;
  max-width: min(560px, 80%);
  border: 1px solid #e7e7e3;
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.03);
}

.frontier-message.assistant .frontier-message-body {
  max-width: min(880px, 100%);
  white-space: normal;
}

.frontier-message.assistant .frontier-message-body > :first-child {
  margin-top: 0;
}

.frontier-message.assistant .frontier-message-body > :last-child {
  margin-bottom: 0;
}

.frontier-message.assistant .frontier-message-body p,
.frontier-message.assistant .frontier-message-body ul,
.frontier-message.assistant .frontier-message-body ol,
.frontier-message.assistant .frontier-message-body blockquote,
.frontier-message.assistant .frontier-message-body pre,
.frontier-message.assistant .frontier-message-body table {
  margin: 0 0 14px;
}

.frontier-message.assistant .frontier-message-body h1,
.frontier-message.assistant .frontier-message-body h2,
.frontier-message.assistant .frontier-message-body h3,
.frontier-message.assistant .frontier-message-body h4 {
  margin: 20px 0 8px;
  line-height: 1.25;
}

.frontier-message.assistant .frontier-message-body ul,
.frontier-message.assistant .frontier-message-body ol {
  padding-left: 24px;
}

.frontier-message.assistant .frontier-message-body blockquote {
  border-left: 3px solid #d9d9d2;
  padding-left: 14px;
  color: #625e55;
}

.frontier-message.assistant .frontier-message-body code {
  border-radius: 5px;
  background: #f0f0eb;
  padding: 2px 5px;
  font-size: 0.9em;
}

.frontier-message.assistant .frontier-message-body pre {
  overflow-x: auto;
  border-radius: 8px;
  background: #20201d;
  color: #f6f5ef;
  padding: 14px 16px;
}

.frontier-message.assistant .frontier-message-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.frontier-message.assistant .frontier-message-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94em;
}

.frontier-message.assistant .frontier-message-body th,
.frontier-message.assistant .frontier-message-body td {
  border-bottom: 1px solid #e1e1db;
  padding: 8px 10px;
  text-align: left;
}

.frontier-worked {
  color: #77736c;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.frontier-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.frontier-prompt-row button {
  border: 1px solid rgba(32, 32, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #3c3933;
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
}

.frontier-artifact-rail {
  display: none;
  border-left: 1px solid #eeeeeb;
  background: #ffffff;
  padding: 18px;
  min-width: 0;
}

.frontier-workspace.has-artifact {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.frontier-workspace.has-artifact .frontier-artifact-rail {
  display: block;
}

.frontier-artifact-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.frontier-artifact-head span {
  color: #746f63;
  font-size: 12px;
  font-weight: 700;
}

.frontier-artifact-empty {
  border: 1px dashed rgba(32, 32, 29, 0.16);
  border-radius: 8px;
  color: #746f63;
  line-height: 1.45;
  padding: 18px;
}

.frontier-artifact-preview[hidden],
.frontier-create-menu[hidden] {
  display: none !important;
}

.frontier-artifact-preview h3 {
  margin: 0 0 5px;
  font-size: 18px;
  line-height: 1.25;
}

.frontier-artifact-preview p {
  color: #746f63;
  font-size: 13px;
  margin: 0 0 14px;
}

.frontier-artifact-download {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 7px;
  background: #20201d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.frontier-artifact-content {
  margin-top: 18px;
  max-height: 56vh;
  overflow: auto;
  border-top: 1px solid #ecebe6;
  padding-top: 15px;
  color: #3b3b39;
  font-size: 13px;
  line-height: 1.5;
}

.frontier-artifact-content h1,
.frontier-artifact-content h2,
.frontier-artifact-content h3 {
  line-height: 1.25;
  margin: 14px 0 6px;
}

.frontier-artifact-content p,
.frontier-artifact-content ul,
.frontier-artifact-content ol {
  margin: 0 0 10px;
}

.frontier-create-menu {
  position: absolute;
  bottom: 78px;
  left: max(28px, calc(50% - 490px));
  z-index: 4;
  display: grid;
  width: 250px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e2e1dc;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(20, 20, 20, 0.14);
}

.frontier-create-menu-title {
  padding: 5px 9px 8px;
  color: #746f63;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.frontier-create-menu button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #242421;
  padding: 9px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.frontier-create-menu button:hover {
  background: #f1f1ec;
}

.frontier-create-menu button span {
  color: #746f63;
  font-size: 12px;
}

.frontier-capability-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 700px;
  margin: 0 auto;
}

.frontier-capability {
  min-width: 0;
  font-weight: 650;
  min-height: 44px;
}

.frontier-capability.is-active {
  background: #20201d;
  color: #ffffff;
}

.frontier-settings-panel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1180px;
  justify-self: center;
  padding: 34px clamp(20px, 4vw, 54px) 46px;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.frontier-settings-panel[hidden] {
  display: none !important;
}

.frontier-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 34px;
}

.frontier-settings-head h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}

.frontier-settings-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #746f63;
  font-size: 12px;
  font-weight: 650;
}

.frontier-settings-eyebrow .frontier-mode-pill {
  color: #2d5a48;
  background: #e8f3ed;
  border-color: rgba(45, 90, 72, 0.16);
  font-size: 11px;
  font-weight: 700;
}

.frontier-settings-head p {
  margin: 0;
  color: #696965;
  max-width: 720px;
}

.frontier-provider-settings {
  margin-top: 0;
}

.frontier-provider-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e3;
  margin-bottom: 0;
}

.frontier-provider-settings-head h3 {
  margin: 0;
  font-size: 17px;
}

.frontier-provider-settings-head p {
  margin: 4px 0 0;
  color: #746f63;
  font-size: 13px;
}

.frontier-provider-settings-head span {
  color: #746f63;
  font-size: 13px;
}

.frontier-provider-config-list {
  display: grid;
  gap: 0;
  border-top: 0;
  min-width: 0;
}

.frontier-provider-row {
  border-bottom: 1px solid #e8e8e3;
  padding: 24px 0 26px;
  background: transparent;
}

.frontier-provider-row-main {
  display: grid;
  grid-template-columns: 140px repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.frontier-provider-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  min-width: 0;
}

.frontier-provider-row-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.frontier-provider-row-head strong {
  font-size: 16px;
}

.frontier-provider-row-head span {
  color: #746f63;
  font-size: 12px;
}

.frontier-provider-status {
  border: 1px solid rgba(159, 45, 45, 0.18);
  border-radius: 999px;
  color: #9f2d2d;
  padding: 5px 9px;
  white-space: nowrap;
}

.frontier-provider-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.frontier-provider-status[data-ready="true"] {
  border-color: rgba(45, 90, 72, 0.2);
  color: #2d5a48;
  background: #e8f3ed;
}

.frontier-provider-name {
  display: grid;
  gap: 4px;
}

.frontier-provider-name strong {
  font-size: 15px;
}

.frontier-provider-name span,
.frontier-provider-field span,
.frontier-provider-row-head span {
  color: #746f63;
  font-size: 12px;
}

.frontier-provider-field {
  display: grid;
  gap: 5px;
}

.frontier-provider-field input {
  border: 1px solid #dfdfda;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 10px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  min-width: 0;
}

.frontier-provider-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
}

.frontier-provider-head-actions button {
  border: 1px solid #dfdfda;
  border-radius: 10px;
  min-height: 36px;
  padding: 0 12px;
  background: #ffffff;
  color: #20201d;
  cursor: pointer;
  font: inherit;
}

.frontier-provider-head-actions button[data-action="save"] {
  background: #20201d;
  border-color: #20201d;
  color: #ffffff;
}

.frontier-provider-head-actions button[data-action="test"] {
  color: #2d5a48;
  background: #e8f3ed;
  border-color: rgba(45, 90, 72, 0.2);
}

.frontier-provider-actions {
  display: flex;
  gap: 6px;
}

.frontier-provider-actions button {
  border: 1px solid #dfdfda;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 10px;
  background: #ffffff;
  color: #20201d;
  cursor: pointer;
  font: inherit;
}

.frontier-provider-actions button:first-child {
  background: #20201d;
  border-color: #20201d;
  color: #ffffff;
}

.frontier-provider-actions button[data-action="test"] {
  color: #2d5a48;
  background: #e8f3ed;
  border-color: rgba(45, 90, 72, 0.2);
}

.frontier-provider-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.frontier-provider-caps label {
  border: 1px solid #dfdfda;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f7f7f3;
  color: #3c3933;
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
}

.frontier-provider-row-status {
  min-height: 18px;
  margin-top: 10px;
  color: #746f63;
  font-size: 13px;
}

.frontier-provider-toggle {
  min-height: 40px;
  padding: 0 2px;
}

.frontier-provider-toggle input,
.frontier-provider-caps input {
  accent-color: #2d5a48;
}

.frontier-settings-panel .frontier-back {
  flex: 0 0 auto;
}

.frontier-provider-row-status[data-tone="success"] {
  color: #2d5a48;
  font-weight: 650;
}

.frontier-provider-row-status[data-tone="error"] {
  color: #9f2d2d;
  font-weight: 650;
}

.frontier-composer-wrap {
  min-height: 82px;
  padding: 8px 28px 18px;
  background: linear-gradient(180deg, rgba(251, 251, 250, 0), #fbfbfa 34%);
  position: relative;
  z-index: 2;
}

.frontier-shell:not(.is-settings-open) .frontier-policy-line {
  display: none;
}

.frontier-shell:not(.is-settings-open) .frontier-topbar {
  padding-bottom: 4px;
}

.frontier-shell.is-settings-open .frontier-composer-wrap {
  display: none;
}

.frontier-shell.is-settings-open .frontier-topbar-center {
  display: none;
}

.frontier-shell.is-settings-open .frontier-settings-nav {
  display: grid;
}

.frontier-shell.is-settings-open .frontier-sidebar-actions,
.frontier-shell.is-settings-open .frontier-history-group {
  display: none;
}

.frontier-policy-line {
  max-width: 820px;
  margin: 0 auto 8px;
  color: #746f63;
  font-size: 13px;
}

.frontier-composer {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e6e6e1;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(20, 20, 20, 0.08);
}

.frontier-composer textarea {
  border: 0;
  outline: 0;
  resize: none;
  min-height: 42px;
  max-height: 180px;
  padding: 10px 6px;
  font: inherit;
  background: transparent;
  color: inherit;
}

.frontier-send {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  border-color: #111111;
  font-size: 22px;
  padding: 0;
}

.frontier-compose-plus {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: #4e4e49;
  font-size: 30px;
  line-height: 1;
}

.frontier-compose-model {
  color: #151515;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 8px;
}

.frontier-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

html[data-theme="dark"] .frontier-shell {
  background: #161716;
  color: #f0eee7;
}

html[data-theme="dark"] .frontier-sidebar {
  background: #1f201e;
  border-right-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-settings-nav-item {
  background: #272925;
  color: #f0eee7;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-settings-nav-item.is-active {
  border-color: #f0eee7;
  box-shadow: inset 3px 0 #f0eee7;
}

html[data-theme="dark"] .frontier-settings-nav-item small,
html[data-theme="dark"] .frontier-settings-nav-kicker {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-mark,
html[data-theme="dark"] .frontier-capability.is-active,
html[data-theme="dark"] .frontier-send {
  background: #f0eee7;
  color: #161716;
  border-color: #f0eee7;
}

html[data-theme="dark"] .frontier-new-chat,
html[data-theme="dark"] .frontier-back,
html[data-theme="dark"] .frontier-capability,
html[data-theme="dark"] .frontier-model-pill,
html[data-theme="dark"] .frontier-admin-link.is-active,
html[data-theme="dark"] .frontier-provider-field input,
html[data-theme="dark"] .frontier-provider-actions button,
html[data-theme="dark"] .frontier-provider-head-actions button,
html[data-theme="dark"] .frontier-composer,
html[data-theme="dark"] .frontier-search-wrap input,
html[data-theme="dark"] .frontier-mode-pill,
html[data-theme="dark"] .frontier-budget {
  background: #272925;
  color: #f0eee7;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-model-pill {
  color: #bbe6d0;
}

html[data-theme="dark"] .frontier-empty-state p,
html[data-theme="dark"] .frontier-policy-line,
html[data-theme="dark"] .frontier-history-empty,
html[data-theme="dark"] .frontier-kicker,
html[data-theme="dark"] .frontier-admin-card-title,
html[data-theme="dark"] .frontier-provider-settings-head span,
html[data-theme="dark"] .frontier-provider-name span,
html[data-theme="dark"] .frontier-provider-field span,
html[data-theme="dark"] .frontier-provider-row-head span,
html[data-theme="dark"] .frontier-provider-row-status,
html[data-theme="dark"] .frontier-artifact-head span,
html[data-theme="dark"] .frontier-artifact-empty {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-history-delete:hover {
  background: #2a2b27;
}

html[data-theme="dark"] .frontier-topbar-context span,
html[data-theme="dark"] .frontier-settings-eyebrow,
html[data-theme="dark"] .frontier-provider-settings-head p {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-settings-eyebrow .frontier-mode-pill {
  color: #bbe6d0;
  background: rgba(187, 230, 208, 0.08);
  border-color: rgba(187, 230, 208, 0.2);
}

html[data-theme="dark"] .frontier-admin-card {
  border-top-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-provider-caps label {
  background: #1f201e;
  color: #f0eee7;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-provider-actions button:first-child {
  background: #f0eee7;
  border-color: #f0eee7;
  color: #161716;
}

html[data-theme="dark"] .frontier-provider-head-actions button[data-action="save"] {
  background: #f0eee7;
  border-color: #f0eee7;
  color: #161716;
}

html[data-theme="dark"] .frontier-provider-actions button[data-action="test"],
html[data-theme="dark"] .frontier-provider-head-actions button[data-action="test"] {
  color: #bbe6d0;
}

html[data-theme="dark"] .frontier-provider-status {
  color: #ffb4a8;
  border-color: rgba(255, 180, 168, 0.2);
}

html[data-theme="dark"] .frontier-provider-status[data-ready="true"] {
  color: #bbe6d0;
  background: rgba(187, 230, 208, 0.08);
  border-color: rgba(187, 230, 208, 0.2);
}

html[data-theme="dark"] .frontier-message-body,
html[data-theme="dark"] .frontier-prompt-row button,
html[data-theme="dark"] .frontier-artifact-rail {
  background: #1f201e;
  color: #f0eee7;
  border-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-message.user .frontier-message-body {
  background: #f0eee7;
  color: #161716;
}

html[data-theme="dark"] .frontier-message.assistant .frontier-message-body blockquote {
  border-left-color: rgba(240, 238, 231, 0.24);
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-message.assistant .frontier-message-body code {
  background: #2a2b27;
}

html[data-theme="dark"] .frontier-message.assistant .frontier-message-body th,
html[data-theme="dark"] .frontier-message.assistant .frontier-message-body td {
  border-bottom-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-artifact-empty {
  border-color: rgba(240, 238, 231, 0.18);
}

html[data-theme="dark"] .frontier-artifact-preview,
html[data-theme="dark"] .frontier-artifact-content {
  color: #f0eee7;
}

html[data-theme="dark"] .frontier-artifact-preview p,
html[data-theme="dark"] .frontier-artifact-content {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-artifact-download {
  background: #f0eee7;
  color: #161716;
}

html[data-theme="dark"] .frontier-create-menu {
  background: #272925;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-create-menu button {
  color: #f0eee7;
}

html[data-theme="dark"] .frontier-create-menu button:hover {
  background: #2f302b;
}

html[data-theme="dark"] .frontier-create-menu button span,
html[data-theme="dark"] .frontier-create-menu-title {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-provider-row-status[data-tone="success"] {
  color: #bbe6d0;
}

html[data-theme="dark"] .frontier-provider-row-status[data-tone="error"] {
  color: #ffb4a8;
}

html[data-theme="dark"] .frontier-provider-config-list,
html[data-theme="dark"] .frontier-provider-row {
  border-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-provider-settings-head {
  border-bottom-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-access-directory,
html[data-theme="dark"] .frontier-access-editor {
  background: #1f201e;
  border-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-access-search input,
html[data-theme="dark"] .frontier-access-budget input,
html[data-theme="dark"] .frontier-access-budget select,
html[data-theme="dark"] .frontier-access-options label {
  background: #272925;
  color: #f0eee7;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-access-options label small,
html[data-theme="dark"] .frontier-access-options label em {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-access-user:hover,
html[data-theme="dark"] .frontier-access-user.is-selected {
  background: #2a2b27;
  border-color: rgba(240, 238, 231, 0.14);
}

html[data-theme="dark"] .frontier-access-head p,
html[data-theme="dark"] .frontier-access-fieldset p,
html[data-theme="dark"] .frontier-access-head > span,
html[data-theme="dark"] .frontier-access-directory-head span,
html[data-theme="dark"] .frontier-access-policy-status,
html[data-theme="dark"] .frontier-access-user-meta,
html[data-theme="dark"] .frontier-access-muted,
html[data-theme="dark"] .frontier-access-switch small,
html[data-theme="dark"] .frontier-access-budget label,
html[data-theme="dark"] #frontierAccessSaveStatus {
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-access-editor-head,
html[data-theme="dark"] .frontier-access-switch,
html[data-theme="dark"] .frontier-access-fieldset {
  border-bottom-color: rgba(240, 238, 231, 0.12);
}

html[data-theme="dark"] .frontier-access-user-state {
  background: #2a2b27;
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-access-user-state.is-enabled {
  background: rgba(187, 230, 208, 0.1);
  color: #bbe6d0;
}

html[data-theme="dark"] .frontier-access-no-selection {
  border-color: rgba(240, 238, 231, 0.18);
  color: #bdb7aa;
}

html[data-theme="dark"] .frontier-primary-action {
  background: #f0eee7;
  color: #161716;
}

@media (max-width: 860px) {
  .frontier-shell {
    grid-template-columns: 1fr;
  }

  .frontier-sidebar {
    display: none;
  }

  .frontier-workspace {
    grid-template-columns: 1fr;
  }

  .frontier-artifact-rail {
    display: none;
  }

  .frontier-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .frontier-topbar-center {
    width: 100%;
    justify-content: flex-start;
  }

  .frontier-capability-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontier-settings-head {
    display: grid;
  }

  .frontier-provider-row-main {
    grid-template-columns: 1fr;
  }

  .frontier-access-layout {
    grid-template-columns: 1fr;
  }

  .frontier-access-no-selection {
    grid-column: 1;
  }

  .frontier-access-editor {
    min-height: 0;
  }

  .frontier-provider-row-head {
    display: grid;
  }

  .frontier-provider-head-actions {
    justify-content: flex-start;
  }

  .frontier-provider-settings-head {
    display: grid;
  }

  .frontier-empty-title {
    font-size: 24px;
  }

  .frontier-model-pill {
    max-width: 100%;
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .frontier-provider-row-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frontier-provider-toggle {
    grid-column: 1 / -1;
  }
}
