:root {
  color-scheme: light;
  --ink: #20211f;
  --muted: #666b64;
  --line: #dadfd6;
  --surface: #ffffff;
  --soft: #f5f7f1;
  --teal: #25766e;
  --teal-dark: #18544e;
  --amber: #c49122;
  --rust: #bd5731;
  --violet: #6d55a8;
  --danger: #a13f36;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: #e8ece3;
  color: #26332f;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(32, 33, 31, 0.12);
  background: rgba(245, 247, 241, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  background: url("edgepike-symbol.png") center / contain no-repeat;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  font-size: 0.94rem;
}

.site-nav a {
  color: #30332f;
}

.account-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.account-name {
  max-width: 14rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flash-stack {
  position: fixed;
  right: 1rem;
  top: 4.6rem;
  z-index: 40;
  display: grid;
  gap: 0.5rem;
  width: min(24rem, calc(100vw - 2rem));
}

.flash {
  padding: 0.85rem 1rem;
  border: 1px solid #c8d8ce;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(32, 33, 31, 0.12);
}

.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
}

.section:first-of-type {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.band {
  background: #fffaf0;
}

.section-heading {
  max-width: 58rem;
  margin: 0 auto 1.75rem;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 46rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-graph {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 76rem;
  margin: 0 auto 1rem;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(32, 33, 31, 0.07);
}

.workflow-graph li {
  position: relative;
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.85rem;
  align-items: center;
  min-height: 8.2rem;
  padding: 1rem 1.15rem;
}

.workflow-graph li + li {
  border-left: 1px solid var(--line);
}

.workflow-graph li:not(:last-child)::after {
  position: absolute;
  right: -0.65rem;
  top: 50%;
  z-index: 2;
  width: 1.2rem;
  height: 1.2rem;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.workflow-node {
  display: grid;
  width: 3.6rem;
  height: 3.6rem;
  place-items: center;
  border: 2px solid #bed0c8;
  border-radius: 50%;
  background: #f5faf6;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.workflow-graph h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.workflow-graph p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  gap: 1rem;
  max-width: 76rem;
  margin: 0 auto;
}

.workspace-panel,
.jobs-panel,
.preview-panel,
.project-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(32, 33, 31, 0.07);
}

.workspace-panel,
.jobs-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.command-panel {
  min-height: 31rem;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading h2,
.workspace-panel h3,
.project-form h3 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-heading p,
.workspace-panel p {
  margin: 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #323631;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cdd5ca;
  border-radius: 6px;
  padding: 0.78rem 0.85rem;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(37, 118, 110, 0.18);
  border-color: var(--teal);
}

input[type="range"] {
  padding: 0;
  accent-color: var(--teal);
}

.file-drop {
  min-height: 6.25rem;
  justify-content: center;
  padding: 1rem;
  border: 1px dashed #9fb5ac;
  border-radius: 8px;
  background: #f8fbf6;
  cursor: pointer;
}

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

.file-drop strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--teal-dark);
}

.chunk-row {
  display: grid;
  grid-template-columns: 1fr 5rem;
  gap: 0.75rem;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.ghost {
  border-color: #c9d4cb;
  background: #ffffff;
  color: var(--teal-dark);
}

.button.small {
  min-height: 2.1rem;
  padding: 0.42rem 0.7rem;
  font-size: 0.86rem;
}

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

.auth-grid form {
  align-content: start;
  padding-top: 0.3rem;
}

.auth-grid h3 {
  margin: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.check-row input {
  width: 1rem;
}

.status-panel {
  display: grid;
  grid-template-rows: minmax(24rem, 1fr);
  overflow: hidden;
}

#signal-canvas {
  width: 100%;
  min-height: 24rem;
  border-radius: 8px;
  background: #101412;
}

.status-panel.has-preview {
  grid-template-rows: auto;
  align-content: start;
  overflow: visible;
}

.status-panel.has-preview .preview-heading {
  display: block;
}

.status-panel.has-preview .preview-heading h2 {
  margin-bottom: 0.25rem;
}

.status-panel.has-preview .interactive-preview {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.status-panel.has-preview .preview-visual {
  min-height: 18rem;
}

.status-panel.has-preview .preview-visual img {
  max-height: 24rem;
}

.status-panel.has-preview .preview-readout {
  padding: 0.9rem;
}

.status-panel.has-preview h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.status-panel.has-preview pre {
  max-height: 22rem;
  overflow: auto;
  margin: 0;
  padding: 0.85rem;
  border-radius: 6px;
  background: #101412;
  color: #edf5ed;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.system-paths h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
}

.system-paths dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.system-paths div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.system-paths dt {
  color: var(--muted);
  font-weight: 800;
}

.system-paths dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #30332f;
}

.jobs-panel,
.preview-panel {
  max-width: 76rem;
  margin: 1rem auto 0;
}

.preview-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.preview-panel h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.preview-panel pre {
  max-height: 24rem;
  overflow: auto;
  margin: 0;
  padding: 0.85rem;
  border-radius: 6px;
  background: #101412;
  color: #edf5ed;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.preview-meta,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.action-stack form {
  display: block;
}

.interactive-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.6fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}

.preview-visual {
  position: relative;
  display: grid;
  min-height: 24rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cdd5ca;
  border-radius: 8px;
  background: #101412;
}

.preview-visual img {
  display: block;
  width: 100%;
  max-height: 34rem;
  image-rendering: pixelated;
  object-fit: contain;
}

.preview-frame-position {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: rgba(16, 20, 18, 0.82);
  color: #edf5ed;
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-readout {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.preview-counter {
  color: var(--rust);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-readout dl {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.preview-readout dl div {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.preview-readout dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-readout dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.1rem;
  font-weight: 800;
}

.preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-controls .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 52rem;
}

th,
td {
  padding: 0.78rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #555d55;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  min-width: 5.8rem;
  justify-content: center;
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-queued {
  background: #fff4cf;
  color: #7c5811;
}

.status-processing {
  background: #e8f2ef;
  color: var(--teal-dark);
}

.status-done {
  background: #def0e2;
  color: #286037;
}

.status-downloaded {
  background: #ece9f6;
  color: var(--violet);
}

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

.card-grid,
.tutorial-grid,
.about-grid,
.projects-grid,
.logging-grid {
  display: grid;
  gap: 1rem;
  max-width: 76rem;
  margin: 0 auto;
}

.card-grid,
.tutorial-grid,
.about-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logging-grid {
  grid-template-columns: minmax(0, 42rem);
  justify-content: center;
}

.topic-card,
.tutorial-card,
.about-grid article,
.project-card,
.download-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-card,
.tutorial-card,
.about-grid article,
.project-card {
  padding: 1.15rem;
}

.topic-card h3,
.tutorial-card h3,
.about-grid h3,
.project-card h3,
.download-row h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.08rem;
}

.topic-card p,
.tutorial-card p,
.about-grid p,
.project-card p,
.download-row p {
  margin: 0;
  color: var(--muted);
}

.tutorial-subsection {
  display: grid;
  gap: 0.35rem;
  max-width: 76rem;
  margin: 0 auto 1rem;
}

.tutorial-subsection h3 {
  margin: 0;
  font-size: 1.3rem;
}

.tutorial-subsection p {
  max-width: 48rem;
  margin: 0;
  color: var(--muted);
}

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

.tutorial-wide {
  grid-column: 1 / -1;
}

.tutorial-steps {
  display: grid;
  gap: 0.55rem;
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
  color: #3b423d;
}

.tutorial-note {
  margin-top: 0.85rem !important;
  color: #4e5b55 !important;
}

.code-block {
  margin: 0.85rem 0 0;
  overflow-x: auto;
  border-radius: 8px;
  background: #16201c;
  color: #edf5ed;
  font-size: 0.86rem;
  line-height: 1.55;
}

.code-block code {
  display: block;
  padding: 0.9rem 1rem;
  background: transparent;
  color: inherit;
}

.contact-card {
  display: grid;
  gap: 0.85rem;
}

.contact-form {
  margin-top: 0.15rem;
}

.topic-line {
  display: block;
  width: 3rem;
  height: 0.28rem;
  border-radius: 99px;
  background: var(--teal);
}

.topic-line.warm {
  background: var(--rust);
}

.topic-line.violet {
  background: var(--violet);
}

.media-block {
  position: relative;
  height: 11rem;
  overflow: hidden;
  border-radius: 8px;
  background: #101412;
}

.media-block::before,
.media-block::after,
.media-block span {
  position: absolute;
  content: "";
  display: block;
}

.video-media::before {
  inset: 1.2rem;
  border: 1px solid rgba(94, 196, 178, 0.35);
}

.video-media::after {
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 1.1rem solid transparent;
  border-bottom: 1.1rem solid transparent;
  border-left: 1.75rem solid #f2c654;
  transform: translate(-38%, -50%);
}

.video-media span {
  inset: auto 1.2rem 1.2rem;
  height: 0.35rem;
  background: linear-gradient(90deg, var(--rust) 42%, rgba(255,255,255,0.2) 42%);
}

.picture-media {
  background:
    linear-gradient(135deg, rgba(37, 118, 110, 0.85), rgba(24, 84, 78, 0.8)),
    #163b37;
}

.picture-media::before {
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.2rem;
  height: 4.2rem;
  background: linear-gradient(135deg, #f2c654 0 40%, #bd5731 40% 67%, #6d55a8 67%);
  clip-path: polygon(0 100%, 28% 26%, 48% 72%, 66% 34%, 100% 100%);
}

.picture-media::after {
  right: 1.35rem;
  top: 1.35rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: #fff3bd;
}

.text-media {
  background: #fbfbf6;
}

.text-media::before {
  inset: 1.2rem;
  background:
    linear-gradient(#2c3732 0 0) 0 0 / 75% 0.5rem no-repeat,
    linear-gradient(#9aa69d 0 0) 0 2rem / 100% 0.36rem no-repeat,
    linear-gradient(#9aa69d 0 0) 0 3.2rem / 92% 0.36rem no-repeat,
    linear-gradient(#9aa69d 0 0) 0 4.4rem / 84% 0.36rem no-repeat,
    linear-gradient(#bd5731 0 0) 0 6.3rem / 38% 0.42rem no-repeat;
}

.download-list {
  display: grid;
  gap: 0.75rem;
  max-width: 76rem;
  margin: 0 auto;
}

.download-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.download-kind,
.project-author {
  color: var(--rust);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.download-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.newsletter-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.metric-list {
  display: grid;
  gap: 0.6rem;
}

.metric-list div,
.path-list li,
.log-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.metric-list span,
.path-list span,
.log-list time {
  color: var(--muted);
}

.path-list,
.log-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0.8rem 0 0;
  list-style: none;
}

.path-list span,
.log-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.project-card {
  min-height: 11rem;
}

.project-form {
  display: grid;
  gap: 0.85rem;
  max-width: 48rem;
  margin: 1rem auto 0;
  padding: 1.15rem;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .workspace-grid,
  .workflow-graph,
  .card-grid,
  .tutorial-grid,
  .about-grid,
  .logging-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .workflow-graph li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .workflow-graph li:not(:last-child)::after {
    right: auto;
    top: auto;
    left: 50%;
    bottom: -0.65rem;
    transform: translateX(-50%) rotate(135deg);
  }

  .command-panel {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .account-area,
  .site-nav {
    justify-content: flex-start;
  }

  .panel-heading,
  .download-row,
  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .download-row {
    display: grid;
  }

  .auth-grid,
  .chunk-row {
    grid-template-columns: 1fr;
  }

  .interactive-preview {
    grid-template-columns: 1fr;
  }

  .download-action {
    justify-content: space-between;
  }

  .system-paths div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}
