:root {
  color-scheme: light;
  --paper: #f6f4ec;
  --ink: #17243c;
  --muted: #556174;
  --line: #d8dad5;
  --surface: #fcfbf6;
  --blue: #2455cf;
  font: 100%/1.55 "DM Sans", Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { line-height: 1.12; letter-spacing: -.05em; }
button, input, select { font: inherit; }
button, .btn, input, select { border: 1px solid var(--line); border-radius: .65rem; padding: .7rem 1rem; color: inherit; background: var(--surface); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { border-color: #8c9fbd; background: #eceff4; }
button:active, .btn:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .55; }
.primary, .github { background: var(--blue); border-color: var(--blue); color: white; }
.primary:hover, .github:hover { background: #1945b4; }
.danger { color: #a03429; }
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.7rem; font-weight: 700; letter-spacing: -.065em; line-height: 1; }
.brand img { width: 2rem; height: 2rem; }
.landing { display: grid; grid-template-rows: auto 1fr; min-height: 100svh; }
.masthead { border-bottom: 1px solid var(--line); padding: 1.25rem clamp(1.5rem, 5vw, 5rem); }
.entry { display: grid; place-items: center; padding: 3rem 1.5rem clamp(3rem, 12vh, 9rem); }
.form-box { width: min(100%, 22rem); min-width: 0; }
.form-box h1 { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 640; }
.form-box p, .card p, dialog p, .empty p, small, .subtle { color: var(--muted); }
.form-box > * + * { margin-top: .9rem; }
.form-box > .providers, .form-box > form { margin-top: 2rem; }
.providers { display: grid; gap: .7rem; }
.provider { gap: .7rem; min-height: 3.25rem; font-size: .97rem; }
.provider img { width: 1.2rem; height: 1.2rem; }
.form-box > strong, .form-box > .btn, .form-box > button { display: flex; }
.form-box > button { width: 100%; }
.shell { min-height: 100svh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 2.8rem; background: var(--paper); border-right: 1px solid var(--line); color: var(--ink); padding: 2rem 1rem; }
.sidebar .brand { padding: 0 .65rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar a { text-decoration: none; color: var(--muted); border-radius: .55rem; padding: .65rem .9rem; font-size: .94rem; }
.sidebar a:hover { background: #ecedea; }
.sidebar a[aria-current] { background: #e5ebfa; color: #1746b0; font-weight: 650; }
.account { border-top: 1px solid var(--line); padding: 1rem .65rem 0; margin-top: auto; overflow-wrap: anywhere; }
.workspace { padding: clamp(1.25rem, 4vw, 5rem); min-width: 0; width: 100%; max-width: 100rem; margin-inline: auto; }
.bar, .actions, form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.bar { justify-content: space-between; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.bar h1 { font-size: clamp(2rem, 3vw, 3rem); font-weight: 620; }
input, select { max-width: 100%; min-width: 0; }
form input { flex: 1 1 10rem; }
.pane { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(16rem, 1.7fr); gap: 1.3rem; }
.pane:not(:has(.detail)) { grid-template-columns: 1fr; }
.card, .list, .empty, .detail, dialog { background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; padding: clamp(1.2rem, 2.6vw, 2rem); min-width: 0; overflow-wrap: anywhere;  }
.list { height: fit-content; padding: 1rem; }
.list input { width: 100%; }
.items { margin-top: .7rem; }
.row { text-decoration: none; color: inherit; display: grid; gap: .25rem; padding: .9rem; border-radius: .6rem; overflow-wrap: anywhere; }
.row:hover, .row.active { background: #e9eef9; }
.card { margin: 1rem 0; }
.card > * + *, .detail > * + *, dialog > * + * { margin-top: .85rem; }
.card h2, .detail h2, dialog h2, .empty h2 { font-size: 1.55rem; font-weight: 620; }
.section { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.section h3 { font-size: 1rem; margin-bottom: .6rem; }
.content, blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote { margin: .7rem 0; border-left: 3px solid var(--blue); padding-left: 1rem; }
.empty { padding: clamp(2rem, 6vw, 6rem) 1.5rem; text-align: center; }
.empty p { margin: .8rem auto 1.3rem; max-width: 44ch; }
code { display: inline-block; border-radius: .4rem; padding: .25rem .5rem; background: #e9eef9; }
dialog { width: min(90vw, 30rem); color: inherit; }
dialog::backdrop { background: #17243c70; }
.loading { margin: 2rem; }
#notice { position: fixed; z-index: 9; bottom: 1.2rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; background: var(--ink); color: white; border-radius: .65rem; padding: .8rem 1.2rem; }
.mobile-back { display: none; }
@media (max-width: 800px) {
  .shell, .pane { display: block; }
  .sidebar { gap: 1.1rem; padding: 1rem; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .sidebar a { white-space: nowrap; }
  .account { display: none; }
  .pane:has(.detail) .list { display: none; }
  .mobile-back { display: inline-flex; }
}
