@font-face {
  font-family: "Bebas Neue";
  src: url(/bebas-neue.woff2) format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url(/space-grotesk.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --ink: #fff;
  --muted: #a9a9ae;
  --line: #29292c;
  --surface: #121214;
  --accent: #db5906;
  --highlight: #ff995d;
  --gutter: clamp(20px, 5vw, 52px);
  --content: 1120px;
  font: 16px/1.5 "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
p { color: var(--muted); overflow-wrap: anywhere; }

.shell, .shell-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
}
.shell {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: #0a0a0b;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
}
.brand img { display: block; width: 34px; height: auto; }
.shell-context {
  margin-right: auto;
  padding-left: 16px;
  border-left: 1px solid #36363a;
  color: var(--muted);
  font-size: .81rem;
  white-space: nowrap;
}
.shell-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  padding-block: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

main {
  flex: 1;
  width: min(calc(100% - 2 * var(--gutter)), var(--content));
  margin-inline: auto;
}
.entry { display: grid; align-content: center; padding-block: clamp(40px, 8vh, 90px); }
.workspace { padding-block: clamp(36px, 6vw, 76px) 70px; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1 {
  font: 400 clamp(3.8rem, 7.2vw, 6.6rem)/.93 "Bebas Neue", "Arial Narrow", sans-serif;
  letter-spacing: .005em;
}
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: -.04em; }
h3 { font-size: .96rem; font-weight: 600; }
.label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.accent { color: var(--highlight); }

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(32px, 6.5vw, 92px);
  width: min(100%, 920px);
  margin-inline: auto;
}
.auth-copy { min-width: 0; }
.auth-copy h1, .intro h1 { margin-block: 12px 14px; }
.auth-copy > p:last-child, .intro > p:last-child { max-width: 36ch; font-size: clamp(1rem, 1.5vw, 1.18rem); text-wrap: pretty; }
.auth-panel {
  display: grid;
  gap: 17px;
  padding: clamp(20px, 3.5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(155deg, #171719, #101012);
  box-shadow: 0 16px 48px #0005;
}
.auth-panel button { width: 100%; margin-top: 4px; }
.back-link { justify-self: center; color: var(--muted); font-size: .9rem; text-underline-offset: 3px; }

label { display: grid; gap: 7px; min-width: 0; font-size: .9rem; font-weight: 600; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #545459;
  border-radius: 10px;
  background: #0a0a0b;
  color: var(--ink);
  font: 400 1rem/1.4 "Space Grotesk", system-ui, sans-serif;
}
textarea { min-height: 82px; resize: vertical; }
input[type="file"] { padding: 8px; }
input::file-selector-button {
  margin-right: 8px;
  padding: 5px 9px;
  border: 1px solid #45454a;
  border-radius: 6px;
  background: #222225;
  color: var(--ink);
  font: inherit;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 9px 19px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--accent);
  color: var(--bg);
  font: 700 .92rem/1.25 "Space Grotesk", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
button:hover, .button:hover { background: #ef7429; }
button.quiet { background: transparent; border-color: #39393d; color: var(--ink); font-size: .8rem; }
button.quiet:hover { background: #232326; border-color: #64646a; }

.intro > p:last-child { max-width: 52ch; }
.intro h1 { font-size: clamp(3.35rem, 7vw, 5.5rem); }
.intro { padding-bottom: clamp(23px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.notice, .empty-state {
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
.entry .notice { width: min(100%, 920px); margin-inline: auto; }
.intro + .notice, .empty-state { margin-top: 22px; }
.error { border-color: #9f5530; color: #ffc39e; }
.notice p, .empty-state p { margin-top: 6px; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  align-items: start;
  gap: 10px;
  margin-top: 18px;
}
details { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #101011; }
details[open] { border-color: #48484b; }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  font-size: .9rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
summary:hover { color: var(--highlight); }
details form { display: grid; gap: 10px; padding: 4px 14px 15px; }
details .access { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; overflow-wrap: anywhere; }

.projects { display: grid; gap: 16px; margin-top: 24px; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(20px, 4vw, 46px);
  padding: clamp(20px, 3.5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.project-heading h2 { margin-block: 6px 9px; }
.demo-action { display: grid; justify-items: start; gap: 9px; margin-top: 20px; }
.demo-action span, .document-list > p { color: var(--muted); font-size: .85rem; }
.document-list { border-left: 1px solid var(--line); padding-left: clamp(20px, 4vw, 46px); }
.document-list h3 { margin-bottom: 9px; }
.document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 12px;
  align-items: center;
  min-height: 51px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  font-size: .94rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.document:hover { color: var(--highlight); }
.document small { grid-column: 1; color: var(--muted); }
.document > span:last-child { grid-area: 1 / 2 / 3 / 3; font-size: 1.1rem; }
.project-tools { grid-column: 1 / -1; margin-top: 0; }

@media (max-width: 720px) {
  .entry { align-content: start; }
  .auth { max-width: 460px; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  h1 { font-size: clamp(3.35rem, 10vw, 4.65rem); }
  .project { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .document-list { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
}
@media (max-width: 480px) {
  .shell { gap: 10px; }
  .shell-context { padding-left: 10px; }
  .shell form button { padding-inline: 10px; }
  .brand img { width: 30px; }
  .brand { gap: 6px; }
}
@media (max-width: 350px) {
  .shell-context { display: none; }
  .shell form { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  button, .button { transition: none; }
}
