:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #ffffff;
  color: #17211f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
}

button,
input {
  font: inherit;
}

a {
  color: #125f58;
  font-weight: 800;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 44rem);
  gap: 1.25rem;
  width: min(44rem, calc(100vw - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2rem) 0;
  align-items: start;
  align-content: start;
}

.workspace {
  display: grid;
  gap: 1.25rem;
}

.intro {
  padding-top: 0.4rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: #18645d;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 48rem;
  margin: 0;
  font-size: clamp(2rem, 3rem, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.privacy {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: #4e5d58;
  font-size: 1.02rem;
  line-height: 1.55;
}

.personal-runs-preview {
  overflow: hidden;
  border: 1px solid #17211f;
  border-radius: 8px;
  background: #050708;
  box-shadow: 0 24px 70px rgba(22, 33, 31, 0.18);
}

.preview-copy-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 250, 0.12);
  padding: 0.65rem 1rem;
}

.preview-copy-block .eyebrow {
  margin: 0;
}

.preview-copy-block .eyebrow {
  color: #f0bd5f;
}

.runs-preview-frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: #050708;
}

.runs-preview-frame iframe {
  display: block;
  width: 100%;
  height: clamp(34rem, 72vh, 48rem);
  border: 0;
}

.mode-switch,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mode-button {
  min-height: 2.35rem;
  border: 1px solid #cfd8cf;
  background: #f9faf5;
  color: #34433f;
  padding: 0 0.85rem;
}

.mode-button.active {
  border-color: #17211f;
  background: #17211f;
  color: #fffefa;
}

.upload-panel,
.progress-panel {
  border: 1px solid #d9ded3;
  border-radius: 8px;
  background: rgba(255, 255, 250, 0.78);
  box-shadow: 0 20px 55px rgba(22, 33, 31, 0.08);
}

.upload-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

legend,
.progress-panel h2,
.notice h2,
.content-section h2,
.doc-page h2 {
  margin: 0 0 0.75rem;
  color: #17211f;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.guide {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  padding-left: 1.35rem;
  color: #54615c;
  line-height: 1.45;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.button-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #17211f;
  color: #fffefa;
  padding: 0 0.9rem;
  font-weight: 850;
}

.button-link:hover,
.button-link:focus-visible {
  color: #fffefa;
}

.text-link {
  color: #125f58;
}

.notice,
.help-section,
.checklist {
  border-top: 1px solid #e3e7dd;
  padding-top: 1rem;
  margin-top: 1rem;
}

.notice p,
.content-section p,
.doc-page p,
.doc-page li,
.doc-page dd {
  color: #4e5d58;
  line-height: 1.55;
}

.notice p {
  margin: 0;
}

.content-section {
  border-top: 1px solid #e3e7dd;
  padding-top: 1.25rem;
}

.content-section h2 {
  max-width: 28rem;
}

.content-section .eyebrow {
  margin-bottom: 0.55rem;
}

.faq-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.faq-grid details {
  border: 1px solid #d9ded3;
  border-radius: 8px;
  background: #fffefa;
  padding: 0.85rem 0.95rem;
}

.faq-grid summary {
  cursor: pointer;
  color: #17211f;
  font-weight: 850;
  line-height: 1.35;
}

.faq-grid summary:focus-visible {
  color: #125f58;
  outline: none;
}

.faq-grid p {
  margin: 0.65rem 0 0;
}

