
:root[data-theme="noche"] {
  --bg: #0D1015;
  --bg-art: radial-gradient(120% 70% at 22% -10%, #1D2230 0%, #0D1015 62%);
  --panel: #151A22;
  --panel-2: #11151C;
  --ink: #F2EDE5;
  --ink-soft: #E9E4DC;
  --muted: #8D97A8;
  --faint: #5F6A7C;
  --accent: #E8A33D;
  --accent-ink: #0D1015;
  --rose: #D96C8A;
  --line: rgba(233,228,220,0.10);
  --line-strong: rgba(233,228,220,0.22);
  --border-w: 1px;
  --radius: 3px;
  --nav-bg: transparent;
  --nav-ink: #7E8899;
  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --body: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.015em;
}

:root[data-theme="papel"] {
  --bg: #FFFCF3;
  --bg-art: none;
  --panel: #FFFFFF;
  --panel-2: #FFF8E8;
  --ink: #16110F;
  --ink-soft: #16110F;
  --muted: #58504C;
  --faint: #6B615C;
  --accent: #E5006D;
  --accent-ink: #FFFCF3;
  --rose: #F5A623;
  --line: #16110F;
  --line-strong: #16110F;
  --border-w: 2px;
  --radius: 0px;
  --nav-bg: #16110F;
  --nav-ink: rgba(255,252,243,0.72);
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Work Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.035em;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  background-image: var(--bg-art);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { max-width: 940px; margin: 0 auto; padding: 0 28px 80px 28px; }
.narrow { max-width: 640px; }

/* ---------- header ---------- */

.site {
  background: var(--nav-bg);
  border-bottom: var(--border-w) solid transparent;
}
:root[data-theme="noche"] .site { border-bottom-color: var(--line); }

.site-in {
  max-width: 940px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand {
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 20px;
  color: var(--ink);
}
:root[data-theme="papel"] .brand { color: #FFFCF3; text-transform: uppercase; }
:root[data-theme="papel"] .brand .dot { color: var(--rose); }
.brand:hover { text-decoration: none; }

nav.links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
nav.links a, nav.links button.linkish {
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--nav-ink);
  background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--body);
}
:root[data-theme="noche"] nav.links a { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11.5px; }
nav.links a:hover, nav.links button.linkish:hover { color: var(--ink); text-decoration: none; }
:root[data-theme="papel"] nav.links a:hover { color: #FFFCF3; }

nav.links a.cta {
  color: var(--accent-ink); background: var(--accent);
  padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
:root[data-theme="noche"] nav.links a.cta { color: var(--accent-ink); }
nav.links a.lang {
  border: 1px solid currentColor; border-radius: 999px; padding: 5px 12px;
  font-size: 11px; letter-spacing: 0.08em;
}

/* papel picado, only on the bright theme */
.picado { display: none; }
:root[data-theme="papel"] .picado { display: block; max-width: 940px; margin: 0 auto; padding: 10px 28px 0 28px; }
.picado svg { display: block; width: 100%; height: 54px; }

/* ---------- type ---------- */

.eyebrow {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.label {
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
}

h1.big {
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.02;
  margin: 18px 0 0 0;
  color: var(--ink);
  text-wrap: pretty;
}
h1.big em { font-style: italic; color: var(--accent); }
:root[data-theme="papel"] h1.big em { font-style: normal; }

.lede { color: var(--muted); font-size: 15.5px; line-height: 1.75; margin: 22px 0 0 0; max-width: 46ch; }

.rule { display: flex; align-items: center; gap: 16px; margin: 0 0 4px 0; }
.rule .line { flex-grow: 1; height: var(--border-w); background: var(--line); }

/* ---------- feed ---------- */

.hero { padding: 92px 0 0 0; }
.archive-head { margin-top: 96px; }
.archive { display: flex; flex-direction: column; margin-top: 10px; }
:root[data-theme="papel"] .archive {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 26px;
}

.entry {
  display: flex; align-items: baseline; gap: 26px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  color: inherit;
}
.entry:hover { text-decoration: none; }
.entry:hover .entry-title { color: var(--accent); }
:root[data-theme="papel"] .entry {
  display: block; border: var(--border-w) solid var(--line); padding: 24px; background: var(--panel);
}
:root[data-theme="papel"] .entry:nth-child(2n) { background: var(--panel-2); }

.entry-date { width: 62px; flex-shrink: 0; font-size: 11.5px; letter-spacing: 0.08em; color: var(--faint); }
:root[data-theme="papel"] .entry-date { width: auto; font-weight: 500; margin-bottom: 12px; display: block; }
.entry-body { flex-grow: 1; }
.entry-title {
  font-family: var(--display); font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 27px; line-height: 1.2; color: var(--ink);
}
:root[data-theme="papel"] .entry-title { font-size: 22px; font-weight: 600; line-height: 1.18; }
.entry-ex { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 8px 0 0 0; }
.entry-arrow { flex-shrink: 0; color: var(--faint); display: flex; }
:root[data-theme="papel"] .entry-arrow { display: none; }

.empty { color: var(--faint); padding: 32px 0; }

/* ---------- single entry ---------- */

.post { padding: 56px 0 0 0; }
.post h1 {
  font-family: var(--display); font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(32px, 5vw, 48px); line-height: 1.08; margin: 16px 0 0 0; text-wrap: pretty;
}
.post .meta { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: 12.5px; margin-top: 20px; }
.post .content { margin-top: 34px; }
.post .content p { font-size: 16.5px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 20px 0; }
:root[data-theme="noche"] .post .content p:first-child { font-family: var(--display); font-size: 22px; line-height: 1.55; }

.backlink { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.backlink:hover { color: var(--accent); text-decoration: none; }

.notice {
  border-left: 2px solid var(--accent); background: var(--panel);
  padding: 12px 16px; color: var(--muted); font-size: 13.5px; margin: 24px 0;
}

/* ---------- comments ---------- */

.comments { margin-top: 64px; padding-top: 24px; border-top: var(--border-w) solid var(--line); }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment .who { font-size: 12px; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; }
.comment .when { font-size: 11.5px; color: var(--faint); margin-left: 8px; }
.comment p { margin: 8px 0 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }

.dedication {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 27px); line-height: 1.5;
  color: var(--accent); margin: 32px 0 0 0; max-width: 30ch;
}
:root[data-theme="noche"] .dedication { font-style: italic; }
:root[data-theme="papel"] .dedication { font-weight: 600; letter-spacing: -0.02em; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; min-height: 48px; padding: 12px 16px;
  background: var(--panel); color: var(--ink);
  border: var(--border-w) solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--body); font-size: 15px; line-height: 1.6;
}
textarea { min-height: 150px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }

.btn {
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { filter: brightness(1.08); }
.btn.round { width: 48px; min-width: 48px; padding: 0; border-radius: 999px; }
:root[data-theme="papel"] .btn.round { border-radius: 0; }
.btn.block { width: 100%; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--panel); border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius); padding: 26px;
}

.error { color: var(--rose); font-size: 13.5px; }
.ok { color: var(--accent); font-size: 13.5px; }

.choice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; cursor: pointer; }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.choice .t { font-weight: 600; }
.choice .d { color: var(--muted); font-size: 13.5px; }

/* ---------- info dots ---------- */

.infowrap { position: relative; display: inline-flex; vertical-align: middle; margin-left: 7px; }
.info {
  width: 16px; height: 16px; padding: 0; border-radius: 999px;
  border: 1px solid var(--faint); background: none; color: var(--faint);
  font-family: var(--body); font-size: 10px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: help;
  letter-spacing: 0; text-transform: none;
}
.info:hover, .info:focus-visible { color: var(--accent); border-color: var(--accent); }
.tip {
  position: absolute; left: -8px; top: 24px; width: 250px; z-index: 20;
  background: var(--panel); border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius); padding: 11px 13px;
  color: var(--muted); font-size: 12.5px; line-height: 1.55;
  font-weight: 400; letter-spacing: 0; text-transform: none;
  opacity: 0; visibility: hidden; transition: opacity 0.12s ease;
}
.infowrap:hover .tip, .infowrap:focus-within .tip { opacity: 1; visibility: visible; }
@media (max-width: 720px) { .tip { width: 200px; left: auto; right: -8px; } }

/* ---------- swatches ---------- */

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.swatch { position: relative; display: inline-flex; }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch span {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: var(--border-w) solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px 7px 8px; font-size: 13px; color: var(--muted);
}
:root[data-theme="papel"] .swatch span { border-radius: 0; }
.swatch .dot { width: 15px; height: 15px; border-radius: 999px; display: block; }
.swatch input:checked + span { border-color: var(--accent); color: var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- requests ---------- */

.req { padding: 16px 0; border-bottom: 1px solid var(--line); }
.req:last-of-type { border-bottom: 0; }
.req .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.req .kind {
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.req .when { font-size: 11.5px; color: var(--faint); }
.req .state {
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px; color: var(--faint);
}
:root[data-theme="papel"] .req .state { border-radius: 0; }
.req .state.done { color: var(--accent); border-color: var(--accent); }
.req p { margin: 8px 0 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
select {
  width: 100%; min-height: 48px; padding: 12px 16px;
  background: var(--panel); color: var(--ink);
  border: var(--border-w) solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--body); font-size: 15px;
}

/* ---------- footer ---------- */

footer.site {
  border-top: var(--border-w) solid var(--line); background: transparent;
  margin-top: 72px; padding-top: 22px;
  display: flex; justify-content: space-between; color: var(--faint); font-size: 12px;
}

/* ---------- landing ---------- */

.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px 28px;
}
.landing .line {
  font-family: var(--display); font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(30px, 5.2vw, 54px); line-height: 1.14;
  max-width: 18ch; margin: 26px 0 0 0; text-wrap: pretty;
}
.landing .line .name { color: var(--accent); }
.landing .marks { margin-top: 44px; }

@media (max-width: 720px) {
  .shell { padding: 0 20px 64px 20px; }
  .site-in { padding: 14px 20px; gap: 12px; flex-wrap: wrap; }
  .hero { padding-top: 56px; }
  .archive-head { margin-top: 64px; }
  :root[data-theme="papel"] .archive { grid-template-columns: minmax(0, 1fr); }
  .entry { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
