/* TagLink Kit — public site. Not affiliated with Amazon. */
:root {
  --bg: #0b181d;
  --bg-elev: #102228;
  --surface: #142b32;
  --surface-2: #1a353d;
  --border: #2a4a54;
  --text: #eef6f4;
  --text-muted: #9bb0b4;
  --accent: #8fd4b8;
  --accent-2: #c8e8d8;
  --accent-dim: rgba(143, 212, 184, 0.12);
  --accent-ink: #0b181d;
  --gold: #e8c56b;
  --success: #7ee0a8;
  --success-dim: rgba(126, 224, 168, 0.14);
  --error: #ff8a80;
  --error-dim: rgba(255, 138, 128, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: ui-sans-serif, system-ui, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --max: 1080px;
  --narrow: 760px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(143, 212, 184, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(20, 70, 80, 0.45), transparent 60%);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 24, 29, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; display: block; }
.nav { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 650;
  border-radius: 999px; padding: 0.7rem 1.15rem; font-size: 0.95rem;
  text-decoration: none; transition: transform 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; border-radius: var(--radius-sm); }

/* Hero */
.hero { padding: 3.25rem 0 2rem; }
.hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.85rem); line-height: 1.15; letter-spacing: -0.03em; max-width: 18ch; margin-bottom: 0.85rem; }
.hero .lede { font-size: 1.15rem; color: var(--text-muted); max-width: 42rem; margin-bottom: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill {
  font-size: 0.75rem; font-weight: 650; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 0.22rem 0.65rem; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid transparent;
}

/* Sections */
section { padding: 2.25rem 0; }
.section-title { font-size: 1.55rem; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.section-sub { color: var(--text-muted); margin-bottom: 1.4rem; max-width: 40rem; }

/* Cards / tool */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; background: var(--accent); color: var(--accent-ink);
  border-radius: 50%; font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.hint { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
label {
  display: block; font-size: 0.75rem; font-weight: 650; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.35rem;
}
input[type="text"], textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--mono);
  font-size: 0.9rem; padding: 0.7rem 0.9rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
input::placeholder, textarea::placeholder { color: #5a7378; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 0.85rem; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.result-box {
  display: none; margin: 0.6rem 0; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 0.85rem; word-break: break-all;
  background: var(--bg); border: 1px solid var(--border);
}
.result-box.visible { display: block; }
.result-box.valid { border-color: var(--success); background: var(--success-dim); }
.result-box.invalid { border-color: var(--error); background: var(--error-dim); color: var(--error); }
.status { font-size: 0.85rem; margin: 0.35rem 0 0; min-height: 1.2em; color: var(--text-muted); }
.status.ok { color: var(--success); }
.status.err { color: var(--error); }
.table-wrap { display: none; overflow-x: auto; margin-top: 0.9rem; }
.table-wrap.visible { display: block; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { text-align: left; color: var(--text-muted); font-weight: 650; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); }
td { padding: 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; word-break: break-all; }
td a { color: var(--accent-2); }
.asin-ok { font-family: var(--mono); color: var(--success); white-space: nowrap; }
.asin-bad { font-family: var(--mono); color: var(--error); white-space: nowrap; }
button.copy-one {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.25rem 0.55rem; cursor: pointer; font: inherit; font-size: 0.8rem;
}
button.copy-one:hover { border-color: var(--accent); color: var(--accent); }
.bookmarklet-area { margin-top: 0.4rem; }
.bookmarklet-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--accent); color: var(--accent-ink) !important; text-decoration: none !important;
  font-weight: 700; padding: 0.65rem 1rem; border-radius: 999px; cursor: grab;
}
.drag-hint { color: var(--text-muted); font-size: 0.85rem; margin: 0.55rem 0 0.8rem; }
.bookmarklet-code textarea { min-height: 70px; font-size: 0.75rem; }
.limit-note {
  margin-top: 0.8rem; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  background: var(--accent-dim); border: 1px dashed var(--accent); color: var(--text);
  font-size: 0.92rem;
}
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  padding: 0.6rem 1rem; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 80; font-size: 0.9rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.show.success { border-color: var(--success); }

/* Feature grid / compare */
.grid-3, .grid-2 { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; }
.feature h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.feature p { color: var(--text-muted); font-size: 0.95rem; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; }
.compare th { background: var(--surface-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.compare td:first-child { color: var(--text); }
.yes { color: var(--success); font-weight: 650; }
.no { color: var(--text-muted); }
.cta-band {
  background: linear-gradient(135deg, var(--surface) 0%, #16343c 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.cta-band h2 { font-size: 1.3rem; letter-spacing: -0.02em; margin: 0 0 0.3rem; }
.cta-band p { color: var(--text-muted); margin: 0; }
.price { font-weight: 700; color: var(--gold); }

/* Guides list */
.guide-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.2rem; transition: border-color 0.15s, transform 0.12s; }
.guide-card:hover { border-color: var(--accent); color: inherit; transform: translateY(-1px); }
.guide-card h3 { color: var(--text); margin-bottom: 0.3rem; }
.guide-card p { color: var(--text-muted); font-size: 0.95rem; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-muted); margin-top: 0.55rem; }

/* Article typography */
.article { padding: 2.2rem 0 3rem; }
.crumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 0.6rem; }
.dek { color: var(--text-muted); font-size: 1.08rem; margin-bottom: 1.5rem; }
.article h2 { font-size: 1.25rem; margin: 1.7rem 0 0.55rem; letter-spacing: -0.02em; }
.article p, .article li { margin-bottom: 0.8rem; }
.article ul, .article ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.article code, .prose code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px;
}
.article pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; overflow-x: auto; margin: 0 0 1rem; font-family: var(--mono); font-size: 0.86rem;
}
.note {
  background: var(--surface); border-left: 3px solid var(--gold); padding: 0.8rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1rem 0; color: var(--text-muted);
}
.note strong { color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; margin-top: 1rem; color: var(--text-muted); font-size: 0.88rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.85rem 1.2rem; margin-bottom: 1rem; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.disclaimer { max-width: 50rem; }
.footer-meta { margin-top: 0.8rem; }

/* 404 */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }

@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  .hero { padding-top: 2rem; }
}
