/* StudioHawk robots.txt Tester — styles
   Brand: Picton Blue #3DB7E9, Bright Aqua #01FFFF, Deep Black, Warm Grey #F5F4F2.
   Fonts: Archivo (UI), JetBrains Mono (code). */

:root {
  --black: #0c0c0e;
  --ink: #1a1a1a;
  --ink-soft: #4a4a52;
  --ink-faint: #6f6f78;
  --warm-grey: #f5f4f2;
  --white: #ffffff;
  --line: #e4e2dd;
  --line-strong: #d3d0c9;

  --blue: #3db7e9;
  --blue-dark: #1d8dba;
  --aqua: #01ffff;
  --violet: #adbaff;
  --yellow: #fecf40;

  --ok-bg: #e7f6ec;
  --ok-fg: #1f7a3e;
  --ok-line: #b6e3c4;
  --block-bg: #fdeaea;
  --block-fg: #c0392b;
  --block-line: #f3c2bd;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -28px rgba(12, 12, 14, 0.45);
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* editor metrics — kept in sync with JS line-highlight math */
  --code-size: 13px;
  --code-line: 20px;
  --code-pad: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--warm-grey);
  line-height: 1.6;
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 24px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(61, 183, 233, 0.12);
  color: #0d5f80;
  padding: 0.12em 0.4em;
  border-radius: 5px;
  white-space: nowrap;
}

a { color: var(--blue-dark); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.site-header {
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand__logo { height: 22px; display: block; }
.site-header__tag {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
  font-weight: 600;
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 88% -10%, rgba(1, 255, 255, 0.16), transparent 60%),
    radial-gradient(700px 360px at 6% 120%, rgba(61, 183, 233, 0.18), transparent 60%),
    var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, black 40%, black);
}
.hero__inner {
  position: relative;
  padding: 64px 24px 76px;
  max-width: 820px;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--aqua);
}
.hero__title {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__sub {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 300;
  max-width: 640px;
}
.hero__sub code { background: rgba(1, 255, 255, 0.16); color: #d8feff; }

/* ---------- tool ---------- */
.tool { padding: 38px 24px 10px; margin-top: -42px; position: relative; z-index: 2; }
.tool__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.panel__head { margin-bottom: 16px; }
.panel__title {
  margin: 0 0 4px;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel__hint { margin: 0; font-size: 0.9rem; color: var(--ink-faint); }

.panel__head--toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

/* advanced switch */
.adv-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  user-select: none;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-top: 2px;
}
.adv-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.adv-toggle__sw {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background 0.15s;
  flex: 0 0 auto;
}
.adv-toggle__sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.adv-toggle input:checked + .adv-toggle__sw { background: var(--blue); }
.adv-toggle input:checked + .adv-toggle__sw::after { transform: translateX(14px); }
.adv-toggle input:focus-visible + .adv-toggle__sw { box-shadow: 0 0 0 3px rgba(61, 183, 233, 0.3); }

/* fetch row */
.fetch-row { display: flex; gap: 10px; }
.input, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input--sm { font-size: 0.9rem; padding: 9px 11px; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61, 183, 233, 0.22);
}
.textarea { font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; resize: vertical; }

.fetch-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--ink-faint);
}
.fetch-status.is-error { color: var(--block-fg); }
.fetch-status.is-ok { color: var(--ok-fg); }
.fetch-status.is-loading { color: var(--blue-dark); }

/* buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #04222e; }
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }
.btn--aqua { background: var(--aqua); color: #042a2a; }
.btn--aqua:hover { box-shadow: 0 0 0 4px rgba(1, 255, 255, 0.3); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn:disabled { opacity: 0.55; cursor: progress; }

.link-btn {
  background: none;
  border: none;
  color: var(--blue-dark);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- editor ---------- */
.editor {
  display: flex;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #0f1117;
  overflow: hidden;
  height: 320px;
}
.editor__gutter {
  flex: 0 0 auto;
  width: 46px;
  padding: var(--code-pad) 8px var(--code-pad) 0;
  text-align: right;
  font-family: var(--mono);
  font-size: var(--code-size);
  line-height: var(--code-line);
  color: #525a6b;
  background: #0b0d12;
  user-select: none;
  overflow: hidden;
  white-space: pre;
}
.editor__scroll { position: relative; flex: 1 1 auto; min-width: 0; }
.editor__highlight {
  position: absolute;
  left: 0; right: 0;
  height: var(--code-line);
  background: rgba(1, 255, 255, 0.16);
  border-left: 3px solid var(--aqua);
  pointer-events: none;
  display: none;
}
.editor__textarea {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  resize: none;
  background: transparent;
  color: #e7ebf2;
  caret-color: var(--aqua);
  font-family: var(--mono);
  font-size: var(--code-size);
  line-height: var(--code-line);
  padding: var(--code-pad);
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}
.editor__textarea:focus { outline: none; }
.editor__textarea::selection { background: rgba(61, 183, 233, 0.4); }

