:root {
  --primary: #0070d1;
  --primary-pressed: #0064b7;
  --primary-active: #004d8d;
  --commerce: #d53b00;
  --warning: #c81b3a;
  --ink: #000000;
  --ink-deep: #121314;
  --ink-elevated: #181818;
  --body-light: rgba(0, 0, 0, 0.6);
  --mute-light: #6b6b6b;
  --ash-light: #cccccc;
  --canvas-light: #ffffff;
  --surface-soft: #f3f3f3;
  --surface-card: #f5f7fa;
  --canvas-dark: #000000;
  --surface-dark-elevated: #121314;
  --surface-dark-card: #181818;
  --hairline-light: #f3f3f3;
  --hairline-dark: rgba(229, 229, 229, 0.2);
  --on-dark: #ffffff;
  --body-dark: rgba(255, 255, 255, 0.7);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --page-max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas-light);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--canvas-light);
  font-family: Inter, Roboto, Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  background: var(--canvas-dark);
  color: var(--on-dark);
  border-bottom: 1px solid var(--hairline-dark);
}

.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--page-max), calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 40px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.console-link {
  white-space: nowrap;
}

.nav-links-center {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 28px;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.nav-actions .btn {
  width: auto;
  white-space: nowrap;
}

.nav-link {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
}

.hero {
  position: relative;
  min-height: 50vh;
  overflow: hidden;
  color: var(--on-dark);
  background: var(--canvas-dark);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.88) 38%, rgba(0, 0, 0, 0.18) 100%), url("/hero-visual.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-inner {
  position: relative;
  display: grid;
  align-content: center;
  width: min(var(--page-max), calc(100% - 48px));
  min-height: 50vh;
  margin: 0 auto;
  padding: 72px 0;
}

.hero-copy {
  width: min(560px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-full);
  color: var(--body-dark);
  font-size: 14px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 300;
  line-height: 1.14;
}

.hero p {
  margin: 0;
  color: var(--body-dark);
  font-size: 18px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-pressed);
}

.btn-secondary-dark {
  color: #fff;
  background: transparent;
  border-color: var(--hairline-dark);
}

.btn-secondary-light {
  color: var(--ink);
  background: transparent;
  border-color: var(--ash-light);
}

.btn-danger {
  color: #fff;
  background: var(--warning);
}

.btn-small {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 14px;
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

.icon-svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.upload-icon-button {
  position: relative;
  align-content: start;
  padding-top: 5px;
}

.upload-icon-button .icon-svg {
  width: 16px;
  height: 16px;
}

.icon-caption {
  position: absolute;
  left: 50%;
  bottom: 5px;
  color: currentColor;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
}

.file-input {
  display: none;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.section {
  padding: 88px 0;
  scroll-margin-top: 56px;
}

.section-dark {
  color: var(--on-dark);
  background: var(--canvas-dark);
}

.section-light {
  color: var(--ink);
  background: var(--canvas-light);
}

.section-blue {
  color: #fff;
  background: var(--primary);
}

.section-inner {
  width: min(var(--page-max), calc(100% - 48px));
  margin: 0 auto;
}

.site-footer {
  color: var(--body-dark);
  background: var(--canvas-dark);
  border-top: 1px solid var(--hairline-dark);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--page-max), calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto;
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--on-dark);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-heading {
  max-width: 680px;
  margin: 0 0 32px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  line-height: 1.2;
}

.section-heading-center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.feature-grid,
.capacity-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card,
.capacity-card,
.admin-card {
  min-height: 180px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

#features .feature-card,
#principle .admin-card,
#faq .feature-card {
  border-top: 6px solid var(--primary);
}

.section-dark .feature-card,
.section-dark .admin-card {
  background: var(--surface-dark-card);
}

.feature-card h3,
.capacity-card h3,
.admin-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 300;
}

.feature-card p,
.capacity-card p,
.admin-card p {
  margin: 0;
  color: var(--body-light);
  line-height: 1.6;
}

.section-dark .feature-card p,
.section-dark .admin-card p {
  color: var(--body-dark);
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: start;
}

