/*
 * Proposal E (D completa): unified brand tokens for public, particular, and studio panel.
 * Self-hosted OFL fonts: Fraunces (display, figures), Atkinson Hyperlegible Next (UI, body),
 * JetBrains Mono (CUIL/IDs), bundled locally in static/app/fonts/.
 */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext-normal.a04d353989ad.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fraunces-latin-normal.069cb90e11a3.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext-italic.53f8865644cd.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-italic.fa7ce081be5e.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-normal.290c109915a4.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-normal.825fabef695f.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-italic.67b512e9a6f2.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-italic.740db8084ae9.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext-normal.bd4781a31b42.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-normal.b636a65da4f0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ink: #1D1B16;
  --ink-2: #47423A;
  --ink-3: #635D53;
  --paper: #F6F3EC;
  --surface: #FFFDF9;
  --line: #DCD5C8;
  --line-2: #EAE4D8;
  --plum: #6B2D5C;        /* brand + primary action: 9.6:1 on paper */
  --plum-700: #511F45;
  --plum-50: #F3E9EF;
  --plum-200: #E2C3D8;    /* selection marks on dark rail */
  --ok: #17694F;
  --ok-50: #E4F1EA;
  --warn: #84500A;
  --warn-50: #F8EDDA;
  --bad: #A72B2B;
  --bad-50: #FBEAEA;

  --font-display: "Fraunces", "Sitka Display", "Sitka Heading", Constantia, Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", Corbel, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --tl-surface: #FFFDF9;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--plum);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

.sr, .sr-h, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Shared Django messages */
.msgs {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.msg {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95em;
  line-height: 1.45;
}
.msg.success {
  background: var(--ok-50);
  border-color: color-mix(in srgb, var(--ok) 32%, transparent);
  color: var(--ok);
}
.msg.warning {
  background: var(--warn-50);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  color: var(--warn);
}
.msg.error {
  background: var(--bad-50);
  border-color: color-mix(in srgb, var(--bad) 32%, transparent);
  color: var(--bad);
}
.msg.info {
  background: var(--plum-50);
  border-color: var(--plum-200);
  color: var(--plum-700);
}
.msg[hidden] {
  display: none;
}
.msgs-panel {
  padding: 16px 20px 0;
  margin-bottom: 0;
}
.btn-block {
  width: 100%;
}

/* Shared login modal layout across public.css and panel.css (/estudios/) */
.login-dlg-inner { padding: 0; }
.login-dlg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.login-dlg-head h2 { font: 600 20px var(--font-display); margin: 0; }
.login-dlg-body { padding: 16px 20px 20px; display: grid; gap: 12px; }
.login-dlg-body .field { display: grid; gap: 4px; margin-bottom: 10px; }
.login-kicker { font-size: 12px; font-weight: 700; color: var(--plum); text-transform: uppercase; letter-spacing: 0.04em; }
.login-close {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.login-close:hover { background: var(--plum-50); color: var(--plum); }
.login-dlg-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  font-size: 14px;
}

/* Shared workspace helpers: obs popover, color swatches, inline form */
.obs-wrap { position: relative; display: inline-block; }
.obs-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: min(320px, 80vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(29, 27, 22, 0.18);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  white-space: normal;
}
.obs-popover[hidden] { display: none; }
.obs-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.obs-pop-head button { border: 0; background: transparent; font-size: 16px; cursor: pointer; color: var(--ink-3); }
.obs-popover ul { margin: 0; padding-left: 16px; }
.obs-popover li { margin: 3px 0; }

.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid var(--line);
  cursor: pointer;
  padding: 0;
}
.swatch-btn.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--plum); }
.form-inline-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-inline-row select { width: auto; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.radio-row input[type="radio"] { width: auto; min-height: 0; }
.chk-group { display: flex; gap: 10px 16px; flex-wrap: wrap; margin: 10px 0; }
.chk-group label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; font-size: 13.5px; }
.chk-group input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; }
.tramo-row.off td { opacity: 0.58; }

@media print {
  .no-print { display: none !important; }
}
