/* The Remi bar's card (SD-40): one card under Today's add box, the facts as short lines, the one way to save first. Buttons, chips
   and fields are the tasks box's own (tasks.css), so the card reads as part of it. */
.sd-remi-card{padding:14px 16px;display:grid;gap:10px}
.sd-remi-part{display:contents}
.sd-remi-kind{margin:0;font-size:13px;font-weight:650;color:var(--accent-ink)}
.sd-remi-main{margin:-6px 0 0;font-size:18px;line-height:1.3;font-weight:700;color:var(--ink);overflow-wrap:anywhere}
.sd-remi-facts{margin:-4px 0 0;padding:0;list-style:none;display:grid;gap:2px;color:var(--muted);font-size:15px;line-height:1.4}
.sd-remi-facts li{overflow-wrap:anywhere}
.sd-remi-ask{display:grid;gap:8px;margin-top:2px}
.sd-remi-q{margin:0;font-size:15px;font-weight:650;color:var(--ink)}
.sd-remi-error{margin:0;color:var(--bad);font-size:14px;font-weight:600}
.sd-remi-error:empty{display:none}
.sd-remi-actions{display:flex;flex-wrap:wrap;gap:8px}
.sd-remi-actions .td-primary{padding:0 16px;text-align:center}
/* A fixed label never splits its words on a narrow phone ("Add it as a task"); one that carries a name ("Open After Roka party",
   "Add to Sharma Caterers") may wrap rather than be cut (review S4). */
.sd-remi-actions .td-primary[data-remi=task]{white-space:nowrap;flex:1 1 auto}
/* Words in a button never split: on a narrow phone the buttons go to a second line instead. */
.sd-remi-actions .td-quiet{flex:1 1 0;display:inline-grid;place-items:center;text-decoration:none;padding:0 10px;overflow-wrap:normal;white-space:nowrap}
.sd-remi-note{margin:-2px 0 0;color:var(--muted);font-size:13px;line-height:1.4}
.sd-remi-more{display:flex;flex-wrap:wrap;align-items:center;gap:0 20px;margin:-6px 0 -8px}
.sd-remi-more .sd-link,.sd-remi-open{min-height:44px;display:inline-flex;align-items:center}
.sd-remi-open{justify-self:start;margin:-6px 0 -8px}
.sd-remi-actions .sd-remi-open.td-primary{display:grid;place-items:center;justify-self:stretch;margin:0;flex:1 1 auto;min-height:48px}
.sd-remi-edit,.sd-remi-retry{justify-self:start;min-height:44px;margin:-8px 0 -6px;padding:0;display:inline-flex;align-items:center}
.sd-remi-news{margin:0;padding:0 0 0 18px;display:grid;gap:8px;color:var(--ink);font-size:15px;line-height:1.45}
.sd-remi-news li{overflow-wrap:anywhere}
.sd-remi-src{display:block;margin-top:2px;color:var(--muted);font-size:13px}
.sd-remi-deeper{display:grid;gap:6px;margin:8px 0 0;padding:0 0 0 12px;border-left:2px solid var(--line)}
.sd-remi-deeper .sd-remi-news{padding-left:16px;font-size:14px}
.sd-remi-answer,.sd-remi-done{margin:0;font-size:16px;line-height:1.45;color:var(--ink);overflow-wrap:anywhere}
/* The card's first line takes focus when it opens, so a screen reader starts there and Tab goes on to its buttons. It is not a
   control, so it shows no ring. */
