:root {
  color-scheme: light;
  --paper: #fffef4;
  --paper-soft: #f4f1df;
  --ink: #050505;
  --muted: #5a5a52;
  --line: #050505;
  --cyan: #43d8d4;
  --pink: #ff7eb6;
  --green: #dfff00;
  --yellow: #ffd84d;
  --white: #ffffff;
  --shadow: #050505;
  --danger: #d93636;
  --orange: #ff4b00;
  --display-font: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Arial Black', sans-serif;
  --mono-font: 'Courier New', Courier, monospace;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 18px 18px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 3px solid var(--line);
  background: rgba(255, 253, 241, 0.94);
  backdrop-filter: blur(10px);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  min-width: 0;
  font-weight: 900;
}

.brand span:last-child {
  overflow-wrap: anywhere;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid var(--line);
  background:
    linear-gradient(var(--cyan) 0 0) 0 0 / 8px 8px,
    linear-gradient(var(--yellow) 0 0) 8px 8px / 8px 8px,
    linear-gradient(var(--pink) 0 0) 14px 0 / 8px 8px,
    linear-gradient(var(--green) 0 0) 0 14px / 8px 8px,
    var(--white);
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

nav a {
  padding: 0.5rem 0.72rem;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

nav a:hover,
nav a:focus-visible {
  border-color: var(--line);
  color: var(--ink);
  background: var(--green);
  outline: none;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  min-height: min(720px, calc(100svh - 4.5rem));
  padding: clamp(2.2rem, 7vw, 5rem) 0 2rem;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-size: clamp(3.25rem, 10vw, 7rem);
  line-height: 0.88;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.95;
}

h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
  line-height: 1.1;
}

.admin-page h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
}

.hero-copy p:not(.eyebrow) {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.hero-actions,
.panel-title,
.mini-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 1.55rem;
}

.button,
.icon-button,
.tab-button,
.remove-page {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  font-weight: 900;
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.tab-button:hover,
.tab-button:focus-visible,
.remove-page:hover,
.remove-page:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
  outline: none;
}

.button.primary {
  background: var(--green);
}

.button.ghost {
  background: var(--white);
}

.button.small {
  min-height: 36px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 3rem 0 1rem;
}

.section-head .eyebrow {
  margin-bottom: 0.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.project-card,
.mini-site,
.login-panel,
.editor-panel {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--shadow);
}

.project-card {
  display: grid;
  min-height: 335px;
  padding: 0.9rem;
  gap: 0.9rem;
}

.project-card h3 {
  min-height: 2.4rem;
  overflow-wrap: anywhere;
}

.project-card p {
  color: var(--muted);
  line-height: 1.45;
}

.tagline {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.55rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.76rem;
  font-weight: 900;
}

.card-bottom {
  align-self: end;
  display: grid;
  gap: 0.75rem;
}



.mini-site {
  margin: 1rem 0 3rem;
  padding: 1rem;
}

.mini-site h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.mini-top {
  justify-content: space-between;
  align-items: flex-start;
}

.mini-description {
  max-width: 62rem;
  margin: 1rem 0 1.2rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--pink);
  font-weight: 900;
}



.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  font-weight: 800;
}

.tab-button[aria-selected="true"] {
  background: var(--green);
}

.page-panel {
  min-height: 180px;
  padding: 1rem;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  line-height: 1.6;
  white-space: pre-wrap;
}

.page-panel p {
  color: var(--muted);
}

.admin-zone {
  padding-bottom: 4rem;
}

.admin-page {
  padding-bottom: 4rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: start;
}

.login-panel,
.editor-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.setup-panel {
  width: min(100%, 520px);
}

[hidden],
.editor-panel[hidden],
.login-panel[hidden],
.mini-site[hidden] {
  display: none !important;
}

