:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24344c;
  background: #f5f7fa;
  font-synthesis: none;
  line-height: 1.5;
  --surface: #fff;
  --muted: #627089;
  --border: #dce3ed;
  --accent: #102b57;
  --focus: #376ede;
  --soft: #eff3f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 1; top: 1rem; left: 1rem; padding: .75rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 3.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: .8rem; padding: .25rem; text-decoration: none; font-size: 1.1rem; letter-spacing: -.025em; }
.brand img { border-radius: .65rem; flex: none; }
.brand strong { font-weight: 650; }
.header-start { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: .5rem; border: 1px solid transparent; border-radius: .5rem; background: transparent; color: inherit; cursor: pointer; flex: none; }
.icon-button[hidden] { display: none; }
.icon-button:hover { background: var(--soft); border-color: var(--border); }
.icon-button:active { background: var(--border); }
body:has(.navigation-drawer[open]) { overflow: hidden; }
.navigation-drawer { position: fixed; inset: 0 auto 0 0; margin: 0; width: min(22rem, calc(100vw - 3rem)); height: 100dvh; max-height: 100%; max-width: none; padding: 1.25rem; border: 0; border-right: 1px solid var(--border); background: var(--surface); color: inherit; box-shadow: 8px 0 40px #0002; overflow-y: auto; }
.navigation-drawer[open] { display: flex; flex-direction: column; }
.navigation-drawer::backdrop { background: #07142866; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.drawer-heading h2 { margin: 0; }
.drawer-heading form { margin: 0; }
.navigation-links { list-style: none; margin: 0; padding: .35rem; }
.navigation-links a { display: flex; align-items: center; gap: .85rem; min-height: 48px; padding: .75rem; border-radius: .5rem; text-decoration: none; font-size: .95rem; }
.navigation-links a[aria-current="page"] { color: var(--accent); background: var(--soft); font-weight: 600; }
.navigation-links a:hover { background: var(--border); }
.drawer-footer { margin: auto 0 0; padding: 2rem .35rem .35rem; color: var(--muted); font-size: .8rem; }
.drawer-footer span { display: block; margin-top: .3rem; font-size: .7rem; }
.version-badge { display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.version-badge span { padding: .25rem .55rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--soft); }

main { width: min(100%, 78rem); margin-inline: auto; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem); flex: 1; }
.page-heading { margin-bottom: 1.75rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; color: var(--accent); font-size: clamp(1.75rem, 4vw, 2.2rem); font-weight: 650; line-height: 1.25; letter-spacing: -.035em; }
.page-heading > p:last-child { color: var(--muted); margin: .65rem 0 0; font-size: .95rem; }
.workspace { display: grid; place-items: center; min-height: clamp(20rem, 48svh, 34rem); padding: 2.5rem 1.5rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface); box-shadow: 0 3px 16px #102b5705; }
.empty-state { text-align: center; max-width: 32rem; }
.workspace-symbol { display: grid; place-items: center; width: 5rem; height: 5rem; margin: 0 auto 1.5rem; background: var(--soft); color: var(--muted); border-radius: 1.25rem; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 .65rem; }
.empty-state p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.75; }
.scaffold-label { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.75rem; font-size: .7rem; color: var(--muted); }
.scaffold-label > span { width: .375rem; height: .375rem; background: #d69a34; border-radius: 50%; }
.app-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem); color: var(--muted); font-size: .7rem; }

@media (max-width: 36rem) {
  .app-header { gap: .75rem; }
  .header-start { gap: .35rem; }
  .brand { font-size: .95rem; gap: .6rem; }
  .brand img { width: 34px; height: 34px; }
  .version-badge { flex-direction: column; align-items: end; gap: .2rem; font-size: .65rem; }
  .workspace { padding-inline: 1.25rem; }
  .desktop-break { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root { color: #e0e7f2; background: #101722; --surface: #182230; --muted: #a4b2c7; --border: #2d3b50; --accent: #e0e7f2; --focus: #8eb4ff; --soft: #202e42; }
}
