/* Bundle site — Your Broker Is Lying to You
   Editorial style: cream + oxblood, serif, no carousels.
*/

:root {
  --cream: #F6F1EF;
  --ink: #1A1A1A;
  --oxblood: #690303;
  --meta: #6B6260;
  --rule: #D8CFCB;
  --code-bg: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Serif Pro", Georgia, "EB Garamond", serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--oxblood);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--oxblood);
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  margin-bottom: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.site-nav {
  float: right;
  margin-top: 0.3rem;
}

/* Header: blocco brand (nome autore + titolo bundle) */
.header-brand { float: left; }
.site-header .wrap::after { content: ""; display: table; clear: both; }
.site-header .site-nav { margin-top: 0.45rem; }

/* Il nome autore in alto, in sans e spaziato: la riga superiore dell'header
   e' tutta sans (autore a sinistra, nav a destra). Il serif resta sul
   titolo del bundle, che e' il nome del progetto. */
.header-brand .author-link {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--meta);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.header-brand .wordmark { display: block; }

@media (max-width: 720px) {
  .header-brand { float: none; }
  .site-header .site-nav { float: none; margin-top: 0.85rem; }
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.75rem;
  font-size: 0.92rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--oxblood);
  border-bottom: 1px solid var(--oxblood);
  padding-bottom: 0.2rem;
}

/* Main */
main {
  padding: 0;
}

.hero {
  padding-top: 4.5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--meta);
  margin-bottom: 1.25rem;
}

.display {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  max-width: 880px;
}

.lede {
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 720px;
  margin: 1.25rem 0;
}

.lede-tail {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--meta);
  margin-top: 1.25rem;
}

/* Sections */
.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.section h2 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  max-width: 720px;
}

.section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.005em;
}

.section p {
  margin-bottom: 1.1rem;
  max-width: 720px;
}

.section em {
  font-style: italic;
}

.section strong {
  font-weight: 700;
  color: var(--oxblood);
}

.section ul {
  margin: 1rem 0 1.5rem 1.5rem;
  max-width: 720px;
}

.section li {
  margin-bottom: 0.5rem;
}

.meta {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 0.78rem;
  color: var(--meta);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

/* CTAs */
.cta-row {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
}

.cta-row .btn {
  margin-right: 0;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--oxblood);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  margin-right: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  border: 1px solid var(--oxblood);
}

.btn:hover {
  background: transparent;
  color: var(--oxblood);
  border-bottom: 1px solid var(--oxblood);
}

.link-arrow {
  color: var(--oxblood);
  text-decoration: none;
  border-bottom: 1px solid var(--oxblood);
  padding-bottom: 0.15rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
}

.link-arrow:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Cover link (hero) */
.cover-link { display: inline-block; line-height: 0; }
.cover-link img { transition: opacity 0.15s ease; }
.cover-link:hover img,
.cover-link:focus-visible img { opacity: 0.82; }

/* Code blocks (prompts) */
pre.prompt {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  color: var(--ink);
}

code.inline {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.82em;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.copy-btn {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-size: 0.78rem;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.copy-btn:hover {
  background: var(--oxblood);
  color: var(--cream);
  border: none;
}

.copy-btn.copied {
  background: #2E7D32;
}

/* Tool cards (spreadsheets) */
.tool-card {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.tool-card:last-child {
  border-bottom: none;
}

.tool-card h3 {
  margin: 0 0 0.5rem;
}

.tool-card .tagline {
  font-style: italic;
  color: var(--meta);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.tool-card p {
  margin-bottom: 1rem;
}

.tool-card .download {
  display: inline-block;
  margin-top: 0.6rem;
}

/* Manifesto pull-quote */
.manifesto {
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.5;
  color: var(--ink);
  border-left: 3px solid var(--oxblood);
  padding-left: 1.5rem;
  margin: 2rem 0 2.5rem;
  max-width: 800px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-line {
  font-size: 0.92rem;
  color: var(--meta);
  margin-top: 0.6rem;
  line-height: 1.5;
  max-width: 380px;
}

.footer-col p.kicker {
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--oxblood);
  border-bottom: 1px solid var(--oxblood);
}

.colophon {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--meta);
}

/* Responsive */
@media (max-width: 720px) {
  html { font-size: 16px; }
  .display { font-size: 1.55rem; line-height: 1.22; }
  .lede { font-size: 1rem; }
  .kicker { font-size: 0.68rem; }
  .lede-tail { font-size: 0.95rem; }
  .wordmark { display: block; font-size: 1.2rem; }
  .site-nav { float: none; margin-top: 0.75rem; }
  .site-nav a { margin-left: 0; margin-right: 1.25rem; font-size: 0.88rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .tool-card { padding: 1.75rem 0; }
  /* Mobile CTA: allinea i bottoni al margine sinistro del testo */
  .cta-row { gap: 0.75rem 0; }
  .cta-row .btn,
  .cta-row .link-arrow { margin: 0; width: 100%; }
  .cta-row .link-arrow { text-align: center; }
}

/* Word-wrap safety for headlines */
.display,
.lede {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
