/* System3 front-door palette — aligned with control.system3.net & webmail.system3.net */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-standard.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
}

:root {
  --s3-navy: #1e2f6f;
  --s3-deep: #101a47;
  --s3-orange: #f87216;
  --s3-link: #2a44a0;
  --s3-muted: #5c6b73;
  --s3-text: #1b2233;
  --s3-field-border: #cfd4e2;
  --s3-bg: #f5f6fa;
  --font-ui: "Inter Variable", "Inter", system-ui, sans-serif;
  --font-display: "Archivo Variable", "Archivo", "Inter Variable", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body.s3-auth {
  margin: 0;
  min-height: 100vh;
  background: var(--s3-bg);
  color: var(--s3-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}

.s3-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(22rem, 5fr) 7fr;
}

.s3-panel {
  background: var(--s3-deep);
  color: rgba(255, 255, 255, 0.86);
  padding: 2.5rem clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.s3-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}
.s3-wordmark img { width: 32px; height: 32px; border-radius: 6px; }
.s3-wordmark b { font-weight: 800; }
.s3-wordmark span.product { font-weight: 400; }

.s3-pitch {
  margin: auto 0;
  max-width: 30rem;
  position: relative;
  padding: 2.25rem 0 0 2.25rem;
}
.s3-pitch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5.5rem;
  height: 5.5rem;
  border-top: 0.6rem solid var(--s3-orange);
  border-left: 0.6rem solid var(--s3-orange);
}

.s3-headline {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1.25rem;
}

.s3-lede { font-size: 1.05rem; line-height: 1.55; margin: 0 0 2rem; max-width: 26rem; }

.s3-list-intro { font-weight: 600; color: #fff; margin: 0 0 0.6rem; }

.s3-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.s3-list li {
  padding: 0.55rem 0 0.55rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}
.s3-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid rgba(255, 255, 255, 0.55);
  border-left: 2px solid rgba(255, 255, 255, 0.55);
}

.s3-tagline { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }

.s3-main {
  display: flex;
  flex-direction: column;
  padding: 2.5rem clamp(1.25rem, 5vw, 5rem);
  min-height: 100vh;
}

.s3-form-locked {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.s3-form-wrap {
  width: 100%;
  max-width: 25rem;
  margin: auto 0;
}

.s3-title {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.s3-sub { color: var(--s3-muted); margin: 0 0 1.5rem; }

.s3-field { margin: 0 0 1rem; }
.s3-field label,
.s3-label-block {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.s3-input,
.s3-select,
.s3-textarea {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.7rem 0.9rem;
  color: #1f2430;
  border: 1px solid var(--s3-field-border);
  border-radius: 0.3rem;
  background: #fff;
  font-family: inherit;
}
.s3-textarea { min-height: 9rem; resize: vertical; }
.s3-input:focus,
.s3-select:focus,
.s3-textarea:focus {
  outline: none;
  border-color: var(--s3-navy);
  box-shadow: 0 0 0 0.2rem rgba(30, 47, 111, 0.18);
}

.s3-input-copy {
  position: relative;
  display: flex;
  align-items: stretch;
}
.s3-input-copy .s3-input {
  padding-right: 2.75rem;
}

.s3-mono-secret,
.s3-secret.s3-mono-secret {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: slashed-zero;
  font-feature-settings: "ss01" 1, "ss02" 1, "ss04" 1, "cv31" 1;
  letter-spacing: 0.04em;
}
.s3-copy-icon {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--s3-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.s3-copy-icon:hover,
.s3-copy-icon:focus {
  color: var(--s3-navy);
  background: rgba(30, 47, 111, 0.06);
  outline: none;
}
.s3-copy-icon.is-copied { color: #2f7d32; }

.s3-btn {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: inherit;
  color: #fff;
  background: var(--s3-navy);
  border: 1px solid var(--s3-navy);
  border-radius: 0.3rem;
  cursor: pointer;
}
.s3-btn:not(.s3-btn-secondary):hover,
.s3-btn:not(.s3-btn-secondary):focus {
  background: var(--s3-deep);
  border-color: var(--s3-deep);
}
.s3-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.s3-btn-secondary {
  background: #fff;
  color: var(--s3-navy);
  border-color: var(--s3-field-border);
  width: auto;
  margin-top: 0;
  flex: 1 1 auto;
}
.s3-btn-secondary:hover {
  background: var(--s3-bg);
  border-color: var(--s3-field-border);
  color: var(--s3-navy);
}
.s3-btn-secondary:focus {
  background: #fff;
  border-color: var(--s3-navy);
  color: var(--s3-navy);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(30, 47, 111, 0.18);
}
.s3-btn-secondary:focus:not(:focus-visible) {
  box-shadow: none;
  border-color: var(--s3-field-border);
}

.s3-btn-danger {
  background: #b3261e;
  color: #fff;
  border: 1px solid #8f1d17;
}
.s3-btn-danger:hover,
.s3-btn-danger:focus {
  background: #8f1d17;
}

.s3-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.s3-action-row .s3-btn,
.s3-action-row .s3-btn-secondary {
  flex: 1 1 8rem;
  text-align: center;
  text-decoration: none;
  justify-content: center;
}

.s3-after { margin-top: 1.25rem; }

.s3-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--s3-text);
  cursor: pointer;
  user-select: none;
}
.s3-check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--s3-navy);
  cursor: pointer;
}
.s3-check input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.s3-result,
.s3-share-panel,
.s3-rate-limit {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--s3-field-border);
  border-radius: 0.3rem;
  background: #fff;
}
.s3-rate-limit {
  border-color: rgba(179, 38, 30, 0.35);
  background: #fff9f8;
}
.s3-rate-limit-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--s3-navy);
}
.s3-rate-limit-msg {
  margin: 0;
  font-size: 0.95rem;
  color: var(--s3-text);
  line-height: 1.45;
}
.s3-result label,
.s3-share-panel label { font-size: 0.85rem; font-weight: 600; color: var(--s3-muted); }