.site-footer {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid #e3e7dd;
  padding: 1.25rem 0 0.5rem;
  color: #586761;
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.footer-title {
  color: #17211f;
  font-weight: 850;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.fine-print {
  color: #6c7873;
  font-size: 0.82rem;
}

.step-copy,
.file-example {
  margin: 0 0 0.9rem;
  color: #4e5d58;
  line-height: 1.5;
}

.file-example {
  border-left: 3px solid #1a7770;
  padding-left: 0.75rem;
  font-size: 0.92rem;
}

.help-section summary {
  color: #17211f;
  cursor: pointer;
  font-weight: 850;
}

.help-section ul,
.doc-page ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.checklist {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.checklist legend {
  margin-bottom: 0;
}

.checklist label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  color: #34433f;
  font-weight: 750;
}

.checklist input {
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  min-height: 1.05rem;
  margin-top: 0.1rem;
  accent-color: #1a7770;
}

.file-drop {
  display: grid;
  min-height: 5.25rem;
  margin-top: 0.9rem;
  place-items: center;
  border: 1px dashed #8fa49d;
  border-radius: 8px;
  background: #f9faf5;
  color: #18645d;
  cursor: pointer;
  font-weight: 800;
}

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

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

.grid legend {
  grid-column: 1 / -1;
}

label:not(.file-drop) {
  display: grid;
  gap: 0.35rem;
  color: #4e5d58;
  font-size: 0.86rem;
  font-weight: 750;
}

.field-label-row {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 0.15rem;
}

.info-icon {
  position: relative;
  display: inline-grid;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.25rem;
  place-items: center;
  border: 1px solid #8fa49d;
  border-radius: 999px;
  color: #125f58;
  cursor: help;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.info-icon:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 119, 112, 0.18);
  outline: none;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: min(18rem, calc(100vw - 3rem));
  transform: translateX(-50%);
  border: 1px solid #d9ded3;
  border-radius: 8px;
  background: #17211f;
  color: #fffefa;
  opacity: 0;
  padding: 0.55rem 0.65rem;
  pointer-events: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  transition: opacity 120ms ease;
}

.info-icon:hover::after,
.info-icon:focus::after {
  opacity: 1;
}

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

input {
  min-width: 0;
  min-height: 2.75rem;
  border: 1px solid #cdd5ca;
  border-radius: 8px;
  background: #fffefa;
  color: #17211f;
  padding: 0 0.8rem;
}

input:focus-visible {
  border-color: #1a7770;
  box-shadow: 0 0 0 3px rgba(26, 119, 112, 0.18);
  outline: none;
}

.turnstile-slot {
  min-height: 4rem;
}

button {
  min-height: 2.9rem;
  border: 0;
  border-radius: 8px;
  background: #17211f;
  color: #fffefa;
  cursor: pointer;
  font-weight: 850;
}

.secondary-button {
  min-height: 2.5rem;
  border: 1px solid #cfd8cf;
  background: #f9faf5;
  color: #125f58;
  padding: 0 0.9rem;
}

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

.is-processing #previewButton {
  position: relative;
  overflow: hidden;
  animation: processing-button-pulse 1.8s ease-in-out infinite;
}

.is-processing #previewButton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 250, 0.24), transparent);
  animation: processing-button-sheen 1.7s ease-in-out infinite;
}

.progress-panel {
  position: static;
  padding: 1rem;
}

.is-processing .progress-panel {
  animation: processing-panel-pulse 2.4s ease-in-out infinite;
}

.local-preview-panel {
  overflow: hidden;
  height: min(86vh, 56rem);
  border: 1px solid #d9ded3;
  border-radius: 8px;
  background: #050708;
  box-shadow: 0 20px 55px rgba(22, 33, 31, 0.12);
}

.local-preview-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.local-mode #publishFields,
.local-mode #turnstileSlot,
.local-mode #uploadChecklist {
  display: none;
}

.upload-mode #localPrivacyCopy {
  display: none;
}

.progress-panel p {
  min-height: 3rem;
  margin: 0;
  color: #4e5d58;
  line-height: 1.45;
}

.processing-activity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
  border: 1px solid #d9ded3;
  border-radius: 8px;
  background: #f7fbf8;
  padding: 0.75rem;
}

.processing-activity p {
  min-height: 0;
  color: #34433f;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.35;
}

.processing-dots {
  display: inline-flex;
  gap: 0.24rem;
  align-items: center;
}

.processing-dots span {
  display: block;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: #1a7770;
  animation: processing-dot-bounce 1.05s ease-in-out infinite;
}

.processing-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.processing-dots span:nth-child(3) {
  animation-delay: 280ms;
}

.meter {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8df;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a7770, #d9912a);
  transition: width 180ms ease;
}

.is-processing .meter span {
  background-size: 200% 100%;
  animation: processing-meter-flow 1.5s linear infinite;
}

