/* BE Ultimate Studio look, palette "1C Burgundy" (approved by Isa 2026-11-22; tokens from Dani's tokens.css).
   Served after the starter's site.css. Three themes the person picks (Appearance page, saved on the account):
   light = Claro, dark = Tenue (dim), black = Oscuro; with Automático (data-auto) the device decides light or dark.
   The server writes data-theme (and data-auto) on <html> before the first paint (Product/Appearance.cs), so there is no
   flash of the wrong theme and no script is needed. Pages without data-theme (the landing page) keep brand.json's look.
   Flat cards: no tape, no paperclips, no shadows, no tilt. Layout is unchanged. */
@font-face{font-family:"Bricolage Grotesque";src:url("bricolage-vf.ttf") format("truetype");font-weight:200 800;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("jetbrains-mono-vf.ttf") format("truetype");font-weight:100 800;font-display:swap}

/* ---- tokens ---- */
html[data-theme]{
  /* the title face in one place: swapping it is this one line */
  --font-display:"Bricolage Grotesque",system-ui,sans-serif;
  --font-ui:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-data:"JetBrains Mono",ui-monospace,Consolas,monospace;
  --radius-card:14px;--radius-pill:999px;--card-border:2px solid var(--line);
}
html[data-theme="light"]{
  color-scheme:light;
  --bg:#F1EEEC;--sidebar:#251A1E;--sidebar-text:#EFE8EA;--sidebar-sub:#A99AA0;
  --card:#FBFAF9;--input:#FFFFFF;--chip:#E7E2DF;
  --ink:#251A1E;--muted:#6B6166;--line:#DDD7D4;   /* muted: tokens' #7E7479 darkened to pass WCAG AA on bg, card and chip */
  --brand:#6E1F2E;--brand-ink:#FFFFFF;--brand-text:#6E1F2E;
  --st-final:#2E9E6B;--st-draft:#C98A1B;--st-posted:#6B6770;
  --logo-claro:inline-block;--logo-oscuro:none;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#17111A;--sidebar:#0F0A12;--sidebar-text:#F2EEF0;--sidebar-sub:#8F8394;
  --card:#211A26;--input:#17111A;--chip:#2D2433;
  --ink:#F2EEF0;--muted:#A89BA1;--line:#34292E;
  --brand:#C23B5C;--brand-ink:#FFFFFF;--brand-text:#E27A92;   /* brand-text: the accent as text, AA on dark cards */
  --st-final:#3DBA85;--st-draft:#E0A93A;--st-posted:#9A93A0;
  --logo-claro:none;--logo-oscuro:inline-block;
}
html[data-theme="black"]{
  color-scheme:dark;
  --bg:#0A070C;--sidebar:#000000;--sidebar-text:#F2EEF0;--sidebar-sub:#8F8394;
  --card:#130E16;--input:#0A070C;--chip:#1C1520;
  --ink:#F2EEF0;--muted:#A89BA1;--line:#261C2B;
  --brand:#C23B5C;--brand-ink:#FFFFFF;--brand-text:#E27A92;
  --st-final:#3DBA85;--st-draft:#E0A93A;--st-posted:#9A93A0;
  --logo-claro:none;--logo-oscuro:inline-block;
}
/* Automático: a light device gets Claro; a dark device gets the dark theme picked (Tenue when the pick is Claro). */
@media (prefers-color-scheme:dark){
  html[data-auto][data-theme="light"]{
    color-scheme:dark;
    --bg:#17111A;--sidebar:#0F0A12;--sidebar-text:#F2EEF0;--sidebar-sub:#8F8394;
    --card:#211A26;--input:#17111A;--chip:#2D2433;
    --ink:#F2EEF0;--muted:#A89BA1;--line:#34292E;
    --brand:#C23B5C;--brand-ink:#FFFFFF;--brand-text:#E27A92;
    --st-final:#3DBA85;--st-draft:#E0A93A;--st-posted:#9A93A0;
    --logo-claro:none;--logo-oscuro:inline-block;
  }
}
@media (prefers-color-scheme:light){
  html[data-auto][data-theme="dark"],html[data-auto][data-theme="black"]{
    color-scheme:light;
    --bg:#F1EEEC;--sidebar:#251A1E;--sidebar-text:#EFE8EA;--sidebar-sub:#A99AA0;
    --card:#FBFAF9;--input:#FFFFFF;--chip:#E7E2DF;
    --ink:#251A1E;--muted:#6B6166;--line:#DDD7D4;
    --brand:#6E1F2E;--brand-ink:#FFFFFF;--brand-text:#6E1F2E;
    --st-final:#2E9E6B;--st-draft:#C98A1B;--st-posted:#6B6770;
    --logo-claro:inline-block;--logo-oscuro:none;
  }
}
/* The starter's and the app's colour names, pointed at the tokens. --cream stays "a light surface or text on the
   accent" in old rules, so text on the accent uses --brand-ink instead (below and in the app's own CSS). */
