/* =====================================================================
   tips.css: the Caucus-Race's own rules (R88). Tokens and components
   come from /chassis/roses.css (ORGAN 9); night is the default, as in
   Painting the Roses, with the cream-paper day theme one tap away.
   ===================================================================== */

:root { --hair: rgba(var(--ink-rgb), .16); --hair2: rgba(var(--ink-rgb), .3); }
html { scroll-behavior: smooth; }
body { min-height: 100vh; }
button { font: inherit; border: 1.5px solid var(--accent); background: var(--card); color: var(--ink); border-radius: 12px; padding: 7px 16px; min-height: 42px; cursor: pointer; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; }
button:active { background: var(--panel2); }
button.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); font-weight: 700; }
button.ghost { border-color: var(--line); color: var(--muted); }
button.danger { border-color: var(--deep-red); color: var(--bad); }
button.small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--field); color: var(--ink); min-height: 40px; }
input[type=checkbox] { min-height: 0; width: 20px; height: 20px; accent-color: var(--accent-fill); }
input::placeholder { color: var(--placeholder); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.money { width: 100%; text-align: right; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-variant-numeric: tabular-nums; }
input.pts { width: 56px; text-align: center; font-family: 'Helvetica Neue', Helvetica, sans-serif; }
[hidden] { display: none !important; }
.num { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sans { font-family: 'Helvetica Neue', Helvetica, sans-serif; }

/* ---- header ---- */
header { display: flex; align-items: center; gap: 12px; padding: 12px 22px; background: var(--paper); border-bottom: 2px solid var(--accent-fill); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
header h1 { font-size: 22px; margin: 0; font-weight: 400; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
header h1 .brand { font-family: 'Great Vibes', cursive; color: var(--accent); font-size: 27px; }
header h1 .suits { color: var(--deep-red); font-size: 15px; }
header h1 .title { font-family: 'IM Fell English SC', serif; letter-spacing: .06em; }
header .who { font-family: 'IM Fell English', serif; font-style: italic; color: var(--muted); font-size: 15px; }
header .spacer { flex: 1; }
.langbtn { min-width: 46px; font-weight: 700; letter-spacing: .06em; }
@media (max-width: 700px) { header { padding: 10px 14px; } header h1 .brand { display: none; } }

nav.tabs { display: flex; gap: 8px; padding: 12px 22px 0; max-width: 1180px; margin: 0 auto; flex-wrap: wrap; }
nav.tabs .tab { font-size: 15px; padding: 8px 16px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px 22px 120px; }
@media (max-width: 700px) { main, nav.tabs { padding-left: 14px; padding-right: 14px; } }

/* ---- sections ---- */
.rule { display: flex; align-items: center; gap: 14px; margin: 22px 0 12px; color: var(--accent); font-family: 'IM Fell English SC', serif; font-weight: 400; font-size: 20px; letter-spacing: .1em; }
.rule::before, .rule::after { content: ""; flex: 1; border-top: 1px solid var(--hair2); }
.rule .step { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 12.5px; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; }
.card { margin-bottom: 14px; }
.card h3 { font-family: 'IM Fell English SC', serif; font-weight: 400; color: var(--ink); font-size: 21px; margin: 0 0 4px; letter-spacing: .03em; }
.card .sub { color: var(--muted); font-family: 'IM Fell English', serif; font-style: italic; font-size: 15.5px; margin: 0 0 10px; }
.note { color: var(--muted); font-family: 'IM Fell English', serif; font-style: italic; font-size: 15.5px; }
.empty { text-align: center; color: var(--muted); font-family: 'IM Fell English', serif; font-style: italic; padding: 28px 10px; border: 1px dashed var(--line2); border-radius: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---- the file drop ---- */
.drop { display: block; border: 2px dashed var(--line2); border-radius: 14px; padding: 26px 18px; text-align: center; cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--gold-tint); }
.drop strong { font-family: 'IM Fell English SC', serif; font-weight: 400; font-size: 20px; color: var(--accent); display: block; }
.drop input { display: none; }
.weekline { font-family: 'IM Fell English SC', serif; font-size: 19px; color: var(--ink); }

/* ---- tables ---- */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
th { text-align: left; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
th.num { text-align: right; }
tr.off td { opacity: .45; }
tr.total td { border-top: 2px solid var(--accent-fill); border-bottom: none; font-weight: 700; }
.scroll { overflow-x: auto; }
.staff { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 13px; color: var(--muted); white-space: nowrap; }
.daycell { white-space: nowrap; }

/* ---- the payout table ---- */
.pay td { font-size: 18px; }
.pay td.name { cursor: pointer; }
.pay td.name::after { content: " ›"; color: var(--faint); }
.pay tr.open td.name::after { content: " ⌄"; }
.pay tr.detail td { background: rgba(var(--paper-rgb), .5); font-size: 14px; padding: 4px 12px 10px 22px; }
.detail table td, .detail table th { font-size: 13.5px; padding: 3px 6px; border-bottom-color: rgba(var(--ink-rgb), .08); }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.fact { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 13.5px; border: 1px solid var(--line2); border-radius: 99px; padding: 3px 11px; color: var(--muted); }
.fact b { color: var(--ink); font-weight: 600; }
.flag { border-left: 3px solid var(--warn); background: var(--amberbg); padding: 8px 12px; border-radius: 0 10px 10px 0; margin: 8px 0; font-size: 15.5px; }
.problems { border: 1.5px solid var(--deep-red); border-radius: 14px; padding: 12px 18px; background: rgba(var(--red-rgb), .08); }
.problems h3 { color: var(--bad); }
.problems li { margin: 4px 0; }

.grp { text-align: center; border-bottom: 2px solid var(--line2); color: var(--accent); }
.rolehead { text-align: center; font-size: 11px; letter-spacing: .02em; max-width: 76px; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.ptcell { text-align: center; }
.sep { border-left: 1.5px solid var(--line2); }

/* ---- chips (role lists) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line2); border-radius: 99px; padding: 3px 6px 3px 12px; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; background: var(--card); }
.chip button { min-height: 0; border: 0; padding: 0 6px; background: transparent; color: var(--muted); font-size: 16px; }
.chip button:hover { color: var(--bad); }
.chips input { width: 150px; min-height: 34px; padding: 4px 10px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field > span { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
.linkbox { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 13.5px; word-break: break-all; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dirty td { background: var(--gold-tint); }
.tag { font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 12px; border-radius: 99px; padding: 1px 8px; border: 1px solid var(--line2); color: var(--muted); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.bad { border-color: var(--deep-red); color: var(--bad); }

/* ---- the door (no link) ---- */
.door { max-width: 520px; margin: 60px auto; text-align: center; }
.door .brand-script { font-size: 30px; display: block; }
.door h2 { font-family: 'IM Fell English SC', serif; color: var(--accent); font-size: 34px; font-weight: 400; margin: 4px 0 8px; }
.door blockquote { font-family: 'IM Fell English', serif; font-style: italic; color: var(--muted); margin: 16px 0; }

/* ---- print: the payout tables only ---- */
.printhead { display: none; }
@media print {
  :root { --paper: #fff; --card: #fff; --ink: #000; --muted: #444; --line: #999; --hair: #bbb; --hair2: #888; --accent: #000; }
  header, nav.tabs, .noprint, .toast, #calcSteps { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main { padding: 0; max-width: none; }
  .printhead { display: block; margin-bottom: 8px; }
  .card { border: none; padding: 0; page-break-inside: avoid; margin-bottom: 18px; }
  .pay tr.detail { display: none; }
  .pay td.name::after { content: ""; }
}
