/* Prism: Reconnecting Rainbows Press back office.
   Clean, rounded, and clearly divided. Colours are the RRP palette from the brand kit. */

@font-face { font-family: "Aoki"; src: url("../brand/fonts/Aoki-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aoki"; src: url("../brand/fonts/Aoki-Light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../brand/fonts/Montserrat-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../brand/fonts/Montserrat-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../brand/fonts/Montserrat-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../brand/fonts/Montserrat-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --red: #f44b48; --orange: #fe8b5e; --yellow: #fcb61e; --pear: #bdd649; --pine: #397b71; --blue: #2d3774; --purple: #7154c8;
  --rainbow: linear-gradient(90deg, #f44b48, #fe8b5e, #fcb61e, #bdd649, #397b71, #2d3774, #7154c8);
  /* the muted brand gradient (from rrp-gradient-background.png): dark enough for white text */
  --dusk: linear-gradient(120deg, #b05a55 0%, #b89040 30%, #8f9a4f 52%, #3f5a55 78%, #3c4460 100%);
  --ink: #1d2233; --muted: #6b7190; --line: #e6e8f2; --paper: #f5f6fb; --card: #ffffff;
  --good: #2c8a63; --bad: #d9413e;
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(45, 55, 116, .05), 0 10px 30px rgba(45, 55, 116, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 "Montserrat", system-ui, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Aoki", "Montserrat", sans-serif; font-weight: 400; color: var(--blue); margin: 0; letter-spacing: .01em; }
img { max-width: 100%; display: block; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar::before { content: ""; display: block; height: 4px; background: var(--rainbow); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { flex: none; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a { padding: 9px 18px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--paper); text-decoration: none; color: var(--blue); }
.nav a.active { background: var(--blue); color: #fff; }
.user { position: relative; }
.user summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.user summary::-webkit-details-marker { display: none; }
.avatar-sm.photo { object-fit: cover; background: #fff; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--dusk); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user .menu { position: absolute; right: 0; top: 46px; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px; }
.user .menu a, .user .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; }
.user .menu a:hover, .user .menu button:hover { background: var(--paper); text-decoration: none; }

/* ---------- page ---------- */
.page { position: relative; max-width: 1240px; margin: 0 auto; padding: 30px 28px 70px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.pagehead h1 { font-size: 34px; line-height: 1.15; }
.pagehead p { margin: 6px 0 0; color: var(--muted); }

.hero { position: relative; overflow: hidden; border-radius: 28px; background: var(--dusk); color: #fff; padding: 34px 38px; margin-bottom: 22px; box-shadow: var(--shadow); }
.hero h1 { color: #fff; font-size: 38px; line-height: 1.12; max-width: 720px; }
.hero p { margin: 10px 0 0; max-width: 640px; opacity: .93; font-size: 16px; }
.hero .glyph { position: absolute; right: -30px; top: -34px; height: 340px; opacity: .13; filter: brightness(0) invert(1); pointer-events: none; }
.hero .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); padding: 5px 15px 5px 5px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip .ci { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.26); display: grid; place-items: center; flex: none; }
.chip .ci svg { width: 15px; height: 15px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; }
.card > h2 { font-size: 21px; }
.card .hint { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g21 { grid-template-columns: 2fr 1fr; }
.g12 { grid-template-columns: 1fr 2fr; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3, .g2, .g21, .g12 { grid-template-columns: 1fr; } .hero { padding: 26px; } }
@media (max-width: 640px) {
  .g4 { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px 8px; gap: 8px 12px; }
  .brand img { height: 32px; }
  .user { margin-left: auto; }
  .user summary span:last-child { display: none; }
  .user summary { padding: 4px; }
  .nav { order: 3; flex: 1 1 100%; overflow-x: auto; padding-bottom: 2px; }
  .page { padding: 20px 16px 50px; }
  .hero h1 { font-size: 30px; }
  .pagehead h1 { font-size: 28px; }
}

.kpi { position: relative; padding: 22px 24px 20px; }
.kpi::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rainbow); opacity: .85; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 40px; font-weight: 700; color: var(--blue); line-height: 1.15; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-right: 6px; }
.delta.up { background: #e6f5ee; color: var(--good); }
.delta.down { background: #fde8e7; color: var(--bad); }
.delta.flat { background: var(--paper); color: var(--muted); }

.chart { position: relative; height: 320px; }
.chart.short { height: 240px; }
.chart.round { height: 250px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }

/* ---------- ranked lists ---------- */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank li { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; }
.rank .thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--paper); box-shadow: 0 2px 8px rgba(45,55,116,.18); }
.rank .round { border-radius: 50%; }
.rank .ini { width: 46px; height: 46px; border-radius: 50%; background: var(--dusk); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.rank .name { font-weight: 600; line-height: 1.25; display: block; }
.rank .by { color: var(--muted); font-size: 12.5px; }
.rank .num { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; text-align: right; }
.rank .num small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.bar { height: 7px; border-radius: 99px; background: var(--paper); margin-top: 7px; overflow: hidden; }
.bar > span { display: block; width: 100%; height: 100%; background: var(--rainbow); clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0 round 99px); }

/* ---------- insights: each one a full-colour tile ---------- */
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .insights { grid-template-columns: 1fr; } }
.insights li { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: center; padding: 16px 20px; border-radius: 18px; color: #fff; }
.insights li b { display: block; font-size: 15.5px; line-height: 1.3; }
.insights li span.t { display: block; font-size: 13.5px; opacity: .93; margin-top: 3px; line-height: 1.45; }
.insights li.good { background: linear-gradient(120deg, #2f8a63, #3d9a74); }
.insights li.watch { background: linear-gradient(120deg, #e0504a, #f0705a); }
.insights li.launch { background: linear-gradient(120deg, #e8960f, #f6b028); color: #3a2a00; }
.insights li.info { background: linear-gradient(120deg, #2d3774, #4a4fa6); }
.ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.insights li.launch .ico { background: rgba(255,255,255,.4); }
.insights li.launch .ico svg { stroke: #3a2a00; fill: #3a2a00; }

/* pop-chart movement */
.move { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
.move.up { background: #e6f5ee; color: var(--good); } .move.down { background: #fde8e7; color: var(--bad); }
.move.flat { background: var(--paper); color: var(--muted); } .move.new { background: #fff0cc; color: #8a5a00; }

/* ---------- book & author pages ---------- */
.bookhead { display: grid; grid-template-columns: 210px 1fr; gap: 34px; margin-bottom: 22px; align-items: start; }
.bookhead .cover { border-radius: 14px; box-shadow: 0 14px 34px rgba(45,55,116,.28); width: 210px; }
.bookhead h1 { font-size: 40px; line-height: 1.1; }
.bookhead .sub { color: var(--muted); margin: 10px 0 0; }
.people { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.person { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink); }
.person:hover { text-decoration: none; border-color: var(--blue); }
.person img, .person .ini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.person .ini { background: var(--dusk); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.authorhead { display: flex; gap: 28px; align-items: center; margin-bottom: 22px; }
.authorhead .photo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 30px rgba(45,55,116,.28); border: 4px solid #fff; }
.authorhead .ini { width: 128px; height: 128px; border-radius: 50%; background: var(--dusk); color: #fff; display: grid; place-items: center; font: 400 44px "Aoki"; }
.stats-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 18px; min-width: 130px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; color: var(--blue); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 760px) { .bookhead { grid-template-columns: 1fr; } .bookhead .cover { width: 160px; } }

.recoup { text-align: center; }
.recoup .chart { height: 220px; }
.recoup .big { position: absolute; inset: 0; display: grid; place-content: center; pointer-events: none; }
.recoup .big b { font-size: 38px; color: var(--blue); line-height: 1; }
.recoup .big span { color: var(--muted); font-size: 12px; }
.recoup p { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }

/* drill-down sections */
details.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
details.section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 20px 26px; }
details.section > summary::-webkit-details-marker { display: none; }
details.section .sicon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 19px; flex: none; }
details.section .stitle { font: 400 20px "Aoki"; color: var(--blue); }
details.section .ssub { color: var(--muted); font-size: 13px; }
details.section .headline { margin-left: auto; text-align: right; font-weight: 700; color: var(--blue); font-size: 18px; }
details.section .headline small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
details.section .chev { transition: transform .2s; color: var(--muted); display: grid; place-items: center; }
details.section[open] .chev { transform: rotate(90deg); }
details.section[open] > summary { border-bottom: 1px solid var(--line); }
details.section .body { padding: 24px 26px 26px; }
@media (max-width: 700px) { details.section .headline { display: none; } }

/* tables */
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 11px 16px; }
table.t td { padding: 11px 16px; border-top: 1px solid var(--line); }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:hover td { background: #fafbff; }
.neg { color: var(--bad); }

/* grids of covers and people */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; color: var(--ink); transition: transform .15s, box-shadow .15s; display: block; }
.tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(45,55,116,.16); }
.tile img.cover { border-radius: 10px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile .ph { border-radius: 10px; aspect-ratio: 1; background: var(--dusk); display: grid; place-items: center; }
.tile img.face { width: 96px; height: 96px; border-radius: 50%; margin: 6px auto 0; object-fit: cover; }
.tile .ini { width: 96px; height: 96px; border-radius: 50%; margin: 6px auto 0; background: var(--dusk); color: #fff; display: grid; place-items: center; font: 400 32px "Aoki"; }
.tile b { display: block; margin-top: 12px; line-height: 1.25; }
.tile small { color: var(--muted); }
.tile.person { text-align: center; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty b { display: block; color: var(--blue); font: 400 20px "Aoki"; margin-bottom: 6px; }
.note { background: #fff8e6; border: 1px solid #f6e2a8; color: #7a5a00; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px; margin-bottom: 20px; }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; background: var(--dusk); padding: 20px; }
.signin .box { position: relative; background: #fff; width: min(440px, 100%); border-radius: 28px; padding: 38px 38px 34px; box-shadow: 0 30px 80px rgba(20, 24, 50, .35); }
.signin .box::after { content: ""; position: absolute; left: 38px; right: 38px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rainbow); opacity: .85; }  /* same inset stripe as the cards */
.signin .ver { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 11px; color: #fff; opacity: .4; letter-spacing: .04em; }
.signin img { height: 42px; margin-bottom: 22px; }
.signin h1 { font-size: 30px; }
.signin p.sub { color: var(--muted); margin: 6px 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--blue); }
.field input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); font: inherit; background: #fafbff; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(45,55,116,.1); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; border-radius: 999px; border: 0; background: var(--blue); color: #fff; font: 600 15px "Montserrat"; cursor: pointer; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.block { width: 100%; }
.errors { background: #fde8e7; color: var(--bad); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.signin .twofactor { width: min(520px, 100%); overflow-wrap: anywhere; }
.twofactor h1 { margin: 0 0 10px; }
.twofactor p { color: var(--muted); margin: 0 0 18px; }
.twofactor table { width: 100%; margin-bottom: 20px; }
.twofactor tr, .twofactor th, .twofactor td { display: block; text-align: left; width: 100%; }
.twofactor tr { margin-bottom: 16px; }
.twofactor th label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--blue); }
.twofactor td input:not([type=hidden]), .twofactor td select { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); font: inherit; background: #fafbff; }
.twofactor td input:focus, .twofactor td select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(45,55,116,.1); background: #fff; }
.twofactor .errorlist { color: var(--bad); padding-left: 20px; }
.twofactor .btn { margin: 4px 5px 4px 0; }
.twofactor .btn-secondary, .twofactor .btn:disabled { background: var(--paper); color: var(--blue); }
.twofactor .btn-link { background: none; color: var(--blue); padding-inline: 8px; }
.twofactor .btn-block { width: 100%; }
.twofactor .float-right { float: right; }
.signin .twofactor p img { height: auto; max-width: 100%; margin: 0; }
.signin .password-help { color: var(--muted); font-size: 12px; line-height: 1.5; margin: -7px 0 14px; }
.signin .password-help ul { padding-left: 20px; }


/* ---------- headline strip, gauges, chart run ---------- */
.kpi .value .pos { font-size: 46px; }
.kpi .sub b { color: var(--blue); }
.seriespill { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 6px 14px; border-radius: 999px; background: #eef0fb; color: var(--blue); font-weight: 600; font-size: 13.5px; }
.seriespill:hover { background: #e2e6f8; text-decoration: none; }
.gauges { display: grid; gap: 26px; }
.gauge .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gauge .top b { font-size: 15px; color: var(--ink); }
.gauge .top .big { font-size: 24px; font-weight: 700; color: var(--blue); }
.gauge .say { color: var(--muted); font-size: 13.5px; margin: 2px 0 12px; }
.track { position: relative; height: 12px; border-radius: 99px; background: var(--paper); }
.track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--rainbow); opacity: .35; }
.track .avg { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--ink); opacity: .55; }
.track .dot { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; border: 5px solid var(--blue); box-shadow: 0 2px 8px rgba(45,55,116,.35); }
.gauge.good .dot { border-color: var(--good); } .gauge.bad .dot { border-color: var(--red); }
.legend2 { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.chartrun { display: flex; gap: 10px; flex-wrap: wrap; }
.chartrun .slot { text-align: center; min-width: 74px; }
.chartrun .q { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.chartrun .p { height: 54px; border-radius: 16px; display: grid; place-content: center; font: 700 20px "Montserrat"; background: #e9ebf6; color: var(--muted); line-height: 1.1; }
.chartrun .p small { font-size: 11px; font-weight: 600; opacity: .85; }
.chartrun .p.top1 { background: linear-gradient(135deg, #fcb61e, #fe8b5e); color: #fff; }
.chartrun .p.top3 { background: var(--pine); color: #fff; }
.chartrun .p.top10 { background: var(--blue); color: #fff; }
.stacked { display: flex; height: 22px; border-radius: 99px; overflow: hidden; margin: 6px 0 14px; }
.stacked span { display: block; height: 100%; }
.mixlist { display: grid; gap: 10px; }
.mixlist .row { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 12px; align-items: center; font-size: 14px; }
.mixlist i { width: 12px; height: 12px; border-radius: 4px; display: block; }
.mixlist .amt { font-weight: 700; color: var(--blue); text-align: right; }
.mixlist .pc { color: var(--muted); font-size: 12.5px; width: 38px; text-align: right; }
.story { font-size: 19px; line-height: 1.55; color: var(--ink); max-width: 900px; margin: 0 0 22px; }
.story b { color: var(--blue); }
.mini-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.rowlink { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rowlink:first-child { border-top: 0; }
.rowlink .n { font-weight: 700; color: var(--blue); text-align: right; font-variant-numeric: tabular-nums; }
.rowlink small { color: var(--muted); display: block; }

.legend2 .key { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.legend2 .dotkey { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3.5px solid var(--blue); }
.legend2 .avgkey { width: 3px; height: 13px; border-radius: 2px; background: var(--ink); opacity: .55; margin-left: 4px; }
.legend2 span:nth-child(2) { text-align: center; }
.t.returns th, .t.returns td { white-space: nowrap; }
.t .grp { text-align: center; background: #eceef9; color: var(--blue); }
.insightlist { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.insightlist li { padding: 12px 16px; border-radius: 14px; background: var(--paper); font-size: 14px; line-height: 1.5; }

/* ---------- upcoming titles ---------- */
.flash { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; background: #e9f5ef; color: var(--good); }
.flash.error { background: #fdecec; color: var(--bad); }
.kpi .value.bad, .badtxt { color: var(--bad); }
.pill { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--paper); color: var(--muted); white-space: nowrap; }
.pill.big { font-size: 14px; padding: 6px 16px; }
.pill.ok { background: #e9eefb; color: var(--blue); } .pill.soon { background: #fff3dc; color: #a56a00; }
.pill.late { background: #fdecec; color: var(--bad); } .pill.live { background: #e9f5ef; color: var(--good); }
.tcard { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; margin-bottom: 14px; color: var(--ink); }
.tcard:hover { text-decoration: none; box-shadow: 0 1px 2px rgba(45,55,116,.07), 0 14px 34px rgba(45,55,116,.12); }
.tcard .thumb, .tcard .ph { width: 64px; height: 92px; border-radius: 10px; object-fit: cover; box-shadow: 0 2px 8px rgba(45,55,116,.18); }
.tcard .ph { display: grid; place-items: center; background: var(--dusk); }
.ttitle { font: 400 21px Aoki; color: var(--blue); }
.tsub { color: var(--muted); font-size: 13px; }
.tside { display: grid; gap: 6px; justify-items: end; }
.tl { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tl li { display: flex; justify-content: space-between; gap: 14px; } .tl a { color: var(--ink); } .tl b { display: block; font-weight: 600; }
.tl span { color: var(--muted); font-size: 12.5px; } .tl em { font-style: normal; font-weight: 700; color: var(--blue); white-space: nowrap; } .tl em.late { color: var(--bad); }

/* forms and dialogs */
.fld { display: grid; gap: 5px; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
input, select, textarea { font-family: inherit; }
.fld input, .fld select, .fld textarea, .task select, .task input[type=date], .evhead input, .addperson, .inl input {
  font: 500 14px "Montserrat"; color: var(--ink); padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.fld small { font-weight: 400; } .fld small.err { color: var(--bad); font-weight: 600; }
.formgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; align-items: end; } .formgrid .wide { grid-column: 1 / -1; }
.btn.small { padding: 9px 20px; font-size: 13.5px; } .btn.ghost { background: var(--paper); color: var(--muted); }
.dlg { border: 0; border-radius: 22px; padding: 0; box-shadow: 0 20px 60px rgba(29,34,51,.3); width: min(480px, calc(100vw - 32px)); color: var(--ink); }
.dlg::backdrop { background: rgba(29,34,51,.45); }
.dlg form { padding: 26px 28px 8px; } .dlg form + form { padding: 0 28px 22px; }
.dlg h3 { font-size: 24px; margin-bottom: 18px; } .dact { display: flex; gap: 10px; margin: 6px 0 18px; }
.linkbtn { border: 0; background: none; color: var(--blue); font: 600 13px "Montserrat"; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.quiet { color: var(--muted); font-weight: 500; }
.x { border: 0; background: none; font-size: 19px; line-height: 1; color: var(--muted); cursor: pointer; }

/* title header, details strip, journey */
.thead { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 20px; }
.thead .cover.sm, .coverph { width: 120px; flex: none; border-radius: 10px; box-shadow: 0 6px 20px rgba(45,55,116,.22); }
.coverph { aspect-ratio: 2/3; display: grid; place-items: center; background: var(--dusk); }
.tinfo { flex: 1; min-width: 0; } .tinfo h1 { font-size: 34px; line-height: 1.15; } .tinfo p { margin: 8px 0 0; }
.pencil { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; vertical-align: middle; }
.addmenu { position: relative; } .addmenu summary { list-style: none; cursor: pointer; }
.addmenu summary::-webkit-details-marker { display: none; }
.addmenu > div { position: absolute; right: 0; top: 46px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; min-width: 230px; }
.addmenu > div button { border: 0; background: none; text-align: left; padding: 10px 14px; border-radius: 10px; font: 600 14px "Montserrat"; color: var(--ink); cursor: pointer; }
.addmenu > div button:hover { background: var(--paper); }
.strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chipbtn { display: grid; gap: 1px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 16px; font: 600 14px "Montserrat"; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.chipbtn small { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.chipbtn.empty { border-style: dashed; color: var(--muted); box-shadow: none; background: transparent; }
.chipbtn:hover { border-color: var(--blue); }
.journey { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 22px; }
.step { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.step:hover { text-decoration: none; border-color: var(--blue); }
.step i { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; background: var(--paper); color: var(--muted); }
.step b { font-size: 13px; line-height: 1.2; } .step span { font-size: 12px; color: var(--muted); }
.step.now { border-color: var(--blue); } .step.now i { background: var(--blue); color: #fff; }
.step.done i { background: var(--pine); color: #fff; }
.sicon.done { background: var(--pine) !important; } .sicon.now { background: var(--blue) !important; } .sicon.todo { background: #aab0cf !important; }
.nextup { margin-bottom: 22px; } .nextup h2 { margin-bottom: 8px; }
.nrow { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); color: var(--ink); }
.nrow:first-of-type { border-top: 0; } .nrow:hover { text-decoration: none; } .nrow:hover b { color: var(--blue); }
.nrow span { color: var(--muted); font-size: 13px; } .nrow em { font-style: normal; font-weight: 700; color: var(--blue); min-width: 62px; text-align: right; }
.nrow em.late { color: var(--bad); }
.av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--dusk); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }

/* checklist rows */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: 30px 1fr 130px 140px 22px; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.tasks > .task:first-child { border-top: 0; }
.tick { position: relative; display: block; margin-top: 2px; } .tick input { position: absolute; opacity: 0; }
.tick span, .tick.auto, .tick.none { width: 24px; height: 24px; border-radius: 8px; border: 2px solid #c9cde3; display: block; background: #fff; cursor: pointer; }
.tick.auto { cursor: default; border-style: dashed; } .tick.none { border: 0; background: none; }
.tick input:checked + span, .tick.auto.on { background: var(--pine); border-color: var(--pine); box-shadow: inset 0 0 0 4px #fff; }
.tick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.tname { font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding-top: 1px; }
.task.done .ttl { color: var(--muted); text-decoration: line-through; } .task.late .ttl { color: var(--bad); }
.task.off .ttl { color: var(--muted); font-weight: 500; }
.task.late input.due { border-color: var(--bad); color: var(--bad); }
.task select.who, .task input.due { padding: 6px 10px; font-size: 13px; color: var(--muted); }
.task select.who:hover, .task input.due:hover { border-color: var(--blue); }
.task.saving { opacity: .6; } .task.failed { outline: 2px solid var(--bad); border-radius: 10px; }
.note { flex-basis: 100%; border: 0 !important; padding: 2px 0 !important; font: 400 13px "Montserrat" !important; color: var(--muted) !important; background: transparent !important; border-bottom: 1px dashed var(--line) !important; border-radius: 0 !important; }
.note[hidden] { display: none; }
.inl { font-weight: 500; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; } .inl input { padding: 4px 8px; }
.yn { font-weight: 500; font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.yn button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 12px; font: 600 12.5px "Montserrat"; color: var(--blue); cursor: pointer; }
.yn button:hover { border-color: var(--blue); } .yn button.on { background: var(--paper); color: var(--muted); }
.allgood { color: var(--muted); padding: 6px 0; }
.donefold { margin-top: 8px; border-top: 1px solid var(--line); } .donefold > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; padding: 12px 0 4px; }
.evcard { border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px 12px; margin-bottom: 16px; }
.evhead { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 12px; margin-bottom: 14px; }
.evhead .evname { font: 600 16px "Montserrat"; }
.going { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 8px; } .going > small { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.chips { display: contents; } .pchip { display: inline-flex; align-items: center; gap: 7px; background: var(--paper); border-radius: 999px; padding: 3px 8px 3px 3px; font-weight: 600; font-size: 13px; }
.addperson { padding: 6px 12px !important; font-size: 13px !important; width: 190px; }
@media (max-width: 900px) { .journey { grid-template-columns: repeat(3, 1fr); } .thead { flex-wrap: wrap; } .evhead { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .task { grid-template-columns: 30px 1fr; } .task select.who, .task input.due { grid-column: 2; }
  .formgrid { grid-template-columns: 1fr; } .journey { grid-template-columns: repeat(2, 1fr); }
  .tcard { grid-template-columns: 52px 1fr; } .tside { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; }
  .nrow { grid-template-columns: 1fr auto; } .nrow span { display: none; }
}
details.section .chev { margin-left: auto; } details.section .headline + .chev { margin-left: 0; }

/* upcoming: round add button, short facts, process arrows */
.tcards { margin-bottom: 22px; } .tcards .tcard { max-width: none; }
.fab { position: absolute; right: 28px; top: 30px; z-index: 6; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font: 300 30px/1 "Montserrat"; cursor: pointer; box-shadow: 0 6px 18px rgba(45,55,116,.3); display: grid; place-items: center; padding-bottom: 3px; }
.fab:hover { filter: brightness(1.12); transform: translateY(-1px); }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 22px; }
.fact { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; font: 500 13px "Montserrat"; color: var(--ink); cursor: pointer; }
.fact b { color: var(--muted); font-weight: 600; margin-right: 4px; } .fact:hover { border-color: var(--blue); }
.journey { gap: 22px; }
.step { position: relative; }
.step + .step::before { content: ""; position: absolute; left: -15px; top: 50%; width: 9px; height: 9px; border-top: 2px solid #b4bad8; border-right: 2px solid #b4bad8; transform: translateY(-50%) rotate(45deg); }
.step.done + .step::before { border-color: var(--pine); }
@media (max-width: 900px) { .journey { gap: 8px; } .step + .step::before { display: none; } }
.addhere { margin-top: 6px; display: inline-block; }
.evfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 6px; } .evfoot form { margin: 0; padding: 0; }
.coverswap { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13.5px; padding: 0 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
a.fact { color: var(--ink); } a.fact:hover { text-decoration: none; }
.warn { color: #a56a00; font-weight: 600; font-size: 13.5px; }
.blurb { max-width: 680px; color: var(--ink); } .quietlink { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* book info */
.infocard { margin-bottom: 18px; } .infocard h2 { margin-bottom: 14px; } .infocard textarea { width: 100%; }
.uploadrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.subh { font-size: 19px; margin: 24px 0 10px; }
table.terms input { width: 86px; text-align: right; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font: 500 13.5px "Montserrat"; }
table.terms input.cur { width: 58px; text-align: left; text-transform: uppercase; }
table.terms td.src { color: var(--muted); font-size: 12px; white-space: nowrap; } table.terms { margin-bottom: 14px; }
.pasteform { margin-top: 22px; } .pasteform textarea { width: 100%; font: 500 13px "Montserrat"; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
td.old { color: var(--muted); }
.addmenu > div a { display: block; padding: 10px 14px; border-radius: 10px; font: 600 14px "Montserrat"; color: var(--ink); } .addmenu > div a:hover { background: var(--paper); text-decoration: none; }
.formats { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; } .formats form { margin: 0; }
.ftoggle { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px 7px 12px; font: 600 14px "Montserrat"; color: var(--muted); cursor: pointer; }
.ftoggle i { width: 28px; height: 16px; border-radius: 99px; background: #c9cde3; position: relative; transition: background .15s; }
.ftoggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.ftoggle.on { color: var(--ink); } .ftoggle.on i { background: var(--pine); } .ftoggle.on i::after { left: 14px; }
.ftoggle:hover:not(:disabled) { border-color: var(--blue); } .ftoggle:disabled { cursor: not-allowed; opacity: .75; }
table.terms input.wide-in { width: 100%; min-width: 130px; text-align: left; }
.fld small { display: block; font-weight: 400; line-height: 1.5; }

/* titles without a cover yet */
.nc { font: 600 11px/1.25 "Montserrat"; letter-spacing: .02em; text-align: center; color: rgba(255,255,255,.92); padding: 0 6px; }
.coverph.big { width: 210px; border-radius: 14px; } .coverph.big .nc { font-size: 14px; }
.coverph .nc { font-size: 12px; } .tcard .ph .nc { font-size: 10px; padding: 0 4px; }
.blurb { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* royalties */
table.roy tbody.rolls tr.main td { color: var(--muted); }
table.roy .dim { color: var(--muted); }
.rowtoggle { all: unset; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 9px; }
.rowtoggle i { width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; transition: transform .15s; }
.rowtoggle[aria-expanded="true"] i { transform: rotate(90deg); } .rowtoggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
table.roy .norow { padding-left: 15px; font-weight: 600; }
table.roy tr.sub td { font-size: 13px; color: var(--muted); background: #f8f9fd; padding-top: 7px; padding-bottom: 7px; }
table.roy tr.sub td:first-child { padding-left: 38px; }
table.roy td, table.roy th { vertical-align: middle; }

/* royalties: header and the sum of what a payment is made of */
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-bottom: 6px; }
.hero .due { font-size: 18px; margin-top: 8px; } .hero .due b { font-weight: 700; }
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr; gap: 14px; align-items: center; margin-bottom: 22px; }
.eq .op { font: 300 38px/1 "Montserrat"; color: var(--muted); text-align: center; }
.eq .kpi.total { background: var(--blue); border-color: var(--blue); } .eq .kpi.total .label, .eq .kpi.total .sub { color: rgba(255,255,255,.8); } .eq .kpi.total .value { color: #fff; }
.eq.small { grid-template-columns: 1fr auto 1fr auto 1fr; margin: 0; } .eq.small small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; } .eq.small b { font-size: 22px; color: var(--blue); }
@media (max-width: 800px) { .eq, .eq.small { grid-template-columns: 1fr; } .eq .op { font-size: 28px; } }

/* royalties: the quarter calendar */
.flags { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.flag { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px 6px 10px; font: 700 13px "Montserrat"; color: var(--ink); cursor: pointer; }
.flag i { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid var(--ink); } .flag small { font-weight: 500; color: var(--muted); }
.flag.paid { opacity: .55; } .flag.next { border-color: var(--blue); background: #eef0fb; } .flag:hover { border-color: var(--blue); }
.qgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qtile { border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 12px; display: grid; gap: 8px; align-content: start; background: #fff; }
.qtile.now { box-shadow: 0 0 0 2px var(--blue); }
.qhead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .qhead b { font: 400 18px Aoki; color: var(--blue); } .qhead small { color: var(--muted); font-size: 12px; font-weight: 600; }
.qhead em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--blue); color: #fff; border-radius: 99px; padding: 2px 9px; }
.qpill { border-radius: 12px; padding: 7px 10px; display: grid; gap: 1px; color: #fff; font-size: 12px; line-height: 1.3; cursor: default; transition: opacity .15s, transform .15s; }
.qpill span { font-weight: 600; opacity: .9; } .qpill b { font-weight: 700; } .qpill em { font-style: normal; font-weight: 600; opacity: .9; }
.qpill.ingram { background: var(--blue); } .qpill.event { background: var(--orange); }
.qpill.later { opacity: .5; } .qpill.paid, .qpill.earlier { background: #e4e6f2; color: var(--muted); } .qpill.earlier { opacity: .7; }
.qpill[data-run] { cursor: pointer; }
#calendar.dim .qpill[data-run]:not(.hl), #calendar.dim .flag:not(.hl) { opacity: .25; }
#calendar.dim .qpill.hl, #calendar.dim .flag.hl { opacity: 1; transform: translateY(-1px); } #calendar.dim .flag.hl { border-color: var(--blue); }
@media (max-width: 1000px) { .qgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .qgrid { grid-template-columns: 1fr; } .qtile { grid-template-columns: 1fr 1fr; } .qhead { grid-column: 1 / -1; } }
.roypage { } .roypage > section, .roypage > details { margin-bottom: 18px; }  /* one even rhythm between every block on the tab */
#calendar .body { padding-top: 6px; } #calendar .flags { margin-top: 0; }

/* run royalties */
.notice { background: #eef0fb; color: var(--blue); border-radius: var(--radius-sm); padding: 11px 18px; font-weight: 600; font-size: 14px; } .notice.warn { background: #fff3dc; color: #a56a00; }
.checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; } .checks i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; flex: none; color: #fff; }
.checks .ok i { background: var(--pine); } .checks .bad i { background: var(--bad); } .checks .bad span { color: var(--bad); }
.stepsl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.stp { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.stp:first-child { border-top: 0; } .stp .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--paper); color: var(--muted); }
.stp.available .num { background: var(--blue); color: #fff; } .stp.done .num { background: var(--pine); color: #fff; }
.stp.locked { opacity: .55; } .stp p { margin: 4px 0 10px; color: var(--muted); font-size: 14px; } .stp .muted, .muted { color: var(--muted); }
.stp form.inl { display: inline-block; margin-right: 8px; } .paidform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; } .paidform p { flex-basis: 100%; margin-bottom: 0; }
.paidform input { font: 500 14px "Montserrat"; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.chk { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; } .chk input { margin-top: 3px; }

/* run royalties: calmer header, hero button, horizontal steps */
.herobtn { position: absolute; right: 38px; bottom: 30px; display: inline-flex; align-items: center; gap: 9px; background: #fff; color: var(--blue); border-radius: 999px; padding: 11px 22px; font: 700 14px "Montserrat"; box-shadow: 0 6px 18px rgba(29,34,51,.22); }
.herobtn:hover { text-decoration: none; transform: translateY(-1px); }
@media (max-width: 800px) { .herobtn { position: static; margin-top: 18px; display: inline-flex; } }
.hero.calm { background: linear-gradient(120deg, #e4f1ec 0%, #e9eefb 55%, #efe9fb 100%); color: var(--ink); }
.hero.calm h1, .hero.calm .eyebrow { color: var(--blue); } .hero.calm .glyph { filter: none; opacity: .16; }
.hero.calm .chip { background: #fff; border-color: var(--line); color: var(--blue); } .hero.calm .chip .ci { background: #eef0fb; color: var(--blue); }
.hero.calm a.chip:hover { text-decoration: none; border-color: var(--blue); }
.gap { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.fixlinks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; } .fixlinks a { font-weight: 600; font-size: 13px; }
.stepper { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.sh { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 13px; line-height: 1.25; color: var(--muted); padding: 0 6px; }
.sh .num { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--paper); border: 2px solid var(--line); color: var(--muted); }
.sh + .sh::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.sh.done .num { background: var(--pine); border-color: var(--pine); color: #fff; } .sh.done + .sh::before, .sh.current::before { background: var(--pine); }
.sh.current .num { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px #e3e6f6; } .sh.current { color: var(--ink); }
.sh.current b { color: var(--blue); }
.stpanels { display: grid; gap: 12px; margin-top: 18px; }
.stpanel { border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; background: #fff; }
.stpanel h3 { font: 700 15px "Montserrat"; color: var(--ink); margin-bottom: 4px; } .stpanel p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.stpanel.done { background: #f6faf8; border-color: #dcebe5; } .stpanel.done h3 { color: var(--pine); } .stpanel.done p { margin-bottom: 0; }
.stpanel:not(.done) { box-shadow: var(--shadow); border-color: #cfd4ee; }
.stpanel form.inl { display: inline-block; margin-right: 8px; }
@media (max-width: 800px) { .stepper { grid-template-columns: repeat(2, 1fr); gap: 14px 0; } .sh + .sh::before { display: none; } }
.hero.calm .chip .ci svg { stroke: var(--blue); }

/* round two: danger-tinted run header, spacing under card titles, running-total note */
.hero.calm { background: linear-gradient(120deg, #fde4e1 0%, #fdeee8 55%, #fff4ee 100%); }
.hero.calm h1, .hero.calm .eyebrow { color: #b8312e; } .hero.calm .chip { border-color: #f1c9c5; } .hero.calm .chip .ci { background: #fbe0dd; } .hero.calm .chip .ci svg { stroke: #b8312e; }
.hero.calm a.chip { color: #b8312e; } .hero.calm a.chip:hover { border-color: #b8312e; }
.overdue { color: #d9413e; } .hero:not(.calm) .overdue { color: #fff; background: rgba(217,65,62,.9); padding: 1px 10px; border-radius: 999px; }
.runpage > .card > h2 + .tablewrap, .roypage > .card > h2 + .tablewrap, .roypage > .card > .runhint + .tablewrap { margin-top: 16px; }
.runhint { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; } .runhint b { color: var(--ink); }

.adddata { display: inline-block; margin-top: 4px; font-weight: 700; font-size: 12.5px; }

/* the round + for adding data */
.adddata-menu { position: absolute; top: 30px; right: 28px; z-index: 6; }
/* the round + sits top right, under the header and beside the first block, which leaves room for it */
.page:has(> .fab) > .pagehead, .page:has(> .adddata-menu) > .pagehead, .roypage:has(> .adddata-menu) > .hero { margin-right: 62px; }
.adddata-menu > summary { list-style: none; } .adddata-menu > summary::-webkit-details-marker { display: none; }
.addfab { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font: 300 30px/1 "Montserrat"; padding-bottom: 3px; cursor: pointer; box-shadow: 0 6px 18px rgba(45,55,116,.3); }
.addfab:hover { filter: brightness(1.12); }
.addpop { position: absolute; right: 0; top: 54px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; min-width: 200px; display: grid; }
.addpop button { border: 0; background: none; text-align: left; padding: 11px 14px; border-radius: 10px; font: 600 14px "Montserrat"; color: var(--ink); cursor: pointer; } .addpop button:hover { background: var(--paper); }
.pagehead { position: relative; }

/* on wide screens the round + floats in the margin beside the content, so nothing has to shrink to make room */
@media (min-width: 1380px) {
  .fab, .adddata-menu { right: -34px; }
  .page:has(> .fab) > .pagehead, .page:has(> .adddata-menu) > .pagehead, .roypage:has(> .adddata-menu) > .hero { margin-right: 0; }
}
