:root {
  color-scheme: dark;
  font: 14px/1.5 system-ui, sans-serif;
  color: #e8eaed;
  background: #111317;
  --passkey-auth-background: #191c22;
  --passkey-auth-color: #e8eaed;
  --passkey-auth-accent: #b7cef7;
  --passkey-auth-button-color: #101a2b;
}
* {
  box-sizing: border-box;
}
body {
  display: flow-root;
  margin: 0;
  min-height: 100dvh;
}
[hidden] {
  display: none !important;
}
#login {
  width: min(100% - 2rem, 30rem);
  margin: clamp(1rem, 4vh, 3rem) auto 2rem;
}
h1 {
  margin-bottom: 0;
  font-size: 2rem;
  letter-spacing: -.05em;
}
header p,
.hint {
  color: #adb4bf;
}
.hint {
  font-size: .85rem;
}
#notice {
  overflow-wrap: anywhere;
}
#recovery {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.error-details {
  min-width: 0;
  margin: 1rem 0;
  padding: .75rem;
  border: 1px solid #455167;
  border-radius: .5rem;
  background: #191c22;
}
.error-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.error-details h2 {
  margin: 0;
  font-size: 1rem;
}
.error-details button {
  min-height: 44px;
}
.error-details textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: .5rem;
  padding: .6rem;
  border: 1px solid #414751;
  border-radius: .35rem;
  color: inherit;
  background: #111317;
  font: 16px/1.4 ui-monospace, monospace;
  overflow-wrap: anywhere;
  resize: vertical;
  user-select: text;
  -webkit-user-select: text;
}
.error-copy-status {
  margin: .5rem 0 0;
  color: #b9c0cc;
  font-size: .85rem;
}
.error-copy-status:empty {
  display: none;
}
button,
.nav a {
  color: inherit;
  font: inherit;
  border: 1px solid #414751;
  border-radius: .35rem;
  background: #222630;
  padding: .4rem .75rem;
  cursor: pointer;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #b7cef7;
  outline-offset: 2px;
}
button:disabled {
  opacity: .6;
  cursor: wait;
}
#content,
#content > div {
  display: flow-root;
  height: 100dvh;
  min-height: 0;
}
.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .35rem .65rem;
  border-bottom: 1px solid #303640;
  background: #191c22;
}
.brand {
  font-weight: 750;
}
.nav {
  display: flex;
  gap: .35rem;
}
.nav a {
  border-color: transparent;
  padding: .25rem .65rem;
}
.nav a[aria-current="page"] {
  background: #35415a;
  color: #e1ebff;
}
.toolbar-status {
  margin-left: auto;
  color: #b9c0cc;
  font-size: .85rem;
}
.frames {
  position: relative;
  min-height: 0;
}
.frames iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #111317;
}
.frames iframe.inactive {
  visibility: hidden;
  pointer-events: none;
}
.problem {
  padding: 2rem;
  max-width: 40rem;
  margin: auto;
}
.problem button {
  margin-right: .5rem;
}
.approval-panel {
  width: min(100% - 2rem, 40rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border: 1px solid #455167;
  border-radius: .75rem;
  padding: 1.25rem;
  color: #e8eaed;
  background: #191c22;
}
.approval-panel::backdrop {
  background: #0009;
}
.approval-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.approval-panel h2 {
  margin: 0;
  font-size: 1.25rem;
}
@media (max-width: 36rem) {
  .toolbar {
    gap: .35rem;
    flex-wrap: wrap;
  }
  .toolbar-status {
    max-width: 8rem;
    line-height: 1.2;
  }
  .nav a,
  .toolbar button {
    padding: .3rem .5rem;
  }
}

/* A quiet landing page remains in control until an app is explicitly chosen. */
.app-chooser {
  width: min(100% - 3rem, 44rem);
  margin: clamp(2rem, 7vh, 5.5rem) auto;
  padding-bottom: 1.5rem;
}
.chooser-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: #c4d6ff;
  color: #142238;
  border-radius: .6rem;
}
.access-badge {
  margin-left: auto;
  color: #a7cfb7;
  border: 1px solid #365547;
  border-radius: 1rem;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 500;
}
.chooser-intro {
  margin: 2.5rem 0 1.6rem;
}
.eyebrow {
  color: #a8b8d3;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: .7rem;
  font-weight: 650;
  margin: 0 0 .55rem;
}
.chooser-intro h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.045em;
  margin: 0;
  max-width: 36rem;
}
.chooser-intro > p:last-child {
  color: #aeb8c9;
  margin: .85rem 0 0;
}
.app-cards {
  display: grid;
  gap: .9rem;
}
.access-allowance {
  color: #dce8ff;
  background: #28354b;
  border: 1px solid #415678;
  border-radius: .6rem;
  padding: .7rem .9rem;
  margin: 0 0 1.1rem;
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.app-card {
  color: inherit;
  font: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 1.15rem;
  padding: 1.5rem;
  border: 1px solid #384252;
  border-radius: 1rem;
  background: #1b212b;
  transition: border-color .15s, background .15s;
}
.app-card:hover {
  background: #222b38;
  border-color: #8aabde;
}
.app-icon {
  display: grid;
  place-items: center;
  flex: 0 0 3.2rem;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: .85rem;
  color: #b7cefa;
  background: #2c3b55;
}
.app-icon svg {
  width: 1.6rem;
  height: 1.6rem;
}
.model-icon {
  background: #383047;
  color: #d4bdec;
}
.app-card-copy {
  display: grid;
  gap: .3rem;
  min-width: 0;
}
.app-card-copy strong {
  font-size: 1.2rem;
  font-weight: 650;
}
.app-card-copy > span {
  color: #aeb8c9;
  font-size: .9rem;
}
.app-arrow {
  display: grid;
  place-items: center;
  margin-left: auto;
  color: #b8c7dc;
  flex: 0 0 1.25rem;
}
.app-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}
.selector-preference {
  margin-top: 1.4rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #303946;
  border-radius: .85rem;
  background: #151a22;
}
.selector-preference label {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  cursor: pointer;
}
.selector-preference input {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  margin: .23rem 0 0;
  accent-color: #c4d6ff;
}
.selector-preference label > span {
  display: grid;
  gap: .25rem;
}
.selector-preference strong {
  font-weight: 600;
}
.selector-preference label span > span,
.selector-hint {
  color: #aab5c6;
  font-size: .85rem;
}
.selector-hint {
  margin: .8rem 0 0 1.9rem;
}
.chooser-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}
.app-install {
  margin-top: 1.4rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #303946;
  border-radius: .85rem;
  background: #151a22;
}
.app-install p {
  color: #aab5c6;
  font-size: .85rem;
  margin: .45rem 0 0;
}
.app-install button {
  min-height: 44px;
  margin-top: .8rem;
}
.app-install-status:empty {
  display: none;
}
.chooser-footer button {
  min-height: 44px;
  border-color: #3a4556;
  background: transparent;
  border-radius: .65rem;
}
.chooser-status {
  color: #b7cefa;
  overflow-wrap: anywhere;
  margin-bottom: 0;
}
.chooser-status:empty {
  display: none;
}
@media (max-width: 36rem) {
  #login {
    width: min(100% - 2rem, 32rem);
    margin: 2rem auto;
  }
  .app-chooser {
    width: calc(100% - 2rem);
    margin-top: 1.5rem;
  }
  .chooser-intro {
    margin-top: 2rem;
  }
  .app-card {
    padding: 1.15rem;
    gap: .85rem;
  }
  .app-icon {
    flex-basis: 2.7rem;
    width: 2.7rem;
    height: 2.7rem;
  }
  .selector-preference {
    padding: 1rem;
  }
}
