/* Settings -> What GOS remembers (#/settings/memory) and its link card in Settings. Uses the tokens and classes from
   styles.css; only the bits it needs on top. Mobile first (390), wider from 760 and 1100. */
.mem-link { display: grid; gap: .75rem; padding: .9rem 0 .2rem; }
.mem-link p { color: var(--ink-2); max-width: 62ch; }
.mem-link .btn { justify-self: start; }

.mem-back { margin: 0 0 .4rem; font-weight: 700; font-size: .92rem; }
.mem-back a { text-decoration: none; }
.mem-back a:hover { text-decoration: underline; }

/* the questions GOS is asking: the one place on the page with a coloured edge */
.mem-pending { margin-top: 1.4rem; }
.mem-pending > .fineprint { margin: .45rem 0 .2rem; }
.mem-asks { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .7rem; }
.mem-ask { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: var(--r-sm); padding: .95rem 1rem .85rem; box-shadow: var(--shadow); }
.mem-q { font-size: 1.1rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.005em; margin-bottom: .3rem; overflow-wrap: anywhere; }
.mem-ask .row-actions { margin-top: .65rem; }

.mem-form { margin-top: .9rem; }
.mem-hint { margin-top: .35rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; justify-content: space-between; }
.mem-left { white-space: nowrap; }
.mem-form .err:empty { display: none; }
.mem-form .err { grid-column: 1 / -1; }

.mem-tools { display: grid; gap: .3rem; margin-top: .9rem; }
.mem-tools .seg { margin: .2rem 0 .1rem; }
.mem-count { min-height: 1.2em; margin-top: .2rem; }

.mem-group { margin-top: 1.2rem; }
.mem-ghead { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: center; justify-content: space-between; padding-bottom: .35rem; border-bottom: 1px solid var(--line-2); }
.mem-ghead h3 { font-size: 1rem; font-weight: 800; }
.mem-gtools { display: flex; flex-wrap: wrap; gap: .2rem; }
.mem-list { list-style: none; margin: 0; padding: 0; }
.mem-item { display: grid; grid-template-columns: 1fr; gap: .35rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.mem-text { font-weight: 600; overflow-wrap: anywhere; }
.mem-main .fineprint { margin-top: .15rem; }
.mem-acts { display: flex; gap: .2rem; margin-left: -.8rem; }
/* row-level Delete stays quiet (red text only) until hovered or focused; the group's Forget keeps its outline */
.mem .mem-acts .btn.danger { border-color: transparent; }
.mem .mem-acts .btn.danger:hover, .mem .mem-acts .btn.danger:focus-visible { border-color: var(--bad); }
.mem-item.is-expired .mem-text { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.mem-item.editing { background: var(--sunk); margin: 0 -.75rem; padding: .85rem .75rem; border-radius: var(--r-sm); }
.mem-edit { display: grid; gap: .45rem; }
.mem-edit label { margin-bottom: 0; }
.mem-edit-row { display: grid; gap: .5rem; grid-template-columns: 1fr; }
.mem-edit .err:empty { display: none; }
.mem-edit .row-actions { margin-top: .2rem; }

.mem-facts { margin: .8rem 0 0; padding-left: 1.1rem; color: var(--ink-2); display: grid; gap: .35rem; max-width: 70ch; }
.mem .state.empty { margin-top: .8rem; }
.ct-erase { margin: .25rem 0 0 -.8rem; }

@media (min-width: 760px) {
  .mem-form { grid-template-columns: 1fr 1fr 12rem; }
  .mem-tools { grid-template-columns: minmax(16rem, 26rem) 1fr; align-items: end; gap: 1rem; }
  .mem-tools .seg { justify-content: flex-end; margin-bottom: .05rem; }
  .mem-item { grid-template-columns: 1fr auto; align-items: center; gap: 1rem; }
  .mem-acts { margin-left: 0; }
  .mem-edit-row { grid-template-columns: 12rem 12rem; }
  .mem-asks { grid-template-columns: 1fr 1fr; }
  .mem-ask { display: flex; flex-direction: column; }
  .mem-ask .row-actions { margin-top: auto; padding-top: .65rem; }
}
@media (min-width: 1100px) { .mem-asks { grid-template-columns: repeat(3, 1fr); } }