.s3-qr {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--s3-field-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.s3-qr-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--s3-muted);
}
.s3-qr-img {
  display: block;
  width: 200px;
  height: 200px;
  border: 1px solid var(--s3-field-border);
  border-radius: 0.3rem;
  background: #fff;
}
.s3-qr-download {
  width: auto;
  min-width: 12rem;
}

.s3-generator {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.s3-generator-actions,
.s3-kind-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.s3-kind-actions { margin-top: 0; margin-bottom: 1.25rem; }

.s3-kind-choice {
  flex: 1 1 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  background: #fff;
  color: var(--s3-navy);
  border: 1px solid var(--s3-field-border);
  border-radius: 0.3rem;
  cursor: pointer;
  text-align: center;
}
.s3-kind-choice:hover {
  background: var(--s3-bg);
  border-color: var(--s3-field-border);
}
.s3-kind-title {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}
.s3-kind-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--s3-muted);
  line-height: 1.2;
}
.s3-kind-choice.is-active {
  background: var(--s3-navy);
  border-color: var(--s3-navy);
  color: #fff;
}
.s3-kind-choice.is-active .s3-kind-hint {
  color: rgba(255, 255, 255, 0.82);
}
.s3-kind-choice.is-active:hover,
.s3-kind-choice.is-active:focus {
  background: var(--s3-deep);
  border-color: var(--s3-deep);
}

.s3-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.8rem;
  color: var(--s3-muted);
  margin-top: auto;
  padding-top: 2rem;
}
.s3-footer a { color: var(--s3-muted); }
.s3-footer span:last-child { flex-basis: 100%; }

.s3-error { color: #b3261e; font-size: 0.9rem; margin-top: 1rem; }

.s3-secret-revealed {
  width: 100%;
  margin: 0;
  min-height: 3rem;
  max-height: 18rem;
  overflow: auto;
  padding-right: 2.75rem;
}
.s3-input-copy .s3-copy-icon {
  background: #fff;
  z-index: 2;
}

.s3-secret {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--s3-field-border);
  border-radius: 0.3rem;
}

.s3-markdown {
  white-space: normal;
}
.s3-markdown h1,
.s3-markdown h2,
.s3-markdown h3,
.s3-markdown h4 {
  margin: 0 0 0.65rem;
  color: var(--s3-navy);
  line-height: 1.3;
}
.s3-markdown h1 { font-size: 1.35rem; }
.s3-markdown h2 { font-size: 1.2rem; }
.s3-markdown h3 { font-size: 1.05rem; }
.s3-markdown p { margin: 0 0 0.75rem; }
.s3-markdown p:last-child { margin-bottom: 0; }
.s3-markdown ul,
.s3-markdown ol { margin: 0 0 0.75rem 1.25rem; padding: 0; }
.s3-markdown li { margin-bottom: 0.35rem; }
.s3-markdown a { color: var(--s3-link); }
.s3-markdown code {
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
  background: var(--s3-bg);
}
.s3-md-pre {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: var(--s3-bg);
  border-radius: 0.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.s3-md-pre code { padding: 0; background: transparent; }

.s3-status { color: var(--s3-muted); margin: 0 0 1rem; }

.s3-legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 2.5rem) 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.s3-legal-head { margin-bottom: 2rem; }
.s3-wordmark-legal {
  display: inline-flex;
  margin-bottom: 1.5rem;
}
.s3-wordmark-legal,
.s3-wordmark-legal b,
.s3-wordmark-legal .product {
  color: var(--s3-navy);
}
.s3-legal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--s3-navy);
  margin: 0 0 0.35rem;
}
.s3-legal-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--s3-muted);
}
.s3-legal-meta code {
  font-size: 0.88em;
  background: var(--s3-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}
.s3-legal-body {
  color: var(--s3-text);
  line-height: 1.6;
}
.s3-legal-body h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--s3-navy);
  margin: 1.75rem 0 0.65rem;
}
.s3-legal-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.s3-legal-body li { margin-bottom: 0.4rem; }
.s3-legal-body a { color: var(--s3-link); }
.s3-legal-back {
  margin-top: 2rem;
  font-weight: 600;
}
.s3-legal-back a { color: var(--s3-link); text-decoration: none; }
.s3-legal-back a:hover { text-decoration: underline; }

.hidden { display: none !important; }

@media (max-width: 991px) {
  .s3-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .s3-panel {
    position: relative;
    top: auto;
    align-self: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem 2rem;
    overflow: visible;
    transform: none;
    box-shadow: none;
  }

  .s3-pitch {
    margin: 0;
    padding: 1.5rem 0 0 1.5rem;
    max-width: none;
  }
  .s3-pitch::before {
    width: 3.25rem;
    height: 3.25rem;
    border-top-width: 0.4rem;
    border-left-width: 0.4rem;
  }

  .s3-headline {
    font-size: 1.6rem;
    margin-bottom: 0;
  }

  .s3-lede,
  .s3-list-intro,
  .s3-list,
  .s3-tagline {
    display: none;
  }

  .s3-main {
    padding: 2rem 1.25rem 2rem;
    min-height: 0;
  }
  .s3-form-wrap { margin: 0 0 2rem; }
}