:root {
  --bg: #0f1117;
  --bg-elev: #171a23;
  --bg-elev-2: #1e222d;
  --border: #2a2f3c;
  --border-strong: #3a4152;
  --text: #e6e9ef;
  --text-dim: #9aa3b2;
  --text-faint: #6b7382;
  --accent: #6d8bff;
  --accent-hover: #8aa1ff;
  --accent-soft: rgba(109, 139, 255, 0.14);
  --good: #4ade80;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-elev: #ffffff;
    --bg-elev-2: #f0f3f9;
    --border: #e2e6ef;
    --border-strong: #cdd4e2;
    --text: #1a1f2b;
    --text-dim: #5a6474;
    --text-faint: #8a93a3;
    --accent: #3b62f6;
    --accent-hover: #2f52d8;
    --accent-soft: rgba(59, 98, 246, 0.10);
    --shadow: 0 8px 30px rgba(30,40,80,0.10);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding: 32px 20px 64px;
}
.wrap { max-width: 920px; margin: 0 auto; }

header { text-align: center; margin-bottom: 28px; }
h1.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
}
h1.logo .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #a06dff);
  display: grid; place-items: center; color: #fff; font-size: 19px;
  box-shadow: 0 4px 14px var(--accent-soft);
}
header p { color: var(--text-dim); margin-top: 8px; font-size: 15px; }

/* Result / output */
.output {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.output-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.output-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-faint); font-weight: 600;
}
.mode-toggle {
  display: inline-flex; background: var(--bg-elev-2);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px;
}
.mode-btn {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--text-dim); padding: 8px 16px; border-radius: 16px;
  transition: all .15s;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active { background: var(--accent); color: #fff; }

.expr-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.expr {
  flex: 1; min-width: 240px;
  font-family: var(--mono); font-size: 24px; font-weight: 600;
  color: var(--accent); letter-spacing: 1px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  user-select: all; overflow-x: auto; white-space: nowrap;
}
.copy-btn {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 13px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .05s; white-space: nowrap;
}
.copy-btn:hover { background: var(--accent-hover); }
.copy-btn:active { transform: translateY(1px); }
.copy-btn.copied { background: var(--good); }
.human {
  margin-top: 14px; color: var(--text-dim); font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.human strong { color: var(--text); font-weight: 600; }
.field-legend {
  margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
}
.field-legend span {
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; color: var(--text-faint);
}
.field-legend span b { color: var(--text-dim); font-weight: 600; }

/* Tabs */
.tabs {
  display: flex; gap: 4px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px; margin-bottom: 18px; overflow-x: auto;
}
.tab {
  flex: 1; min-width: 92px; text-align: center;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; border: none; background: transparent;
  transition: all .15s; white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--bg-elev-2); }
.tab.active { background: var(--accent); color: #fff; }

/* Panel */
.panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow); min-height: 220px;
}
.panel h2 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.panel .sub { color: var(--text-faint); font-size: 13px; margin-bottom: 18px; }

.opt { display: flex; align-items: center; gap: 12px; padding: 11px 0; flex-wrap: wrap; }
.opt + .opt { border-top: 1px solid var(--border); }
.radio {
  appearance: none; width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--border-strong); border-radius: 50%;
  cursor: pointer; position: relative; transition: border-color .15s;
}
.radio:checked { border-color: var(--accent); }
.radio:checked::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--accent); border-radius: 50%;
}
.opt label { cursor: pointer; font-size: 14.5px; color: var(--text); user-select: none; }
.opt.disabled label { color: var(--text-faint); }

select, input[type="number"] {
  font-family: var(--font); font-size: 14px;
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 7px 10px; cursor: pointer; transition: border-color .15s;
}
input[type="number"] { width: 72px; text-align: center; }
select:focus, input:focus { outline: none; border-color: var(--accent); }
select:disabled, input:disabled { opacity: .4; cursor: not-allowed; }

