/* Shared base + "panel" component — used by the homepage (style.css imports
   this) AND any-page/index.html (links this directly, skipping the grid/card/
   footer CSS it never uses). Keep this file's own rules generic; page-specific
   layout (hero, grid, footer, .bonus wrapper) belongs in style.css instead. */

:root {
  --bg: #0b0d12;
  --bg-elev: #11141b;
  --bg-card: #161a23;
  --border: #232936;
  --text: #e6e8ee;
  --text-dim: #8a93a6;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.12);
  --radius: 14px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --max-w: 1100px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Note: the intro paragraph uses .lede (not a bare `p` selector) so it can't
   accidentally out-specificity .hint/.field-note, which are also <p>s. */
.panel {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel h1,
.panel h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.panel .lede {
  margin: 0 0 18px;
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 0.95rem;
}
.panel .field {
  position: relative;
}
.panel .row input {
  width: 100%;
  padding: 12px 74px 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 120ms;
}
.panel .row input:focus {
  border-color: var(--accent);
}
.panel .field-actions {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
}
.panel .field-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, background 120ms ease, color 120ms ease;
}
.panel .field-btn.show {
  opacity: 1;
  pointer-events: auto;
}
.panel .field-btn svg {
  width: 15px;
  height: 15px;
}
.panel .field-btn:hover {
  background: var(--border);
  color: var(--text);
}
.panel .field-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(11, 13, 18, 0.95);
  color: var(--text);
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.panel .field-btn.show:hover::after,
.panel .field-btn.show:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.panel .field-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #f0b429;
}
.panel .field-note[hidden] {
  display: none;
}
.panel .field-note svg {
  width: 14px;
  height: 14px;
  flex: none;
}
.panel .actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.panel .actions button {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}
.panel .actions .btn-primary {
  border: 0;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 600;
}
.panel .actions .btn-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.panel .actions .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.panel .actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.panel .hint {
  margin: 20px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.panel .hint.err {
  color: #ff8b8b;
}
.panel .back {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.85rem;
}