.login-box,
.workspace-panel,
.project-list,
.admin-table,
.report-detail {
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.login-box {
  padding: 32px;
}

.login-box h2 {
  margin: 0 0 20px;
  color: var(--primary);
  font-size: 28px;
  font-weight: 300;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--mute-light);
  font-size: 14px;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--ash-light);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border: 2px solid var(--primary);
}

.textarea {
  min-height: 520px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.55;
}

.notice {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--primary-active);
  background: rgba(0, 112, 209, 0.08);
  font-size: 14px;
}

.workspace {
  min-height: 100vh;
  background: var(--surface-soft);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.project-list {
  align-self: start;
  padding: 18px;
}

.project-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.project-list-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.header-actions,
.pane-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pane-title-actions {
  margin-left: auto;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ash-light);
  border-radius: 50%;
  color: var(--primary-active);
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.project-list h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 300;
}

.project-collapse-toggle {
  width: 32px;
  height: 32px;
  font-size: 20px;
}

.project-item {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--ink);
  background: transparent;
}

.project-item-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.pane-expanded-projects .project-item-row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 280px) minmax(360px, 1fr) auto 48px;
  min-height: 64px;
  align-items: center;
  column-gap: 12px;
}

.pane-expanded-projects .project-drag-handle {
  grid-column: 1;
}

.pane-expanded-projects .project-select {
  grid-column: 2 / 4;
}

.pane-expanded-projects .project-item-row.no-publish-url .project-select {
  grid-column: 2 / 5;
}

.pane-expanded-projects .project-publish-tools {
  grid-column: 4;
}

.pane-expanded-projects .project-rename {
  grid-column: 5;
}

.project-item:hover,
.project-item.active {
  background: #fff;
}

.project-item.dragging {
  opacity: 0.55;
}

.project-item.drag-over {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  background: rgba(0, 112, 209, 0.08);
}

.project-drag-handle {
  display: grid;
  width: 20px;
  min-width: 20px;
  height: 32px;
  place-items: center;
  border: 0;
  color: var(--mute-light);
  background: transparent;
  cursor: grab;
  font-size: 22px;
  line-height: 1;
}

.project-drag-handle:active {
  cursor: grabbing;
}

.project-drag-handle:hover,
.project-drag-handle:focus-visible {
  color: var(--primary);
}