.panel-title {
  justify-content: space-between;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.publish-options {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.conditional-field {
  margin-top: 0.25rem;
}

input,
textarea,
select {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
  padding: 0.75rem;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  background: var(--white);
  box-shadow: 0 0 0 4px var(--green);
}

textarea {
  resize: vertical;
}

.pages-editor {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.page-field {
  display: grid;
  grid-template-columns: minmax(110px, 0.25fr) minmax(120px, 0.25fr) minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(18, 18, 18, 0.18);
}

.page-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.remove-page {
  width: 40px;
  height: 40px;
  background: var(--pink);
  font-weight: 900;
}

.form-message {
  min-height: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message.error {
  color: var(--danger);
}

.notice,
.project-list {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--shadow);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice.success {
  background: var(--green);
}

.notice.error {
  background: #ffe1e1;
}

.admin-user {
  margin: 0;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-weight: 900;
}

.project-list {
  display: grid;
  gap: 0.75rem;
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 2px solid rgba(18, 18, 18, 0.16);
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row div {
  display: grid;
  gap: 0.2rem;
}

.project-row span,
.empty-state {
  color: var(--muted);
}

.project-row a,
.draft-label {
  flex: 0 0 auto;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-top: 3px solid var(--line);
  color: var(--muted);
  background: var(--paper-soft);
}

@media (max-width: 900px) {
  .hero-shell,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .topbar,
  footer,
  nav,
  .mini-top,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    width: 100%;
  }

  nav a,
  .button {
    width: 100%;
  }

  h1 {
    font-size: 3.1rem;
  }

  .project-grid,
  .form-grid,
  .page-field {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .remove-page {
    width: 100%;
  }
}
/* Project card bands */
.hero-shell {
  grid-template-columns: minmax(0, 780px);
  justify-content: start;
  min-height: min(560px, calc(100svh - 4.5rem));
  padding: clamp(2.4rem, 8vw, 5.8rem) 0 2.2rem;
}

.hero-copy {
  max-width: 780px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 48rem;
}

.project-grid {
  gap: 1.2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--shadow);
}

.card-window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  border-bottom: 3px solid var(--line);
  background: var(--paper-soft);
}

.card-window-bar span {
  width: 15px;
  height: 15px;
  border: 2px solid var(--line);
  border-radius: 50%;
  box-shadow: none;
}

.card-window-bar span:nth-child(1) {
  background: var(--pink);
}

.card-window-bar span:nth-child(2) {
  background: var(--yellow);
}

.card-window-bar span:nth-child(3) {
  background: var(--cyan);
}

.project-card-body {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  margin: 1.25rem;
  padding: 1.15rem;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--cyan);
  box-shadow: 7px 7px 0 var(--shadow);
  flex: 1 1 auto;
}

.project-card:nth-child(3n + 2) .project-card-body {
  background: var(--yellow);
}

.project-card:nth-child(3n + 3) .project-card-body {
  background: var(--pink);
}

.project-card h3 {
  min-height: 0;
  font-size: 1.55rem;
}

.project-card p {
  margin-bottom: 0;
  color: var(--ink);
}

.project-card .project-pitch {
  color: var(--ink);
  font-weight: 900;
}

.project-card .tagline {
  margin-bottom: 0.2rem;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--shadow);
}

.project-card .card-bottom {
  align-self: stretch;
  display: grid;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1rem;
  border-top: 3px solid var(--line);
  background: var(--green);
  font-family: "Courier New", Courier, monospace;
}



.project-card .button {
  justify-self: start;
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 900px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }
}
/* Logo color and typography alignment */
.brand,
h1,
h2,
.project-card h3,
.admin-page h1 {
  font-family: var(--display-font);
  font-weight: 900;
  text-transform: uppercase;
}

.brand {
  font-family: var(--display-font);
  font-size: 1.08rem;
}

h1 {
  max-width: 9ch;
}

h2 {
  max-width: 12ch;
}

.eyebrow,
.project-card .card-bottom,
.tagline,
.admin-user,
label,
.board-note {
  font-family: var(--mono-font);
}

.brand-mark {
  background:
    linear-gradient(var(--green) 0 0) 0 0 / 100% 100%,
    var(--green);
}

.brand-mark::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 4px 0 0 4px;
  background: var(--white);
  box-shadow: 7px 0 0 var(--white), 7px 7px 0 var(--white), 14px 7px 0 var(--white);
}

.button.primary,
.notice.success {
  background: var(--green);
}

nav a:hover,
nav a:focus-visible,
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 4px rgba(223, 255, 0, 0.5);
}

footer::before,
footer::after {
  content: "";
  width: 12px;
  height: 12px;
  align-self: center;
  background: var(--orange);
  box-shadow: 2px 2px 0 var(--shadow);
}

/* Admin editing and mini-site page layout */
.field-hint {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.45;
  text-transform: none;
}

.field-hint strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.page-field {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.85rem;
  padding: 0.9rem 4.6rem 0.9rem 0.9rem;
  border: 2px solid rgba(5, 5, 5, 0.18);
  border-radius: var(--radius);
  background: var(--white);
}

.page-field + .page-field {
  margin-top: 0.8rem;
}

.page-field:last-child {
  padding-bottom: 0.9rem;
}

.page-content-field {
  grid-column: 1 / -1;
}

.remove-page {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 44px;
  height: 44px;
}

.project-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (max-width: 620px) {
  .page-field {
    grid-template-columns: 1fr;
    padding-right: 0.9rem;
    padding-top: 4.3rem;
  }
}
/* Status colors */
.status-pill,
.tagline {
  color: var(--ink);
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--mono-font);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.status-reflexion {
  background: var(--cyan) !important;
}

.status-mvp {
  background: var(--yellow) !important;
}

.status-beta {
  background: var(--pink) !important;
}

.status-production {
  background: var(--cyan) !important;
}

.status-abandonne {
  background: var(--pink) !important;
}

.status-default {
  background: var(--paper) !important;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.delete-form {
  margin: 0;
}

.button.danger {
  background: var(--pink);
}
/* Project card status contrast */
.project-card .tagline {
  background: var(--yellow) !important;
}

.project-card:nth-child(3n + 2) .tagline {
  background: var(--pink) !important;
}

.project-card:nth-child(3n + 3) .tagline {
  background: var(--cyan) !important;
}
/* Admin status color rhythm */
.project-row:nth-of-type(3n + 1) .status-pill {
  background: var(--cyan) !important;
}

.project-row:nth-of-type(3n + 2) .status-pill {
  background: var(--yellow) !important;
}

.project-row:nth-of-type(3n + 3) .status-pill {
  background: var(--pink) !important;
}