/* Comment Exporter — OverPress Tools */

:root {
  --primary: #066aab;
  --primary-dark: #054f80;
  --primary-light: #e6f1f9;
  --primary-tint: rgba(6, 106, 171, 0.06);
  --accent: #ed0a71;
  --accent-dark: #c20860;
  --accent-light: #fde6f1;
  --text: #14161b;
  --text-soft: #4a4a55;
  --text-dim: #8b8b95;
  --border: #ececef;
  --border-strong: #d6d6dd;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --bg-tint: #f4f5f7;
  --success: #00ab6b;
  --warn: #b7791f;
  --warn-bg: #fdf6e7;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 27, 0.04), 0 1px 3px rgba(20, 22, 27, 0.06);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

[hidden] { display: none !important; }

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--primary-tint) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }

/* ---------- Header (pattern condiviso col resto del sito) ---------- */
.site-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.back, .header-spacer { width: 44px; height: 44px; }

.back {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-soft);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.back:hover, .back:active { background: var(--bg-tint); color: var(--text); }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
}

.brand-suffix {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1;
}

/* ---------- Stage ---------- */
.stage {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.hero { padding: 34px 0 8px; }

.kicker {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }

.lead { color: var(--text-soft); font-size: 1.02rem; max-width: 60ch; }

@media (min-width: 720px) {
  .hero { padding: 46px 0 10px; }
  .hero h1 { font-size: 2.5rem; }
  .lead { font-size: 1.1rem; }
}

/* ---------- Callout ---------- */
.callout {
  display: flex;
  gap: 13px;
  margin: 26px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  border: 1px solid rgba(183, 121, 31, 0.22);
  font-size: 0.92rem;
  color: #6b4a12;
  line-height: 1.55;
}

.callout svg { flex: 0 0 auto; color: var(--warn); margin-top: 1px; }
.callout strong { color: #533809; }

/* ---------- Download ---------- */
.dl-grid {
  display: grid;
  gap: 14px;
  margin: 30px 0 8px;
}

@media (min-width: 620px) { .dl-grid { grid-template-columns: 1fr 1fr; } }

.dl-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}

.dl-card:hover { border-color: var(--primary); transform: translateY(-2px); }

.dl-logo { flex: 0 0 auto; width: 40px; height: 40px; }

.dl-body { flex: 1; min-width: 0; }

.dl-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 2px;
}

.dl-meta { font-size: 0.82rem; color: var(--text-dim); }

.dl-btn {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s var(--ease);
}

.dl-btn:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  margin: 40px 0 0;
  padding: 4px;
  background: var(--bg-tint);
  border-radius: 999px;
  width: fit-content;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 20px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.tab[aria-selected="true"] {
  background: var(--bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.panel { padding-top: 26px; }

.panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.panel .panel-note {
  color: var(--text-soft);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; }

.step {
  position: relative;
  counter-increment: step;
  padding: 0 0 24px 46px;
  border-left: 2px solid var(--border);
  margin-left: 15px;
}

.step:last-child { border-left-color: transparent; padding-bottom: 4px; }

.step::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -3px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.step p { color: var(--text-soft); font-size: 0.94rem; }

.step p + p { margin-top: 7px; }

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-soft);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ---------- Code + copy ---------- */
.code {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: var(--radius);
  background: #1c1f26;
  overflow: hidden;
}

.code code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  color: #e6e6ea;
  white-space: pre;
  scrollbar-width: thin;
}

.copy {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #e6e6ea;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.copy:hover { background: rgba(255,255,255,0.16); }
.copy.done { background: var(--success); border-color: var(--success); color: #fff; }

/* ---------- Troubleshooting ---------- */
.faq { margin-top: 42px; }

.faq h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 9px;
  overflow: hidden;
}

details[open] { border-color: var(--border-strong); }

summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.94rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(-45deg);
  transition: transform 0.18s var(--ease);
}

details[open] summary::before { transform: rotate(45deg); }

details .answer {
  padding: 0 16px 15px 33px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

details .answer code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-tint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.site-footer a { color: var(--text-soft); border-bottom: 1px dotted var(--text-dim); }
