:root {
  color-scheme: light;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-primary: #111827;
  --color-primary-hover: #293548;
  --color-border: #e5e7eb;
  --color-surface: #ffffff;
  --color-background: #ffffff;
  --color-soft: #f9fafb;
  --color-success: #15803d;
  --color-danger: #b91c1c;
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

code {
  padding: 2px 6px;
  color: #1f2937;
  background: #f3f4f6;
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header and navigation */

.site-header {
  position: relative;
  z-index: 5;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.top-nav a,
.site-footer a {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.top-nav a:hover,
.site-footer a:hover {
  color: #111827;
}

/* Product introduction */

.page-intro {
  padding-top: 56px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.35px;
  line-height: 1.5;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 750;
  letter-spacing: -1.7px;
  line-height: 1.15;
}

.intro-description {
  max-width: 760px;
  margin: 16px 0 18px;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.7;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  color: #4b5563;
  font-size: 13px;
  list-style: none;
}

.trust-points li {
  position: relative;
  padding-left: 17px;
}

.trust-points li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--color-success);
  content: "✓";
  font-weight: 800;
}

/* Main Cron workspace */

.tool-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 32px;
}

.workspace-panel,
.results-panel {
  min-width: 0;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.35;
}

.tool-label {
  flex-shrink: 0;
  padding: 6px 10px;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

/* Form fields */

.field-group {
  margin-top: 24px;
}

.field-group > label,
.field-heading > label,
.field-heading label,
.cron-field label {
  display: block;
  color: #263247;
  font-size: 13px;
  font-weight: 650;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.field-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.field-hint {
  color: var(--color-muted);
  font-size: 12px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.65;
}

.preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preset-button {
  min-height: 36px;
  padding: 7px 11px;
  color: #374151;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.preset-button:hover,
.preset-button:focus-visible {
  color: #111827;
  background: #f3f4f6;
  border-color: #9ca3af;
}

.expression-input-wrap {
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: 9px;
}

.expression-input-wrap input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.3px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #60a5fa;
}

.error-message {
  margin: 9px 0 0;
  padding: 10px 12px;
  color: var(--color-danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.builder-group {
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.text-button {
  padding: 4px 0;
  color: #374151;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 650;
}

.text-button:hover {
  color: #111827;
  text-decoration: underline;
}

.cron-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.cron-field {
  min-width: 0;
  padding: 12px 9px 10px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 9px;
}

.cron-field label {
  min-height: 22px;
  font-size: 12px;
}

.cron-field input {
  width: 100%;
  min-width: 0;
  height: 39px;
  margin-top: 7px;
  padding: 7px 6px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.cron-field span {
  display: block;
  margin-top: 7px;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

/* Buttons */

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.button:active,
.preset-button:active {
  transform: translateY(1px);
}

.button-primary {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.button-primary:hover:not(:disabled) {
  background: #293548;
  border-color: #293548;
}

.button-secondary {
  color: #111827;
  background: #ffffff;
  border-color: #d1d5db;
}

.button-secondary:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Expression results */

.results-panel {
  margin-top: 0;
}

.result-status {
  flex-shrink: 0;
  padding: 5px 10px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 650;
}

.result-status.is-valid {
  color: #166534;
  background: #f0fdf4;
}

.result-status.is-invalid {
  color: #b91c1c;
  background: #fef2f2;
}

.expression-display {
  padding: 15px 16px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.result-label {
  display: block;
  margin-bottom: 7px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.25px;
}

.expression-display code {
  display: block;
  overflow-wrap: anywhere;
  padding: 0;
  color: #111827;
  background: transparent;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.7px;
}

.description-card {
  margin-top: 14px;
  padding: 15px 16px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.description-card p {
  margin: 0;
  color: #273449;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.field-breakdown {
  margin-top: 25px;
}

.field-breakdown h3,
.next-runs-section h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.breakdown-list {
  display: grid;
  gap: 0;
  margin-top: 11px;
  border-top: 1px solid var(--color-border);
}

.breakdown-row {
  display: grid;
  grid-template-columns: 90px 90px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--color-border);
}

.breakdown-row > span:first-child {
  color: #374151;
  font-size: 12px;
  font-weight: 650;
}

.breakdown-row code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.breakdown-row > span:last-child {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.5;
}

.next-runs-section {
  margin-top: 27px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.timezone-control {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 650;
}

.timezone-control select {
  min-width: 112px;
  min-height: 34px;
  padding: 5px 25px 5px 9px;
  color: #374151;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
}

.next-runs-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: run;
}

.next-runs-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 11px;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  counter-increment: run;
}

.next-runs-list li::before {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  color: #374151;
  background: #e5e7eb;
  border-radius: 50%;
  content: counter(run);
  font-size: 10px;
  font-weight: 750;
}

/* Privacy information */

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 30px;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 11px;
}

.privacy-icon {
  flex-shrink: 0;
  font-size: 17px;
}

.privacy-note p {
  margin: 0;
  color: #365744;
  font-size: 13px;
  line-height: 1.7;
}

.privacy-note strong {
  color: #14532d;
}

/* Instructions and Cron syntax guide */

.content-section {
  display: grid;
  gap: 0;
  padding-bottom: 30px;
}

.content-card {
  min-width: 0;
  padding: 30px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.35;
}

.content-card h3 {
  margin: 23px 0 10px;
  font-size: 16px;
  font-weight: 700;
}

.content-card > p:not(.eyebrow) {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
}

.instruction-list,
.operator-list {
  margin: 15px 0 0;
  padding-left: 22px;
  color: #4b5563;
  font-size: 14px;
}

.instruction-list li,
.operator-list li {
  margin: 8px 0;
  padding-left: 4px;
}

.instruction-list strong {
  color: #27344b;
}

.syntax-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 17px;
}

.syntax-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.syntax-table th,
.syntax-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}

.syntax-table th {
  color: #374151;
  background: #f9fafb;
  font-weight: 700;
}

.syntax-table td {
  color: #4b5563;
}

.syntax-table td:first-child {
  color: #26344c;
  font-weight: 650;
}

.notice-card {
  margin-top: 22px;
  padding: 16px 18px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.notice-card strong {
  color: #273449;
  font-size: 13px;
}

.notice-card p {
  margin: 7px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.8;
}

/* FAQ */

.faq-section {
  max-width: none;
  padding-top: 10px;
  padding-bottom: 48px;
}

.faq-section > h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.35;
}

.faq-list {
  display: grid;
  gap: 0;
}

.faq-item {
  padding: 0;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-item summary {
  position: relative;
  padding: 15px 30px 15px 0;
  color: #273449;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 13px;
  right: 3px;
  color: #374151;
  content: "+";
  font-size: 20px;
  font-weight: 500;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 0 16px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.8;
}

/* Unified footer */

.site-footer {
  padding: 24px 0;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  color: #9ca3af;
  font-size: 12px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  font-size: 12px;
}

.footer-inner > p {
  margin: 0;
}

/* Keyboard accessibility */

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Tablet */

@media (max-width: 800px) {
  .header-inner {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 18px;
  }

  .page-intro {
    padding-top: 40px;
    padding-bottom: 24px;
  }

  .intro-description {
    font-size: 15px;
  }

  .trust-points {
    gap: 8px 16px;
  }

  .workspace-panel,
  .results-panel {
    padding: 20px;
  }

  .cron-fields {
    gap: 8px;
  }

  .content-card {
    padding: 25px 0;
  }
}

/* Mobile */

@media (max-width: 520px) {
  .container {
    width: calc(100% - 28px);
  }

  .header-inner {
    width: calc(100% - 28px);
  }

  .brand-logo {
    width: 155px;
  }

  .top-nav {
    gap: 18px;
  }

  .top-nav a {
    font-size: 12px;
  }

  .page-intro {
    padding-top: 38px;
    padding-bottom: 24px;
  }

  .page-intro h1 {
    font-size: 34px;
    letter-spacing: -1.2px;
  }

  .intro-description {
    margin-top: 13px;
    font-size: 14px;
  }

  .trust-points {
    gap: 8px 15px;
  }

  .trust-points li {
    font-size: 11px;
  }

  .tool-section {
    gap: 14px;
    padding-bottom: 24px;
  }

  .workspace-panel,
  .results-panel {
    padding: 17px 15px;
    border-radius: 12px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .tool-label {
    max-width: 125px;
    white-space: normal;
    text-align: center;
    font-size: 9px;
  }

  .field-heading {
    align-items: flex-start;
  }

  .field-hint {
    max-width: 130px;
    text-align: right;
  }

  .preset-list {
    gap: 7px;
  }

  .preset-button {
    min-height: 33px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .expression-input-wrap {
    gap: 7px;
  }

  .expression-input-wrap input {
    min-height: 44px;
    padding: 9px;
    font-size: 14px;
  }

  .expression-input-wrap .button {
    min-height: 44px;
    padding: 8px 12px;
  }

  .cron-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .cron-field {
    padding: 11px 10px;
  }

  .cron-field:last-child {
    grid-column: 1 / -1;
  }

  .cron-field input {
    height: 42px;
    font-size: 15px;
  }

  .workspace-actions .button {
    flex: 1;
  }

  .breakdown-row {
    grid-template-columns: 65px 65px minmax(0, 1fr);
    gap: 7px;
  }

  .breakdown-row > span:last-child {
    font-size: 10px;
  }

  .privacy-note {
    margin-bottom: 22px;
    padding: 12px;
  }

  .content-section {
    padding-bottom: 20px;
  }

  .content-card {
    padding: 23px 0;
  }

  .content-card h2,
  .faq-section > h2 {
    font-size: 19px;
  }

  .syntax-table th,
  .syntax-table td {
    padding: 9px 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  .faq-section {
    width: calc(100% - 28px);
    margin-left: 14px;
    padding-bottom: 35px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .footer-inner nav {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
