/* ========================================
   Extra styles for the tools at /tools/.
   Tool pages load /css/style.css (the main site's styles) first, then this
   file, so only what tools need on top of the main site lives here.
   Page-specific styles stay inline in each tool.
   ======================================== */

:root {
  --surface:    #fafafa;
  --highlight:  #fff1a8;
  --danger:     #b42318;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface:    #1c1c1c;
    --highlight:  #5c4d00;
    --danger:     #ff8a80;
  }
}

:root[data-theme="dark"] {
  --surface:    #1c1c1c;
  --highlight:  #5c4d00;
  --danger:     #ff8a80;
}

main { padding: 2rem 0 3rem; }

/* For tools that need room, like tables. */
.container.wide { max-width: 960px; }

/* ========== PAGE TITLES ========== */

/* The main site's .page-title has room above it for blog lists;
   tools sit it right under the header instead. */
.page-title {
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.page-intro { color: var(--text-muted); margin-bottom: 2rem; }

/* Small uppercase label, like "Recent posts" on the main site. */
.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ========== FORMS ========== */

label, .field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="search"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}
input::placeholder { color: var(--text-muted); }
input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--link);
  background: var(--link);
  color: var(--bg);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-outline { background: none; color: var(--link); border-color: var(--border); }
.btn-outline:hover { border-color: var(--link); opacity: 1; }

/* A bordered box, used for results panels. */
.box {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

mark { background: var(--highlight); color: inherit; border-radius: 2px; }
