/* Scelta Ragionata — foglio di stile unico, nessuna dipendenza esterna */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #1c1e21;
  --text-muted: #565a5f;
  --border: #dcdfe3;
  --accent: #0a5f38;
  --accent-contrast: #ffffff;
  --link: #0a5f38;
  --link-visited: #0a5f38;
  --max-width: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #1c1f24;
    --text: #e8e9eb;
    --text-muted: #a3a8ae;
    --border: #33373d;
    --accent: #4fd18b;
    --accent-contrast: #0b0d0f;
    --link: #4fd18b;
    --link-visited: #4fd18b;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
}

a:visited {
  color: var(--link-visited);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--text);
  text-decoration: underline;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

main.narrow {
  max-width: 640px;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.notice {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--text-muted);
  font-weight: 600;
}

.placeholder {
  background: rgba(234, 179, 8, 0.18);
  border: 1px dashed #b7791f;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-bottom: 0.9rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus {
  text-decoration: underline;
}

.affiliate-disclosure {
  font-weight: 600;
  color: var(--text);
}

.error-page {
  text-align: center;
  padding: 4rem 1.25rem;
}

.error-page .code {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.55rem;
  }
  body {
    font-size: 16px;
  }
}