.inline { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.muted { color: var(--text-dim); font-size: 14px; }

.dow-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  color: var(--text-dim); cursor: pointer; user-select: none; transition: all .12s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Next runs */
.runs {
  margin-top: 22px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px;
}
.runs h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint); font-weight: 600; margin-bottom: 14px;
}
.runs h2 .tz { text-transform: none; font-weight: 400; color: var(--text-faint); }
.run-item {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 14px; padding: 8px 0;
  color: var(--text-dim);
}
.run-item + .run-item { border-top: 1px dashed var(--border); }
.run-item .n {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  font-family: var(--font);
}
.run-item .dt { color: var(--text); }
.run-item .rel { margin-left: auto; color: var(--text-faint); font-size: 12.5px; font-family: var(--font); }
.runs .empty { color: var(--text-faint); font-size: 14px; font-style: italic; }

/* Parser: list next scheduled dates */
.parser {
  margin-top: 22px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.parser-head h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.parser-head .sub { color: var(--text-faint); font-size: 13px; margin-bottom: 18px; }

.parser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.pfield { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pfield-wide { grid-column: 1 / -1; }
.plabel {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint); font-weight: 600;
}
.pinput {
  font-family: var(--font); font-size: 14px;
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; width: 100%;
  transition: border-color .15s;
}
.pinput:focus { outline: none; border-color: var(--accent); }
.pinput.mono { font-family: var(--mono); letter-spacing: .5px; }
.time-inputs { display: inline-flex; align-items: center; gap: 8px; }
.time-inputs .pinput { width: 72px; text-align: center; }
.time-inputs .colon { color: var(--text-dim); font-weight: 700; }
.pfield-count .pinput { width: 90px; }

.parser-error {
  margin-top: 14px; padding: 10px 14px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  color: #f87171; font-size: 13.5px;
}

.parser-result { margin-top: 20px; }
.parser-result h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint); font-weight: 600; margin-bottom: 12px;
}
.parser-list {
  list-style: none; counter-reset: run;
}
.parser-list li {
  counter-increment: run;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; padding: 9px 0; color: var(--text);
}
.parser-list li + li { border-top: 1px dashed var(--border); }
.parser-list li::before {
  content: counter(run) ".";
  color: var(--text-faint); font-size: 12.5px; font-weight: 600;
  min-width: 28px; font-variant-numeric: tabular-nums;
}
.parser-list li .mono { font-family: var(--mono); letter-spacing: .5px; }
.parser-list li.empty { color: var(--text-faint); font-style: italic; }
.parser-list li.empty::before { content: ""; min-width: 0; }

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

footer { text-align: center; margin-top: 32px; color: var(--text-faint); font-size: 13px; }
footer a { color: var(--text-dim); }
footer code { font-family: var(--mono); }

/* SEO Guide & FAQ Section */
.seo-section {
  margin-top: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.seo-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.seo-section h2:first-of-type {
  margin-top: 0;
}
.seo-section p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.cron-examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cron-example-link {
  font-size: 13px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}
.cron-example-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.table-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.seo-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.seo-section th, .seo-section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.seo-section th {
  background: var(--bg-elev-2);
  color: var(--text);
  font-weight: 600;
}
.seo-section td {
  color: var(--text-dim);
}
.seo-section td code {
  font-family: var(--mono);
  background: var(--bg-elev-2);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--accent);
}
.faq-item {
  margin-bottom: 16px;
}
.faq-item h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.faq-item p {
  margin-bottom: 0;
}
.seo-section p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.seo-section p a:hover {
  color: var(--accent-hover);
}

/* Footer EEAT Styling */
.footer-eeat {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
}
.footer-eeat p {
  margin-bottom: 6px;
  color: var(--text-faint);
}
.footer-links {
  margin-top: 8px;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  margin: 0 4px;
}
.footer-links a:hover {
  color: var(--accent);
}

/* Programmatic SEO Intro */
.prog-intro {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.prog-intro h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--accent);
}
.prog-intro p {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 0;
  line-height: 1.5;
}