.project-select {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 6px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.project-rename {
  flex: 0 0 auto;
}

.project-title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta,
.status-line {
  color: var(--mute-light);
  font-size: 12px;
  line-height: 1.4;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pane-expanded-projects .project-meta {
  display: grid;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: start;
  gap: 6px;
  white-space: nowrap;
}

.pane-expanded-projects .project-select {
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  align-self: center;
  align-items: center;
  gap: 16px;
}

.project-meta-detail {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.pane-expanded-projects .project-rename {
  width: 40px;
  justify-self: end;
}

.pane-expanded-projects .project-updated-at,
.pane-expanded-projects .project-inline-url {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: flex-start;
}

.project-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 700;
}

.project-status-badge.published {
  color: #fff;
  background: var(--primary);
}

.project-status-badge.takedown {
  color: #fff;
  background: var(--warning);
}

.project-inline-url {
  min-width: 0;
  gap: 6px;
  color: var(--mute-light);
  font-size: 12px;
  font-weight: 700;
}

.project-inline-url code {
  overflow: hidden;
  color: var(--primary-active);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-publish-tools {
  display: flex;
  max-width: none;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.project-publish-tools span {
  font-size: 12px;
  white-space: nowrap;
}

.project-publish-url {
  display: flex;
  min-width: 0;
  min-height: 40px;
  flex: 1 1 320px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.project-publish-url code {
  overflow: hidden;
  color: var(--primary-active);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-publish-actions {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-panel {
  overflow: hidden;
  background: #fff;
}

.workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline-light);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 700;
}

.status-pill.published {
  color: #fff;
  background: var(--primary);
}

.status-pill.takedown {
  color: #fff;
  background: var(--warning);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 650px;
}

.pane-expanded {
  grid-template-columns: minmax(0, 1fr);
}

.pane-expanded .workspace-panel,
.pane-expanded .project-list {
  align-self: stretch;
}

.pane-expanded-projects .workspace-panel,
.pane-expanded-editor .project-list,
.pane-expanded-preview .project-list,
.pane-expanded-editor .preview-pane,
.pane-expanded-preview .editor-pane {
  display: none;
}

.pane-expanded-editor .editor-grid,
.pane-expanded-preview .editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.pane-expanded .textarea,
.pane-expanded .preview-frame {
  min-height: calc(100vh - 260px);
}

.workspace-shell.project-list-collapsed {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.project-list-collapsed .project-list {
  display: none;
}

.project-list-restore {
  display: flex;
  width: 44px;
  min-height: 128px;
  align-self: start;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 6px;
  border: 1px solid var(--ash-light);
  border-radius: var(--radius-md);
  color: var(--primary-active);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  font-weight: 700;
  writing-mode: vertical-rl;
}

.project-list-restore:hover,
.project-list-restore:focus-visible {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.editor-pane,
.preview-pane {
  min-width: 0;
  padding: 16px;
}

.editor-pane {
  border-right: 1px solid var(--hairline-light);
}

.pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 12px;
}

.pane-title-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 32px;
}

.pane-title h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.36);
}

.choice-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.choice-dialog h2 {
  margin: 0 0 10px;
  color: var(--primary-active);
  font-size: 20px;
  font-weight: 700;
}

.choice-dialog p {
  margin: 0;
  color: var(--body-light);
  font-size: 14px;
  line-height: 1.6;
}

.choice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.preview-frame {
  width: 100%;
  height: 520px;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.publish-link {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline-light);
  color: var(--mute-light);
  font-size: 14px;
}

.publish-link a {
  color: var(--primary-pressed);
  font-weight: 700;
  word-break: break-all;
}

.admin-shell {
  min-height: 100vh;
  background: var(--canvas-light);
}

.admin-layout {
  width: min(var(--page-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 80px;
}

.admin-heading {
  margin: 0 0 24px;
  font-size: 44px;
  font-weight: 300;
}

.admin-table {
  overflow: auto;
  padding: 16px;
}

.admin-preview {
  margin: 32px 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.admin-preview .preview-frame {
  height: 460px;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--hairline-light);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--mute-light);
  font-size: 13px;
  font-weight: 700;
}

.published-page {
  min-height: 100vh;
  background: #101114;
}

.published-frame {
  width: 100%;
  height: 100vh;
  border: 0;
  background: #fff;
}

.report-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  color: #fff;
  background: rgba(0, 112, 209, 0.94);
  font-size: 14px;
  font-weight: 700;
}

.report-panel {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 50;
  display: none;
  width: min(380px, calc(100vw - 36px));
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
}

.report-panel.open {
  display: block;
}

.report-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 300;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 32px;
  color: var(--mute-light);
  text-align: center;
}

.muted {
  color: var(--mute-light);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hide {
  display: none !important;
}

@media (max-width: 1024px) {
  .feature-grid,
  .capacity-grid,
  .admin-grid,
  .login-panel,
  .workspace-shell,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: 0;
    border-bottom: 1px solid var(--hairline-light);
  }

  .workspace-shell {
    width: min(100% - 24px, 900px);
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .hero-inner,
  .section-inner,
  .site-footer-inner,
  .admin-layout {
    width: calc(100% - 32px);
  }

  .hero-inner {
    min-height: 50vh;
    padding: 48px 0;
  }

  .section {
    padding: 56px 0;
  }

  .nav-actions {
    grid-column: 2;
    gap: 8px;
  }

  .topbar-inner {
    grid-template-columns: 1fr auto;
  }

  .nav-links-center {
    display: none;
  }

  .nav-link {
    display: none;
  }

  .hero-actions,
  .toolbar-group {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 22px 0;
  }

  .btn {
    width: 100%;
  }

  .textarea,
  .preview-frame {
    min-height: 360px;
    height: 360px;
  }
}
