/* =========================================================================
   FUNDAMENTOS DE PERIODISMO - Stylesheet
   Tema editorial-academico. CSS escrito a mano para no requerir build step.
   ========================================================================= */

:root {
    --paper: #f4f0e8;
    --paper-dark: #ebe5d6;
    --ink: #1a1614;
    --ink-soft: #3a3530;
    --accent: #b8341a;
    --accent-soft: #e85a3c;
    --emerald-50: #ecfdf5;
    --emerald-200: #a7f3d0;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --red-50: #fef2f2;
    --red-200: #fecaca;
    --red-800: #991b1b;
}

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

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
[x-cloak] { display: none !important; }

/* ===== Tipografia ===== */
.font-display { font-family: 'Fraunces', Georgia, serif; }
.font-mono { font-family: 'Inconsolata', monospace; }
.font-sans { font-family: 'IBM Plex Sans', system-ui, sans-serif; }

/* ===== Colores ===== */
.bg-paper { background: var(--paper); }
.bg-paper\/95 { background: rgba(244, 240, 232, 0.95); }
.text-paper { color: var(--paper); }
.text-paper\/60 { color: rgba(244, 240, 232, 0.6); }
.text-paper\/70 { color: rgba(244, 240, 232, 0.7); }
.text-paper\/80 { color: rgba(244, 240, 232, 0.8); }
.bg-paper\/20 { background: rgba(244, 240, 232, 0.2); }

.bg-ink { background: var(--ink); }
.text-ink { color: var(--ink); }
.text-ink\/30 { color: rgba(26, 22, 20, 0.3); }
.text-ink\/40 { color: rgba(26, 22, 20, 0.4); }
.text-ink\/50 { color: rgba(26, 22, 20, 0.5); }
.text-ink\/60 { color: rgba(26, 22, 20, 0.6); }
.text-ink\/70 { color: rgba(26, 22, 20, 0.7); }
.text-ink\/75 { color: rgba(26, 22, 20, 0.75); }
.text-ink\/80 { color: rgba(26, 22, 20, 0.8); }
.bg-ink\/5 { background: rgba(26, 22, 20, 0.05); }
.bg-ink\/10 { background: rgba(26, 22, 20, 0.1); }
.border-ink { border-color: var(--ink); }
.border-ink\/10 { border-color: rgba(26, 22, 20, 0.1); }
.border-ink\/15 { border-color: rgba(26, 22, 20, 0.15); }
.border-ink\/20 { border-color: rgba(26, 22, 20, 0.2); }

.bg-accent { background: var(--accent); }
.text-accent { color: var(--accent); }
.bg-accent\/5 { background: rgba(184, 52, 26, 0.05); }
.bg-accent\/10 { background: rgba(184, 52, 26, 0.1); }
.bg-accent\/15 { background: rgba(184, 52, 26, 0.15); }
.border-accent { border-color: var(--accent); }
.hover\:bg-accent:hover { background: var(--accent); }
.hover\:text-accent:hover { color: var(--accent); }
.hover\:border-accent:hover { border-color: var(--accent); }
.hover\:bg-accent\/5:hover { background: rgba(184, 52, 26, 0.05); }
.hover\:bg-paper:hover { background: var(--paper); }
.hover\:text-ink:hover { color: var(--ink); }