.sd-remi-kind:focus,.sd-remi-done:focus{outline:none}
@media (prefers-color-scheme:dark){
 html.sd-dark .sd-remi-kind{color:var(--a-plans)}
}
/* Invitation replies (v0.50.0): the counts, the names under each, and a reminder to share as it will be sent. */
.sd-remi-replies{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:15px;line-height:1.45;color:var(--ink)}
.sd-remi-replies li{overflow-wrap:anywhere}.sd-remi-replies strong{font-weight:600}
.sd-remi-names{display:block;margin:2px 0 0;color:var(--muted);font-size:13px;line-height:1.45;overflow-wrap:anywhere}
p.sd-remi-names{margin:-4px 0 0;font-size:14px}
.sd-remi-quote{margin:0;padding:12px 14px;white-space:pre-wrap;border-radius:12px;background:var(--sunk,rgba(0,0,0,.04));color:var(--ink);font-size:15px;line-height:1.5;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
/* What is left for a celebration (SD-50): the open tasks one to a line under To do, a date as Celebrations says it, an overdue
   one in Today's overdue colour. */
.sd-remi-tasks{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:4px;font-size:15px;line-height:1.4}
.sd-remi-tasks li{overflow-wrap:anywhere}
.sd-remi-due{color:var(--muted);font-size:13px;white-space:nowrap}
.sd-remi-due.overdue{color:var(--bad);font-weight:600}
/* Remi's own bar (v0.55.0): right under the greeting, its own place to ask anything, Remi's sparkle on its soft tile, and a short
   conversation under it: what you said on the right, Remi's replies on the left, the live card last. No gradients or glows
   (docs/design-spec.md). */
.sd-remi-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.sd-remi-block{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.sd-remi-block[hidden]{display:none}
.sd-remi-form{display:flex;align-items:flex-end;gap:8px;min-width:0;min-height:54px;box-sizing:border-box;padding:4px 4px 4px 8px;border:1px solid var(--line-strong,var(--line));border-radius:27px;background:var(--paper);transition:border-color .15s ease-out,box-shadow .15s ease-out}
/* The text box shows no ring of its own: the whole bar gets a 2px ring in the accent, so focus is plain to see (review S4). */
.sd-remi-form:focus-within{border-color:var(--accent-ink);box-shadow:0 0 0 1px var(--accent-ink)}
.sd-remi-mark{flex:none;align-self:flex-end;margin-bottom:6px;width:32px;height:32px;border-radius:50%}
.sd-remi-input{flex:1 1 0;width:0;min-width:0;height:44px;max-height:168px;box-sizing:border-box;padding:12px 2px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:16px;line-height:20px;resize:none;overflow-y:auto}
.sd-remi-input:focus{outline:none}
.sd-remi-input::placeholder{color:var(--muted)}
.sd-remi-send{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;cursor:pointer;touch-action:manipulation;transition:transform .08s ease-out}
.sd-remi-send:active{transform:scale(.94)}
.sd-remi-send svg{width:20px;height:20px;stroke-width:2.2}
.sd-remi-send:focus-visible{outline:3px solid var(--accent-ink);outline-offset:2px}
.sd-remi-hint{margin:0;padding:0 14px;font-size:13px;font-weight:600;color:var(--accent-ink);overflow-wrap:anywhere}
.sd-remi-hint:empty{display:none}
.sd-remi-starters{padding:0 2px;gap:6px}
.sd-remi-starters[hidden]{display:none}
.sd-remi-starters .td-chip,.sd-remi-try .td-chip{min-height:40px;padding:0 12px;font-size:14px}
.sd-remi-try{margin-top:2px}
.sd-remi-thread{display:grid;gap:10px}
.sd-remi-thread[hidden]{display:none}
.sd-remi-thread-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px;font-size:12px;font-weight:650;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.sd-remi-thread-tools{display:flex;align-items:center;gap:16px}
.sd-remi-clear,.sd-remi-earlier{min-height:40px;font-size:14px;letter-spacing:0;text-transform:none}
.sd-remi-turn{display:grid;gap:6px}
.sd-remi-you{justify-self:end;max-width:85%;margin:0;padding:9px 14px;border-radius:18px 18px 4px 18px;background:var(--soft);color:var(--ink);font-size:15px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.sd-remi-past{justify-self:start;max-width:92%;box-sizing:border-box;display:grid;gap:4px;padding:10px 14px;border:1px solid var(--line);border-radius:18px 18px 18px 4px;background:var(--paper)}
.sd-remi-past>*{margin:0}
.sd-remi-past .sd-remi-kind{font-size:12px}
.sd-remi-past .sd-remi-main,.sd-remi-past .sd-remi-answer,.sd-remi-past .sd-remi-done{font-size:15px;line-height:1.4}
.sd-remi-past .sd-remi-facts{margin:0;font-size:14px}
.sd-remi-past .td-many-list{margin:0}
.sd-remi-outcome{font-size:13px;color:var(--muted)}
.sd-remi-online{margin:-4px 0 0;font-size:13px;line-height:1.4;color:var(--muted)}
.sd-remi-block .td-many-start{margin-top:-2px}
@media (prefers-reduced-motion:reduce){.sd-remi-form,.sd-remi-send{transition:none}}
@media (prefers-color-scheme:dark){html.sd-dark .sd-remi-hint{color:var(--a-plans)}html.sd-dark .sd-remi-form:focus-within{border-color:var(--a-plans);box-shadow:0 0 0 1px var(--a-plans)}html.sd-dark .sd-remi-send:focus-visible{outline-color:var(--a-plans)}}