html[data-theme]{
  --desk:var(--bg);--paper:var(--card);--cream:var(--input);--rose:var(--brand);--pink:var(--chip);--sand:var(--chip);
  --display:var(--font-display);--body:var(--font-ui);--mono:var(--font-data);--script:var(--font-ui);
}

/* ---- every page ---- */
html[data-theme]{background:var(--bg)}
html[data-theme] body{color:var(--ink);background:var(--bg);background-image:none}
html[data-theme] body::before{display:none}
:where(html[data-theme]) h1,:where(html[data-theme]) h2,:where(html[data-theme]) h3{font-family:var(--font-display);font-weight:800;text-transform:none;letter-spacing:-.02em;line-height:1.05}
:where(html[data-theme]) a{text-decoration-color:var(--brand)}
html[data-theme] .scribble{font:400 1.35rem/1.3 var(--font-ui);color:var(--muted);transform:none;rotate:none;clip-path:none;animation:none}
html[data-theme] :focus-visible{outline:3px solid var(--brand);outline-offset:2px}
/* header: the horizontal logo for the theme (the name stays for screen readers) */
html[data-theme] .top{background:var(--bg);border-bottom:1px solid var(--line)}
html[data-theme] .brand{color:var(--ink);font:800 1.2rem/1 var(--font-display);text-transform:none}
html[data-theme] .brand .logo{height:30px;width:auto}
.brand .logo.lc{display:var(--logo-claro,none)}.brand .logo.lo{display:var(--logo-oscuro,inline-block)}
.brand:has(.logo.lc) span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html[data-theme] .langs{border-color:var(--line)}
html[data-theme] .langs a{color:var(--ink)}html[data-theme] .langs span{background:var(--ink);color:var(--bg)}
html[data-theme] .langs a:hover{background:var(--chip)}
html[data-theme] .signin,html[data-theme] .avatar,html[data-theme] .yes,html[data-theme] .pill{background:var(--brand);color:var(--brand-ink);box-shadow:none}
html[data-theme] .signin:hover,html[data-theme] .pill:hover{background:color-mix(in srgb,var(--brand) 84%,var(--ink))}
html[data-theme] .menu summary{border-color:var(--line);color:var(--ink)}
html[data-theme] .menu-items,html[data-theme] .wsw-items{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:none}
html[data-theme] .menu-items a,html[data-theme] .menu-items button{color:var(--ink)}
html[data-theme] .menu-items a:hover,html[data-theme] .menu-items button:hover{background:var(--chip)}
html[data-theme] .menu-email{border-bottom:1px solid var(--line);color:var(--muted)}
/* ordinary pages: one flat card */
html[data-theme] .sheet{background:var(--card);color:var(--ink);border:var(--card-border);border-radius:var(--radius-card);box-shadow:none;animation:none}
html[data-theme] .sheet::before,html[data-theme] .leaf.clip::before{display:none}
html[data-theme] main.narrow .sheet{transform:none}
html[data-theme] .sheet h1{color:var(--ink);font-size:clamp(2.3rem,5.5vw,3.4rem)}
html[data-theme] .sep{border-top:1px solid var(--line)}
html[data-theme] .muted{color:var(--muted)}
/* forms */
:where(html[data-theme]) label{color:var(--muted)}
:where(html[data-theme]) input,:where(html[data-theme]) select,:where(html[data-theme]) textarea{border:2px solid var(--line);border-radius:10px;font-family:var(--font-ui);background:var(--input);color:var(--ink)}
:where(html[data-theme]) input:focus,:where(html[data-theme]) select:focus,:where(html[data-theme]) textarea:focus{outline:3px solid color-mix(in srgb,var(--brand) 45%,transparent);outline-offset:0;border-color:var(--brand)}
/* Phones zoom the page into any field under 16px when it is tapped (iPhone Safari), so no field is smaller there. */
@media (pointer:coarse){input,select,textarea{font-size:max(16px,1em)!important}}
:where(html[data-theme]) button{background:var(--brand);color:var(--brand-ink);box-shadow:none;font-family:var(--font-ui)}
:where(html[data-theme]) button:hover{background:color-mix(in srgb,var(--brand) 84%,var(--ink));transform:none}
:where(html[data-theme]) button.link{background:none;color:var(--ink)}
:where(html[data-theme]) button.ghost{background:transparent;color:var(--ink);border:2px solid var(--line)}
:where(html[data-theme]) button.ghost:hover{background:var(--chip);color:var(--ink)}
:where(html[data-theme]) button.danger{background:#B3261E;color:#fff}
html[data-theme] .notice{background:var(--chip);color:var(--ink);transform:none;box-shadow:none;border-radius:10px;border-left:4px solid var(--st-final)}
html[data-theme] .notice.error{background:color-mix(in srgb,var(--brand) 16%,var(--card));border-left-color:var(--brand)}
/* tables, cards, tabs, numbers */
:where(html[data-theme]) td,:where(html[data-theme]) th{border-bottom:1px solid var(--line)}
:where(html[data-theme]) th{color:var(--muted)}
html[data-theme] .card{background:var(--card);color:var(--ink);border:var(--card-border);border-radius:var(--radius-card)}
html[data-theme] .tabs{border-bottom:1px solid var(--line)}html[data-theme] .tabs a{color:var(--ink)}html[data-theme] .tabs a.on{border-color:var(--brand)}
html[data-theme] .kpi{background:var(--chip);border:0;border-radius:10px}
html[data-theme] .kpi b{font-weight:800}
/* footer */
html[data-theme] .foot{border-top:1px solid var(--line);color:var(--ink)}
html[data-theme] .foot-brand p{font:400 1rem var(--font-ui);color:var(--muted)}

/* ---- the app shell: dark sidebar, flat cards ---- */
html[data-theme] .side{background:var(--sidebar);border-right:0;color:var(--sidebar-text)}
html[data-theme] .side .wn{color:var(--sidebar-text);font:800 1.9rem/1 var(--font-display);text-transform:none;letter-spacing:-.02em}
html[data-theme] .side .wr{color:var(--sidebar-sub);opacity:1;font:400 .8rem var(--font-ui)}
html[data-theme] .side a{color:var(--sidebar-text)}
html[data-theme] .side .nl{font:700 1.3rem/1.05 var(--font-display);text-transform:none;letter-spacing:-.01em}
html[data-theme] .side small{color:var(--sidebar-sub);opacity:1;font:400 .72rem/1.25 var(--font-ui)}
html[data-theme] .side a:hover{background:#ffffff12}
html[data-theme] .side a.on{background:var(--brand);color:var(--brand-ink);transform:none;box-shadow:none}
html[data-theme] .side a.on small{color:var(--brand-ink);opacity:.85}
html[data-theme] .side .gap{background:#ffffff1a}
html[data-theme] .wsw .wsw-items a,html[data-theme] .wsw .wsw-items span{color:var(--ink);font:700 1.1rem/1.1 var(--font-display);text-transform:none}
html[data-theme] .wsw .wsw-items a:hover,html[data-theme] .wsw .wsw-items span{background:var(--chip)}
html[data-theme] .ws-m{color:var(--ink)}html[data-theme] .ws-m .wn{font:800 1.3rem/1 var(--font-display);text-transform:none}
html[data-theme] .vh h1{color:var(--ink);font-size:clamp(2.6rem,5.6vw,4.4rem);letter-spacing:-.035em}
html[data-theme] .vh .scribble{margin:8px 0 0}
html[data-theme] .leaf{background:var(--card);color:var(--ink);border:var(--card-border);border-radius:var(--radius-card);box-shadow:none}
html[data-theme] .leaf::after{display:none}
html[data-theme] .leaf.pink,html[data-theme] .leaf.sand{background:var(--card)}
html[data-theme] .grid>.leaf:nth-child(n),html[data-theme] .grid>.stack>.leaf{rotate:none}
html[data-theme] .leaf h2{font-size:1.8rem;color:var(--ink)}
html[data-theme] .leaf .s{font:400 .9rem/1.4 var(--font-ui);color:var(--muted)}
html[data-theme] .soon{font:600 1rem/1 var(--font-ui);color:var(--brand-text);border:2px dashed var(--brand-text);border-radius:999px;padding:7px 14px;rotate:none}
html[data-theme] .jump{background:var(--chip);border:0;border-radius:12px;color:var(--ink)}
html[data-theme] .jump:hover{transform:none;box-shadow:none;background:color-mix(in srgb,var(--chip) 80%,var(--ink))}
html[data-theme] .jump svg{stroke:var(--brand-text)}
html[data-theme] .jump b{font:800 1.3rem/1 var(--font-display);text-transform:none}
html[data-theme] .jump small{color:var(--muted)}
/* "see more" links and summaries in the accent, as in the mocks */
html[data-theme] .leaf details.more>summary,html[data-theme] .more-link{color:var(--brand-text);font-family:var(--font-ui);font-weight:600}
/* status chips: the palette's status roles, never the brand accent */
.st{display:inline-block;font:600 .7rem/1 var(--font-data);text-transform:uppercase;letter-spacing:.05em;border:2px solid currentColor;border-radius:999px;padding:5px 12px}
.st.final{color:var(--st-final)}.st.draft{color:var(--st-draft)}.st.posted{color:var(--st-posted)}

/* ---- the sidebar's foot: Apariencia + "Cambiar tema" (Product/Appearance.cs) ---- */
.side .side-foot{margin-top:auto;padding-top:18px;display:grid;gap:8px}
html[data-theme] .side .side-foot a.appear{display:block;padding:10px 16px;border-radius:12px;background:#ffffff12;color:var(--sidebar-text)}
.side .side-foot a.appear b{display:block;font:600 .95rem/1.2 var(--font-ui)}
html[data-theme] .side .side-foot a.appear small{display:block;margin-top:2px}
.side .side-foot form{margin:0}
html[data-theme] .side .side-foot button{display:block;width:100%;margin:0;text-align:left;padding:12px 16px;border-radius:12px;font:600 .95rem/1.2 var(--font-ui)}
.menu-items a.appear-m{display:block}

/* ---- the Appearance page ---- */
.themes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin:0}
html[data-theme] .themes button.tt{display:block;width:100%;margin:0;padding:18px;text-align:left;border-radius:var(--radius-card);background:var(--chip);color:var(--ink);border:2px solid var(--line);position:relative;font:inherit;cursor:pointer}
html[data-theme] .themes button.tt:hover{background:color-mix(in srgb,var(--chip) 85%,var(--ink))}
html[data-theme] .themes button.tt[aria-pressed="true"]{background:var(--card);border:3px solid var(--brand);padding:17px}
.tt b{display:block;margin-top:16px;font:800 1.7rem/1.05 var(--font-display);letter-spacing:-.02em}
.tt small{display:block;margin-top:6px;font:400 .88rem/1.35 var(--font-ui);color:var(--muted)}
.tt .ok{position:absolute;right:20px;bottom:56px;width:32px;height:32px;border-radius:50%;background:var(--brand);color:var(--brand-ink);display:flex;align-items:center;justify-content:center}
.tt .ok svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
/* the previews: each theme drawn in its own colours, whatever the page's theme */
.tp{display:grid;grid-template-columns:22% 1fr;aspect-ratio:3/2;border-radius:6px;overflow:hidden}
.tp i{display:block;padding:8px}.tp i::before{content:"";display:block;height:9px;width:70%;border-radius:4px;background:var(--p-on)}
.tp u{display:grid;gap:8px;padding:10px 8% 10px 9%;text-decoration:none;align-content:start}
.tp u span{display:flex;justify-content:space-between;gap:6px;min-height:44%;padding:9px 10px;border-radius:5px;background:var(--p-card);border:1px solid var(--p-line);color:var(--p-ink);font:700 .85rem/1.1 var(--font-ui)}
.tp u span:first-child::after{content:"";width:40%;max-width:66px;height:11px;border-radius:9px;background:var(--p-on)}
.tp-light{--p-side:#251A1E;--p-bg:#F1EEEC;--p-card:#FFFFFF;--p-line:#DDD7D4;--p-ink:#251A1E;--p-on:#6E1F2E}
.tp-dark{--p-side:#0F0A12;--p-bg:#17111A;--p-card:#211A26;--p-line:#34292E;--p-ink:#F2EEF0;--p-on:#C23B5C}
.tp-black{--p-side:#000000;--p-bg:#0A070C;--p-card:#130E16;--p-line:#261C2B;--p-ink:#F2EEF0;--p-on:#C23B5C}
.tp i{background:var(--p-side)}.tp u{background:var(--p-bg)}
.autorow{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.autorow form{margin:0;flex:none}
html[data-theme] button.switch{margin:0;padding:0;width:82px;height:42px;border-radius:999px;position:relative;background:var(--chip);border:2px solid var(--line)}
html[data-theme] button.switch[aria-checked="true"]{background:var(--brand);border-color:var(--brand)}
button.switch::after{content:"";position:absolute;top:4px;left:4px;width:30px;height:30px;border-radius:50%;background:#fff;transition:left .15s}
button.switch[aria-checked="true"]::after{left:44px}
.ap .note{margin:14px 0 0;font:400 .85rem/1.45 var(--font-ui);color:var(--muted)}

@media (max-width:899px){
  html[data-theme] .side{background:var(--sidebar);border-top:0}
  .side .side-foot{display:none}   /* phones: the tab bar stays as it is; Appearance is in the account menu */
  .themes{grid-template-columns:minmax(0,1fr);gap:14px}
  .tp{aspect-ratio:auto;height:120px}
  .tt .ok{bottom:22px;right:20px}
  html[data-theme] .side .nl{font:600 .66rem/1 var(--font-ui);letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  html[data-theme] .side small{display:none}
}
@media (max-width:560px){html[data-theme] .scroll tr{border-bottom:1px solid var(--line)}}

/* the sign-up questionnaire (#45): socials as handle + audience side by side, checkboxes at their own size */
.intake fieldset{border:0;margin:16px 0 0;padding:0}.intake legend{font-weight:600;margin-bottom:2px}
.intake .acct{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 8px;margin-top:8px}.intake .acct label{grid-column:1/-1;margin:0}
.check{display:flex;gap:8px;align-items:flex-start;margin:10px 0;font:inherit;font-size:.95rem;text-transform:none;letter-spacing:normal;color:var(--ink)}.check input{width:auto;margin:3px 0 0;flex:none}
.intake-detail{margin:2px 0 10px;font-size:.88rem;line-height:1.5}