.bg-emerald-50\/40 { background: rgba(236, 253, 245, 0.4); }
.bg-emerald-50\/50 { background: rgba(236, 253, 245, 0.5); }
.bg-emerald-100 { background: #d1fae5; }
.bg-emerald-600 { background: var(--emerald-600); }
.text-emerald-600 { color: var(--emerald-600); }
.text-emerald-700 { color: var(--emerald-700); }
.text-emerald-900 { color: #064e3b; }
.border-emerald-200 { border-color: var(--emerald-200); }
.border-emerald-600 { border-color: var(--emerald-600); }

.bg-amber-50 { background: var(--amber-50); }
.bg-amber-50\/40 { background: rgba(255, 251, 235, 0.4); }
.border-amber-200 { border-color: var(--amber-200); }
.border-amber-300 { border-color: var(--amber-300); }
.text-amber-700 { color: var(--amber-700); }
.text-amber-900 { color: var(--amber-900); }
.bg-amber-700 { background: var(--amber-700); }

.bg-red-50 { background: var(--red-50); }
.border-red-200 { border-color: var(--red-200); }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: var(--red-800); }

/* ===== Layout ===== */
.min-h-screen { min-height: 100vh; }
.min-h-\[80vh\] { min-height: 80vh; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-x-12 { column-gap: 3rem; }
.gap-y-8 { row-gap: 2rem; }

.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .md\:col-span-1 { grid-column: span 1 / span 1; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:col-span-3 { grid-column: span 3 / span 3; }
    .md\:col-span-5 { grid-column: span 5 / span 5; }
    .md\:col-span-7 { grid-column: span 7 / span 7; }
    .md\:col-span-9 { grid-column: span 9 / span 9; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
    .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
    .md\:text-8xl { font-size: 6rem; line-height: 1; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:w-auto { width: auto; }
}

/* ===== Spacing ===== */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pl-6 { padding-left: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-24 { margin-top: 6rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-9 { margin-left: 2.25rem; }
.mr-2 { margin-right: 0.5rem; }
.m-0 { margin: 0; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }
.space-y-12 > * + * { margin-top: 3rem; }

/* ===== Sizes ===== */
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-sm { max-width: 24rem; }
.min-w-\[5rem\] { min-width: 5rem; }

/* ===== Typography ===== */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[11px\] { font-size: 11px; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-\[0\.95\] { line-height: 0.95; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.underline { text-decoration: underline; }
.underline-offset-4 { text-underline-offset: 4px; }

/* ===== Borders ===== */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ===== Effects ===== */
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition { transition: all 0.15s ease; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.antialiased { -webkit-font-smoothing: antialiased; }

/* ===== Position ===== */
.relative { position: relative; }
.sticky { position: sticky; top: 0; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }

.overflow-hidden { overflow: hidden; }
.hidden { display: none; }

/* ===== Forms ===== */
input[type="checkbox"]:checked, input[type="radio"]:checked { accent-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* ===== Group ===== */
.group:hover .group-hover\:text-accent { color: var(--accent); }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }
.has-\[\:checked\]\:bg-accent\/10:has(:checked) { background: rgba(184, 52, 26, 0.1); }
.has-\[\:checked\]\:border-accent:has(:checked) { border-color: var(--accent); }

/* ===========================================================================
   PROSE EDITORIAL - markdown renderizado
   =========================================================================== */
.prose-editorial { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.75; color: var(--ink); max-width: 70ch; }
.prose-editorial > * + * { margin-top: 1.25rem; }
.prose-editorial h1 { font-family: 'Fraunces', serif; font-size: 2.25rem; font-weight: 700; line-height: 1.15; margin-top: 2.5rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.prose-editorial h2 { font-family: 'Fraunces', serif; font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-top: 2.5rem; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(26, 22, 20, 0.12); }
.prose-editorial h3 { font-family: 'Fraunces', serif; font-size: 1.375rem; font-weight: 600; line-height: 1.3; margin-top: 2rem; margin-bottom: 0.5rem; }
.prose-editorial h4 { font-family: 'Fraunces', serif; font-size: 1.125rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose-editorial p { margin: 0; }
.prose-editorial p + p { margin-top: 1rem; }
.prose-editorial strong { font-weight: 700; color: var(--ink); }
.prose-editorial em { font-style: italic; }
.prose-editorial a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose-editorial a:hover { text-decoration-thickness: 2px; }
.prose-editorial blockquote { border-left: 4px solid var(--accent); padding: 0.5rem 0 0.5rem 1.5rem; font-family: 'Fraunces', serif; font-size: 1.25rem; font-style: italic; color: var(--ink-soft); margin: 1.5rem 0; }
.prose-editorial blockquote p { margin: 0; }
.prose-editorial code { font-family: 'Inconsolata', monospace; background: rgba(26, 22, 20, 0.06); padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.95em; }
.prose-editorial pre { background: var(--ink); color: var(--paper); padding: 1.25rem; border-radius: 0.5rem; overflow-x: auto; font-family: 'Inconsolata', monospace; font-size: 0.875rem; line-height: 1.6; margin: 1.5rem 0; }
.prose-editorial pre code { background: transparent; padding: 0; color: inherit; }
.prose-editorial ul, .prose-editorial ol { padding-left: 1.5rem; }
.prose-editorial ul li, .prose-editorial ol li { margin: 0.375rem 0; padding-left: 0.25rem; }
.prose-editorial ul li::marker { color: var(--accent); }
.prose-editorial ol li::marker { font-family: 'Fraunces', serif; font-weight: 700; color: var(--accent); }
.prose-editorial table { border-collapse: collapse; margin: 1.5rem 0; width: 100%; font-size: 0.95rem; }
.prose-editorial th, .prose-editorial td { border: 1px solid rgba(26, 22, 20, 0.15); padding: 0.625rem 0.875rem; text-align: left; vertical-align: top; }
.prose-editorial th { background: rgba(26, 22, 20, 0.05); font-family: 'Fraunces', serif; font-weight: 600; }
.prose-editorial hr { border: 0; border-top: 1px solid rgba(26, 22, 20, 0.15); margin: 2.5rem 0; }
.prose-editorial img { border-radius: 0.5rem; margin: 1.5rem 0; }

@media (min-width: 768px) {
    .prose-editorial { font-size: 1.125rem; }
    .prose-editorial h1 { font-size: 2.75rem; }
    .prose-editorial h2 { font-size: 2rem; }
}