.editor__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.editor__count { margin-left: auto; font-size: 0.8rem; color: var(--ink-faint); }

/* validation */
.validation {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.validation__title { margin: 0 0 8px; font-size: 0.95rem; font-weight: 600; }
.validation__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.validation__list li {
  font-size: 0.85rem;
  padding-left: 22px;
  position: relative;
  color: var(--ink-soft);
}
.validation__list li::before {
  position: absolute; left: 0; top: 0;
  font-weight: 700;
}
.v-ok::before { content: '✓'; color: var(--ok-fg); }
.v-warn::before { content: '!'; color: #b0721f; }
.v-info::before { content: 'i'; color: var(--blue-dark); font-style: italic; }

/* ---------- bots ---------- */
.field { border: 0; margin: 0 0 16px; padding: 0; }
.field__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 9px;
}
.bots { display: grid; gap: 12px; }
.bots__group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 6px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  cursor: pointer;
  background: var(--white);
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  line-height: 1.3;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  flex: 0 0 auto;
  transition: background 0.12s, border-color 0.12s;
}
.chip:hover { border-color: var(--blue); }
.chip:has(input:checked) {
  border-color: var(--blue);
  background: rgba(61, 183, 233, 0.1);
  color: #0d5f80;
}
.chip:has(input:checked) .chip__dot { background: var(--blue); border-color: var(--blue); }
.chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(61, 183, 233, 0.25); }
.custom-ua { margin-top: 10px; }

/* ---------- results ---------- */
.actions { margin-bottom: 6px; }
.results { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.results__summary { font-size: 0.9rem; font-weight: 500; }
.results__summary strong { font-weight: 700; }
.results__tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.results__table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.results__table th {
  text-align: left;
  background: var(--warm-grey);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.results__table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.results__table tr:last-child td { border-bottom: 0; }
.results__table tr:hover td { background: #fafaf9; }
.cell-url { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; max-width: 260px; }
.cell-bot { white-space: nowrap; color: var(--ink-soft); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.badge--block { background: var(--block-bg); color: var(--block-fg); border: 1px solid var(--block-line); }

.rule-cell { font-family: var(--mono); font-size: 0.78rem; }
.rule-cell button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--blue-dark);
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.rule-cell button:hover { text-decoration: underline; }
.rule-cell .rule-line { color: var(--ink-faint); }
.rule-none { color: var(--ink-faint); font-style: italic; }
.results__foot { margin: 10px 0 0; font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- explainer ---------- */
.explainer { padding: 60px 24px 20px; }
.explainer__title {
  margin: 0 0 26px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.explainer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}
.card h3::before {
  content: '';
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 9px;
  vertical-align: middle;
}
.card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.explainer__note {
  margin: 24px 0 0;
  font-size: 0.86rem;
  color: var(--ink-faint);
  max-width: 880px;
}

/* ---------- cta ---------- */
.cta { margin-top: 40px; background: var(--black); color: var(--white); }
.cta::after { content: ''; display: block; }
.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 46px 24px;
  flex-wrap: wrap;
}
.cta__title { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
.cta__sub { margin: 0; color: rgba(255, 255, 255, 0.78); font-weight: 300; max-width: 560px; }
.cta__sub code { background: rgba(1, 255, 255, 0.16); color: #d8feff; }

/* ---------- footer ---------- */
.site-footer { background: #07070a; color: rgba(255, 255, 255, 0.7); }
.site-footer__inner { padding: 34px 24px; text-align: center; }
.site-footer__logo { height: 20px; opacity: 0.9; margin-bottom: 14px; }
.site-footer__copy { margin: 0 0 6px; font-size: 0.9rem; }
.site-footer__copy a { color: var(--aqua); }
.site-footer__disc { margin: 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.45); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .tool__grid { grid-template-columns: 1fr; }
  .hero__inner { padding: 48px 24px 64px; }
}
@media (max-width: 540px) {
  .fetch-row { flex-direction: column; }
  .fetch-row .btn { width: 100%; }
  .cta__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
