/* Look A "Register" (Silvio, 2026-11-09): warm paper, ink green, serif names. Colours and type from
   the design canvas (A-Cases, A-Staff): Newsreader for names and headings, Instrument Sans for text. */
:root {
    --paper:#F6F3EC; --side:#EFEADF; --card:#FFFDF8; --foot:#FBF8F1; --ink:#1D2A24; --text:#3F4943; --muted:#5C665F;
    --line:#E4DECF; --line-soft:#ECE7DA; --pill:#C9C1AE; --green:#1F4D3F; --green-dark:#123328; --on-green:#FFFDF8;
    --red:#8A3413; --red-soft:#F6E3DA;
    --serif: 'Newsreader', Georgia, "Times New Roman", serif; --sans: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root { --paper:#171a18; --side:#1c201d; --card:#202421; --foot:#1d211e; --ink:#e8e4da; --text:#d3cfc5; --muted:#a3a79f; --line:#343a36; --line-soft:#2c312d;
            --pill:#4a514c; --green:#8cc5a7; --green-dark:#a9d8be; --on-green:#13201a; --red:#eba58f; --red-soft:#3a2522; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 var(--sans); }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
h1 { margin: 0 0 14px; font: 500 34px/1.1 var(--serif); letter-spacing: -0.02em; color: var(--ink); }
h2 { margin: 0 0 6px; font: 500 21px/1.25 var(--serif); color: var(--ink); }
.ci-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ci-muted { color: var(--muted); }
.ci-small { font-size: 13px; }
input[type=checkbox] { accent-color: var(--green); }

/* The frame: sidebar and page. */
.ci-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.ci-side { flex: 1 1 232px; max-width: 100%; background: var(--side); border-right: 1px solid var(--line); padding: 28px 16px; display: flex; flex-direction: column; gap: 28px; }
.ci-sidehead { padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }
.ci-brand { font: 600 24px/1.1 var(--serif); color: var(--green); }
.ci-home { font-size: 13px; color: var(--muted); }
.ci-sidegroup { display: flex; flex-direction: column; gap: 2px; }
.ci-sidegroup a { min-height: 44px; padding: 0 12px; display: flex; align-items: center; border-radius: 10px; color: var(--ink); }
.ci-sidegroup a:hover { background: var(--line-soft); text-decoration: none; }
.ci-sidegroup a[aria-current="page"] { background: var(--green); color: var(--on-green); font-weight: 600; }
.ci-sidelabel { padding: 0 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ci-sidefoot { margin-top: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.ci-sidefoot form { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ci-main { flex: 999 1 560px; min-width: 0; padding: 36px 44px 56px; }
.ci-bare .ci-main { max-width: 960px; margin: 0 auto; padding: 20px 16px 40px; }
@media (max-width: 800px) {
    .ci-side { flex-basis: 100%; padding: 16px; gap: 12px; border-right: none; border-bottom: 1px solid var(--line); }
    .ci-sidegroup { flex-direction: row; flex-wrap: wrap; }
    .ci-sidelabel { display: none; }
    .ci-main { padding: 20px 16px 40px; }
    h1 { font-size: 30px; }
}

/* Page heads, cards, forms. */
.ci-pagehead { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.ci-pagehead h1 { font-size: 44px; margin: 0 0 6px; }
.ci-lede { margin: 0; font-size: 17px; color: var(--text); }
.ci-head h1 { margin-bottom: 6px; }
.ci-head p { margin: 0 0 16px; }
.ci-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.ci-card + .ci-card { margin-top: 12px; }
.ci-flush { padding: 0; overflow: hidden; }
.ci-pad { padding: 16px 24px; margin: 0; }
.ci-narrow { max-width: 440px; }
.ci-auth { max-width: 380px; margin: 8vh auto 0; }
.ci-field { display: block; margin-bottom: 12px; }
.ci-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ci-field input, .ci-field select { width: 100%; font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.ci-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.ci-choices { border: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ci-choices legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.ci-choices label { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.ci-btn { font: inherit; font-weight: 600; width: 100%; min-height: 44px; padding: 0 20px; border: 1px solid var(--green); border-radius: 22px; background: var(--green); color: var(--on-green); cursor: pointer; }
.ci-btn-sm { width: auto; min-height: 40px; padding: 0 16px; font-size: 14px; }
.ci-btn-quiet { background: var(--card); color: var(--green); }
.ci-btn-danger { background: var(--red); border-color: var(--red); color: var(--on-green); }
.ci-link { font: inherit; background: none; border: none; color: var(--green); text-decoration: underline; cursor: pointer; padding: 0; }
.ci-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; margin: 0; }
.ci-row + .ci-row { border-top: 1px solid var(--line-soft); }
.ci-alert { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.ci-alert ul { margin: 0; padding-left: 18px; }
.ci-note { background: var(--card); border: 1px solid var(--green); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.ci-copy { display: block; width: 100%; margin-top: 6px; font: 12px/1.4 ui-monospace, Consolas, monospace; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.ci-pending { border-color: var(--green); }
.ci-invite summary { cursor: pointer; font-weight: 600; color: var(--green); min-height: 28px; }
.ci-invite[open] summary { margin-bottom: 12px; }

/* Tabs and filter pills. */
.ci-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.ci-tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ci-tabs a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.ci-filterbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ci-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.ci-pills a { min-height: 44px; padding: 0 16px; display: flex; align-items: center; border: 1px solid var(--pill); border-radius: 22px; color: var(--ink); }
.ci-pills a:hover { text-decoration: none; background: var(--card); }
.ci-pills a[aria-current="page"] { background: var(--green); border-color: var(--green); color: var(--on-green); font-weight: 600; }
.ci-search { margin: 0; }
.ci-search label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; color: var(--muted); }
.ci-search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); width: 220px; max-width: 60vw; }

/* Tables. */
.ci-scroll { overflow-x: auto; }
.ci-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.ci-table th, .ci-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--text); }
.ci-table th:first-child, .ci-table td:first-child { padding-left: 24px; }
.ci-table th:last-child, .ci-table td:last-child { padding-right: 24px; }
.ci-table thead th { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line); }
.ci-table tbody tr:last-child > * { border-bottom: none; }
.ci-table tbody th { color: var(--ink); font-weight: 600; }
.ci-table caption { text-align: left; padding: 16px 24px 4px; font: 500 19px/1.3 var(--serif); color: var(--ink); }
.ci-table td a:first-child { color: var(--ink); font-weight: 600; }
.ci-cases { min-width: 760px; }
.ci-name { font: 500 20px/1.3 var(--serif); color: var(--ink); }
.ci-tablefoot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 24px; min-height: 52px; border-top: 1px solid var(--line); background: var(--foot); color: var(--text); }
.ci-tablefoot a { font-weight: 600; }
.ci-grid td { text-align: center; width: 76px; }
.ci-grid input { width: 18px; height: 18px; }
.ci-off td { color: var(--muted); }
.ci-list { list-style: none; margin: 0; padding: 0; }
.ci-list li { padding: 14px 24px; border-bottom: 1px solid var(--line-soft); }
.ci-list li:last-child { border-bottom: none; }

/* One case (A-Case): header, then the services and the rest beside the family and account. */
.ci-crumbs { margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.ci-casehead { margin-bottom: 22px; }
.ci-casehead h1 { font-size: 44px; margin: 10px 0 6px; overflow-wrap: anywhere; }
.ci-casehead p { margin: 4px 0 0; }
.ci-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-tag { padding: 4px 10px; border-radius: 12px; background: var(--line-soft); color: var(--text); font-size: 13px; font-weight: 600; }
.ci-tag-on { background: var(--green); color: var(--on-green); }
.ci-casegrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ci-casegrid { grid-template-columns: minmax(0, 1fr); } }
.ci-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ci-col > .ci-card + .ci-card { margin-top: 0; }
.ci-col h3 { margin: 0 0 8px; font: 500 19px/1.25 var(--serif); }
.ci-svc { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.ci-svc:first-of-type { border-top: none; }
.ci-when { flex: 0 0 120px; display: flex; flex-direction: column; gap: 2px; }
.ci-what { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-quote { margin: 8px 0 0; padding: 10px 14px; background: var(--paper); border-radius: 10px; color: var(--text); font-size: 14px; white-space: pre-line; }
.ci-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.ci-three .ci-card + .ci-card { margin-top: 0; }
.ci-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.ci-item:first-of-type { border-top: none; padding-top: 0; }
.ci-strong { font-weight: 600; }
.ci-plain { margin: 0; padding: 0; list-style: none; }
.ci-plain li { padding: 6px 0; border-top: 1px solid var(--line-soft); }
.ci-plain li:first-child { border-top: none; }
.ci-pairs { margin: 0; display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); }
.ci-pairs dt, .ci-pairs dd { margin: 0; padding: 8px 12px 8px 0; border-top: 1px solid var(--line-soft); }
.ci-pairs dt { color: var(--muted); }
.ci-pairs dt:first-of-type, .ci-pairs dt:first-of-type + dd { border-top: none; }
.ci-sums { margin: 0; display: grid; grid-template-columns: 1fr auto; }
.ci-sums dt, .ci-sums dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.ci-sums dd { text-align: right; font-variant-numeric: tabular-nums; }
.ci-sums dt:first-of-type, .ci-sums dt:first-of-type + dd { border-top: none; }
.ci-tasks { margin: 8px 0 0; padding: 0; list-style: none; }
.ci-tasks li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.ci-tasks li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ci-check { flex: 0 0 18px; height: 18px; margin-top: 2px; border: 1.5px solid var(--pill); border-radius: 5px; font-size: 12px; line-height: 15px; text-align: center; color: var(--on-green); }
.ci-done .ci-check { background: var(--green); border-color: var(--green); }
.ci-done > span:last-child { color: var(--muted); }
.ci-cases td a.ci-name { color: var(--ink); }
.ci-cases td a.ci-name:hover { color: var(--green); }
@media (max-width: 800px) { .ci-casehead h1 { font-size: 34px; } }

/* The Today board (Main). */
.ci-dayline { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; color: var(--muted); }
.ci-daynav { flex-wrap: wrap; }
.ci-col .ci-dayhead { margin: 16px 0 4px; font: 600 13px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ci-col .ci-dayhead:first-of-type { margin-top: 8px; }
a.ci-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ci-pagehead h1, .ci-pagehead > div { overflow-wrap: anywhere; min-width: 0; }

/* Changing a case: Add/Change links on its cards, and the forms. */
.ci-cardhead { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.ci-cardhead h2, .ci-cardhead h3 { margin-bottom: 0; }
.ci-edit { margin-left: 6px; font: 600 13px/1.4 var(--sans); white-space: nowrap; }
.ci-everyone { margin-top: 12px; }
.ci-everyone summary { cursor: pointer; min-height: 36px; font-size: 14px; color: var(--green); font-weight: 600; }
.ci-form { max-width: 820px; }
.ci-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
.ci-field textarea { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); resize: vertical; }
.ci-error { display: block; margin-top: 4px; font-size: 13px; color: var(--red); }
.ci-remove { max-width: 820px; margin-top: 16px; }
.ci-remove summary { cursor: pointer; min-height: 40px; color: var(--red); font-weight: 600; font-size: 14px; }
.ci-remove form { padding: 8px 0; }
.ci-alert.validation-summary-valid { display: none; }
.ci-history li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ci-detailcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; }
.ci-form .ci-card + .ci-card { margin-top: 16px; }
.ci-form h3 { margin: 8px 0 8px; font: 500 18px/1.3 var(--serif); }
.ci-tight { margin-bottom: 0; align-self: end; }
.ci-jobrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 100px; gap: 0 14px; align-items: end; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.ci-remove-job { display: flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 12px; color: var(--red); font-size: 14px; }
@media (max-width: 600px) { .ci-jobrow { grid-template-columns: minmax(0, 1fr); } }
.ci-taskrow { display: grid; grid-template-columns: minmax(0, 2fr) 110px minmax(0, 2fr) 100px; gap: 0 14px; align-items: end; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.ci-taskcheck { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; margin-bottom: 12px; }
.ci-taskcheck input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.ci-taskcheck > span { display: flex; flex-direction: column; }
.ci-taskrow .ci-error { grid-column: 1 / -1; }
@media (max-width: 700px) { .ci-taskrow { grid-template-columns: minmax(0, 1fr); } }

/* The calendar (A-Calendar): a week of days side by side; stacked on narrow screens. */
.ci-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ci-day { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; border-right: 1px solid var(--line-soft); min-width: 0; min-height: 240px; }
.ci-day:last-child { border-right: none; }
.ci-today { background: var(--foot); }
.ci-dayhead2 { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.ci-event { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border-left: 3px solid var(--green); overflow-wrap: anywhere; }
.ci-kind-firstcall { border-left-color: var(--red); }
.ci-kind-gathering { border-left-color: var(--pill); }
.ci-eventname { font: 500 16px/1.25 var(--serif); color: var(--ink); }
@media (max-width: 1100px) { .ci-week { grid-template-columns: minmax(0, 1fr); } .ci-day { border-right: none; border-bottom: 1px solid var(--line-soft); min-height: 0; } }
.ci-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-table tfoot th { border-top: 1px solid var(--line); text-align: left; }
.ci-table tfoot th.ci-num { text-align: right; }

/* The first call. */
.ci-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }
.ci-stack { flex-direction: column; align-items: stretch; }
.ci-stack label { align-items: flex-start; gap: 10px; }
.ci-stack label > span { display: flex; flex-direction: column; gap: 2px; }
.ci-match { border-color: var(--green); border-width: 2px; }

/* A case's views (overview, arrangement, from the old systems). */
.ci-casetabs { margin: 14px 0 0; }
.ci-inline { display: inline; margin: 0 0 0 8px; }
.ci-wrap { white-space: pre-line; overflow-wrap: anywhere; max-width: 420px; }
.ci-notice { white-space: pre-line; font: 400 17px/1.55 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.ci-clip { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

/* Search: the box in the sidebar, and the search page. */
.ci-sidesearch { margin: 0; padding: 0 4px; }
.ci-sidesearch input { width: 100%; min-height: 40px; padding: 8px 12px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.ci-bigsearch { margin-bottom: 18px; max-width: 640px; }
.ci-bigsearch input { font-size: 17px; }
.ci-tighthead { margin: 0; padding-bottom: 4px; }
section.ci-card.ci-flush + section.ci-card.ci-flush { margin-top: 16px; }
.ci-message { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.ci-message-off .ci-messagetext { color: var(--muted); }
.ci-messagetext { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.ci-corrected { margin: 6px 0 0; font-size: 13px; color: var(--green); font-weight: 600; }
.ci-original, .ci-correct { margin-top: 6px; }
.ci-original summary, .ci-correct summary { cursor: pointer; font-size: 13px; color: var(--green); font-weight: 600; min-height: 32px; }
.ci-correct form { margin-top: 6px; max-width: 720px; }

/* The finance step. */
.ci-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ci-tiles .ci-card + .ci-card { margin-top: 0; }
.ci-tile { display: flex; flex-direction: column; gap: 4px; }
.ci-tile strong { font: 500 30px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.ci-owed { color: var(--red); }
.ci-statement .ci-section th { padding-top: 16px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ci-col .ci-subhead { margin: 18px 0 6px; font: 600 13px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* The daily log. */
.ci-daypill { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; font-weight: 600; }
.ci-addnote { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; margin-bottom: 16px; }
.ci-addnote .ci-grow { flex: 3 1 320px; }
.ci-addnote .ci-field:not(.ci-grow) { flex: 0 1 160px; }
.ci-addnote .ci-btn { margin-bottom: 12px; }
.ci-log { margin: 0; padding: 0; list-style: none; }
.ci-log li { display: flex; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.ci-log li:first-child { border-top: none; }
.ci-logtime { flex: 0 0 72px; font-weight: 600; color: var(--text); }
.ci-logbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ci-kind { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--text); }
.ci-k-note { background: #F3E8C8; color: #614A0C; }
.ci-k-call { background: #E3EDE6; color: var(--green); }
.ci-k-service { background: #DFE7EE; color: #2A4560; }
@media (prefers-color-scheme: dark) { .ci-k-note, .ci-k-call, .ci-k-service { background: var(--line-soft); color: var(--text); } }
@media (max-width: 600px) { .ci-log li { flex-direction: column; gap: 4px; } }
.ci-kind-note { border-left-color: #C9A227; background: var(--card); }
.ci-notelink { color: var(--text); text-decoration: none; }
.ci-notelink:hover { text-decoration: none; border-left-color: var(--green); }

/* Colours for notes (by kind) and funerals (by client firm, else chapel), from one palette, as CJF's old
   calendar tinted whole cards. Each name has a strong colour (labels, edges) and a soft tint (backgrounds);
   a colour always comes with a word, never alone. */
:root {
    --nk-terracotta:#A4452A; --nk-green:#2F7A55; --nk-blue:#2F5F8F; --nk-gold:#8A6A10; --nk-purple:#5E3F86; --nk-grey:#5F665F; --nk-pink:#A33A6B; --nk-white:#6F766F;
    --tn-terracotta:#F7E0D4; --tn-green:#D4EFE4; --tn-blue:#DCEBFA; --tn-gold:#FBF1C7; --tn-purple:#E3DDF5; --tn-grey:#ECEDEA; --tn-pink:#F8DCEB; --tn-white:#FFFFFF;
}
@media (prefers-color-scheme: dark) { :root {
    --nk-terracotta:#E08A6C; --nk-green:#7FC79F; --nk-blue:#8DB4DF; --nk-gold:#D9B54E; --nk-purple:#B79AD6; --nk-grey:#A3A79F; --nk-pink:#E69BC0; --nk-white:#C9CCC6;
    --tn-terracotta:#3A2A24; --tn-green:#1E3229; --tn-blue:#1F2B38; --tn-gold:#353019; --tn-purple:#2C2638; --tn-grey:#2A2D2A; --tn-pink:#38242F; --tn-white:#262A27;
} }
.ci-c-terracotta { --nk: var(--nk-terracotta); --tn: var(--tn-terracotta); } .ci-c-green { --nk: var(--nk-green); --tn: var(--tn-green); }
.ci-c-blue { --nk: var(--nk-blue); --tn: var(--tn-blue); } .ci-c-gold { --nk: var(--nk-gold); --tn: var(--tn-gold); }
.ci-c-purple { --nk: var(--nk-purple); --tn: var(--tn-purple); } .ci-c-grey { --nk: var(--nk-grey); --tn: var(--tn-grey); }
.ci-c-pink { --nk: var(--nk-pink); --tn: var(--tn-pink); } .ci-c-white { --nk: var(--nk-white); --tn: var(--tn-white); }
.ci-chip.ci-kind { background: var(--nk); color: #FFFDF8; }
.ci-event.ci-nk, .ci-event.ci-tint { background: var(--tn); border-left: 4px solid var(--nk); }
.ci-event.ci-kind-note:not(.ci-nk) { background: var(--tn-gold); border-left-color: var(--nk-gold); }
.ci-event.ci-nk .ci-strong { color: var(--nk); }
.ci-event.ci-tint.ci-c-white { border: 1px solid var(--line); border-left: 4px solid var(--line); }
.ci-log li.ci-nk { box-shadow: inset 4px 0 0 var(--nk); padding-left: 10px; background: var(--tn); }
.ci-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--nk); margin-right: 6px; vertical-align: 0; border: 1px solid var(--line); }
.ci-weekfilter { margin-bottom: 14px; }

/* Set up > Notes and colours. */
.ci-kindrow { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.ci-kindrow summary { cursor: pointer; min-height: 36px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ci-kindform { padding-top: 10px; max-width: 820px; }
.ci-order { width: 110px; margin-bottom: 0; }
.ci-check-inline { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }

/* Reports. */
.ci-reportgrid { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ci-reportgrid { grid-template-columns: minmax(0, 1fr); } }
.ci-reportnav { display: flex; flex-direction: column; padding: 10px; }
.ci-reportnav h2 { margin: 0; padding: 12px 12px 6px; font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ci-reportnav a { padding: 10px 12px; border-radius: 10px; color: var(--ink); border-left: 4px solid transparent; }
.ci-reportnav a[aria-current="page"] { background: var(--line-soft); border-left-color: var(--green); font-weight: 600; }
.ci-reportfilter { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
.ci-reportfilter .ci-field { flex: 1 1 160px; }
.ci-reportfilter .ci-btn { margin-bottom: 12px; }
.ci-barcell { width: 45%; }
.ci-bar { height: 12px; min-width: 2px; border-radius: 6px; background: var(--green); }
@media print {
    .ci-side, .ci-noprint { display: none !important; }
    .ci-shell { display: block; } .ci-main { padding: 0; }
    body { background: #fff; } .ci-card { border: none; padding: 8px 0; }
    .ci-reportgrid { display: block; } .ci-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ci-jobs { margin-top: 4px; color: var(--text); }
.ci-cardlinks { display: flex; gap: 12px; margin-top: 4px; }
.ci-cardlinks a, .ci-event .ci-edit { font-weight: 600; margin-left: 0; }

/* Families. */
.ci-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ci-families .ci-card + .ci-card { margin-top: 0; }
.ci-hint { margin: 8px 0; padding: 8px 12px; background: #F3E8C8; border-radius: 10px; font-size: 14px; color: #3F4943; }
@media (prefers-color-scheme: dark) { .ci-hint { background: #353019; color: var(--text); } }