#shareLink {
  display: block;
  margin-top: 0.9rem;
  color: #125f58;
  overflow-wrap: anywhere;
  font-weight: 850;
  text-decoration: none;
}

#deleteLink {
  display: block;
  margin-top: 0.65rem;
  color: #9a3412;
  overflow-wrap: anywhere;
  font-weight: 850;
}

#shareLink:hover,
#shareLink:focus-visible {
  text-decoration: underline;
  outline: none;
}

.preview-copy,
.publish-copy {
  color: #586761;
  font-size: 0.88rem;
  line-height: 1.4;
}

.preview-copy,
.publish-copy {
  margin: 0.4rem 0 1rem;
}

.invite-link-hint {
  margin: -0.35rem 0 0;
  color: #125f58;
  font-size: 0.85rem;
  font-weight: 750;
}

.error-summary {
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #7f1d1d;
  padding: 0.85rem 1rem;
}

.error-summary ul {
  margin: 0;
  padding-left: 1.2rem;
}

.field-error,
.field-error input,
.field-error .file-drop,
.file-drop.field-error {
  border-color: #dc2626;
}

.checklist.field-error,
.turnstile-slot.field-error {
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fff7f7;
  padding: 0.75rem;
}

.publish-panel {
  border-top: 1px solid #e3e7dd;
  border-radius: 8px;
  background: #f7fbf8;
  margin-top: 0.35rem;
  padding: 1rem;
}

.publish-panel legend {
  float: left;
  width: 100%;
}

.publish-panel .publish-copy {
  clear: both;
  padding-top: 1rem;
}

.publish-checklist {
  margin: 0;
}

.guide-dialog {
  width: min(52rem, calc(100vw - 2rem));
  max-height: min(86vh, 52rem);
  border: 1px solid #d9ded3;
  border-radius: 8px;
  padding: 0;
  color: #17211f;
}

.guide-dialog::backdrop {
  background: rgba(8, 12, 12, 0.48);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3e7dd;
  background: #fffefa;
  padding: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-header button {
  min-height: 2.4rem;
  padding: 0 0.8rem;
}

.modal-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.guide-shell {
  width: min(52rem, calc(100vw - 2rem));
  grid-template-columns: minmax(0, 52rem);
}

.doc-page {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.doc-page section {
  border-top: 1px solid #e3e7dd;
  padding-top: 1.1rem;
}

.doc-page h1 {
  max-width: 48rem;
}

.doc-page h2 {
  letter-spacing: 0.08em;
}

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

.screenshot-placeholder,
.guide-screenshot {
  display: grid;
  min-height: 8rem;
  place-items: center;
  border: 1px dashed #9ca9a5;
  border-radius: 8px;
  background: #f7f8f2;
  color: #586761;
  font-weight: 800;
  text-align: center;
}

.guide-screenshot {
  overflow: hidden;
  place-items: stretch;
  border-style: solid;
}

.guide-screenshot img {
  display: block;
  width: 100%;
  height: 28rem;
  object-fit: contain;
  object-position: top center;
  background: #ffffff;
}

.guide-screenshot figcaption,
.screenshot-placeholder figcaption {
  margin: 0;
  border-top: 1px solid #e3e7dd;
  padding: 0.75rem;
  color: #586761;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: left;
}

.doc-page dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.doc-page dt {
  color: #17211f;
  font-weight: 850;
}

.doc-page dd {
  margin: 0 0 0.75rem;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .privacy {
    font-size: 0.96rem;
  }

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

  .placeholder-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .guide-screenshot img {
    height: 32rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-processing #previewButton,
  .is-processing #previewButton::after,
  .is-processing .progress-panel,
  .processing-dots span,
  .is-processing .meter span {
    animation: none;
  }
}

@keyframes processing-dot-bounce {
  0%,
  80%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-0.18rem);
  }
}

@keyframes processing-meter-flow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 200% 0;
  }
}

@keyframes processing-panel-pulse {
  0%,
  100% {
    box-shadow: 0 20px 55px rgba(22, 33, 31, 0.08);
  }

  50% {
    box-shadow: 0 20px 60px rgba(26, 119, 112, 0.16);
  }
}

@keyframes processing-button-pulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1px);
  }
}

@keyframes processing-button-sheen {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}
