/* notis, My notis (t-77, decision 0018): the join and sign-in pages, the member's three
 * pages, the "Keep this story" sheet and the ad slots (decision 0019).
 *
 * Botnest tokens only: no colour, face or radius of its own, so dawn and night both hold,
 * by the reader's own setting (notis-theme.css). My notis wears the teal the canvas gave it,
 * --bn-chart-5, mixed toward the text colour wherever it carries words, as the Library
 * does (worlds.css), so it reads at AA. Touch targets are 44px or more.
 */

.mn-page { max-width: 40rem; margin: 0 auto; padding: 18px 0 120px; display: flex; flex-direction: column; gap: 16px; }
.mn-page h1 { font: var(--bn-weight-bold) 2rem/1.1 var(--bn-font-reading); margin: 0; }
.mn-lede { margin: 0; font: var(--bn-weight-regular) 1.0625rem/1.45 var(--bn-font-reading); color: var(--bn-text-2); }
.mn-fine { margin: 0; font-size: 0.875rem; line-height: 1.4; color: var(--bn-text-3); }
.mn-center { text-align: center; }
.pv-text { white-space: pre-line; }
.mn-fine a, .mn-note a { color: var(--bn-link); }
.mn-step { font: var(--bn-weight-bold) 0.8125rem/1 var(--bn-font-ui); color: var(--bn-text-3); }

/* The icon chip the canvas puts beside each promise, and on the sheet. */
.mn-chip { flex: none; width: 40px; height: 40px; border-radius: var(--bn-radius-md); display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bn-chart-5) 16%, var(--bn-surface)); color: color-mix(in srgb, var(--bn-chart-5) 62%, var(--bn-text)); }
.mn-chip--lg { width: 64px; height: 64px; border-radius: var(--bn-radius-lg); }
.mn-perk { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.mn-perk b { display: block; font: var(--bn-weight-bold) 1rem/1.25 var(--bn-font-ui); }
.mn-perk small { display: block; margin-top: 2px; font-size: 0.875rem; line-height: 1.4; color: var(--bn-text-2); }

/* Fields and buttons, 48px tall: the canvas's size, over the 44px floor. */
.mn-form { display: flex; flex-direction: column; gap: 12px; }
.mn-field { display: flex; flex-direction: column; gap: 6px; }
.mn-field label { font: var(--bn-weight-bold) 0.8125rem/1 var(--bn-font-ui); color: var(--bn-text-2); }
.mn-input { height: 48px; box-sizing: border-box; width: 100%; border-radius: var(--bn-radius-md); border: 1px solid var(--bn-border-strong);
  background: var(--bn-surface); color: var(--bn-text); padding: 0 14px; font: var(--bn-weight-regular) 1rem/1 var(--bn-font-ui); }
.mn-input:focus-visible { outline: 2px solid var(--bn-focus-ring); outline-offset: 1px; }
.mn-btn { min-height: 48px; box-sizing: border-box; border-radius: var(--bn-radius-md); display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; font: var(--bn-weight-bold) 1rem/1 var(--bn-font-ui); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  background: var(--bn-action); color: var(--bn-on-action); width: 100%; }
.mn-btn:hover { background: var(--bn-action-hover); }
.mn-btn--quiet { background: transparent; color: var(--bn-text); border-color: var(--bn-border-strong); font-weight: var(--bn-weight-medium); }
.mn-btn--quiet:hover { background: var(--bn-surface-2); }
.mn-btn--danger { background: transparent; color: var(--bn-danger-text); border-color: var(--bn-danger-border); }
.mn-btn--danger:hover { background: var(--bn-danger-subtle); }
.mn-btn[disabled] { opacity: 0.6; cursor: progress; }
.mn-link { color: var(--bn-link); font-weight: var(--bn-weight-bold); }
.mn-error { margin: 0; padding: 12px 14px; border-radius: var(--bn-radius-md); border: 1px solid var(--bn-danger-border);
  background: var(--bn-danger-subtle); color: var(--bn-danger-text); font-size: 0.9375rem; line-height: 1.4; }
.mn-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--bn-radius-md);
  background: var(--bn-surface-2); color: var(--bn-text-2); font-size: 0.875rem; line-height: 1.4; }
.mn-note svg { flex: none; }
/* The field no person sees. Off-screen rather than display:none, which some robots skip. */
.mn-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden].mn-btn, [hidden].mn-note, [hidden].mn-form, .mn-sheet [hidden], .mn-page [hidden],
.mn-sheet[hidden], .bn-sheet-scrim[hidden] { display: none !important; }

/* A member's page, and beside it on a wide screen this month at a glance (the canvas's
   Desktop-mine). The places, Saved, Following and You, are the My notis bar on a phone and
   the header on a wide screen (_bits.html). */
.mn-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 64rem; margin: 0 auto; padding: 0 0 120px; }
.mn-shell .mn-page { padding-bottom: 0; }
.mn-aside { display: none; }
@media (min-width: 841px) {
  .mn-shell { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 24px; }
  .mn-shell .mn-page { max-width: none; margin: 0; padding-top: 0; }
  .mn-aside { display: flex; flex-direction: column; gap: 14px; align-self: start; position: sticky; top: 96px; }
}

/* The saved list, as on the canvas: a swatch in the section's hue, the line, the headline,
   and the bookmark that takes it off the list. */
.mn-rows { list-style: none; margin: 0; padding: 0; }
.mn-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--bn-border); }
.mn-swatch { height: 44px; border-radius: var(--bn-radius-md);
  background: linear-gradient(140deg, var(--beat, var(--bn-chart-2)), color-mix(in srgb, var(--beat, var(--bn-chart-2)) 20%, var(--bn-bg))); }
.mn-row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mn-row-meta { display: flex; align-items: center; gap: 6px; font: var(--bn-weight-bold) 0.75rem/1 var(--bn-font-ui); color: var(--bn-text-2); }
.mn-dot { width: 7px; height: 7px; border-radius: 4px; background: var(--beat, var(--bn-chart-2)); flex: none; }
.mn-row-title { font: var(--bn-weight-bold) 1rem/1.25 var(--bn-font-reading); color: var(--bn-text); text-decoration: none; }
.mn-row-title:hover { text-decoration: underline; }
.mn-icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none;
  border-radius: var(--bn-radius-md); color: color-mix(in srgb, var(--bn-chart-5) 62%, var(--bn-text)); cursor: pointer; }
.mn-icon-btn:hover { background: var(--bn-surface-2); }
.mn-icon-btn svg { fill: currentColor; }
.mn-empty { padding: 18px; border-radius: var(--bn-radius-lg); border: 1px dashed var(--bn-border-strong); color: var(--bn-text-2); line-height: 1.45; }

/* Following: a card per case, the ones with news first. */
.mn-case { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--bn-radius-lg); background: var(--bn-surface);
  border: 1px solid color-mix(in srgb, var(--case-hue, var(--bn-chart-5)) 40%, var(--bn-border)); color: var(--bn-text); text-decoration: none; }
.mn-case:hover { border-color: var(--case-hue, var(--bn-chart-5)); }
.mn-case-head { display: flex; align-items: center; gap: 8px; }
.mn-case-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--case-hue, var(--bn-chart-5)); flex: none; }
.mn-case-name { flex-grow: 1; font: var(--bn-weight-bold) 1.125rem/1.2 var(--bn-font-reading); }
.mn-new { padding: 4px 8px; border-radius: var(--bn-radius-sm); background: var(--bn-success-subtle); color: var(--bn-success-text); font: var(--bn-weight-bold) 0.75rem/1 var(--bn-font-ui); white-space: nowrap; }
.mn-case-meta { font: var(--bn-weight-medium) 0.8125rem/1.2 var(--bn-font-ui); color: var(--bn-text-2); }
.mn-case-latest { font: var(--bn-weight-regular) 0.9375rem/1.35 var(--bn-font-reading); }
.mn-case[data-hue="1"] { --case-hue: var(--bn-chart-5); } .mn-case[data-hue="2"] { --case-hue: var(--bn-chart-3); }
.mn-case[data-hue="3"] { --case-hue: var(--bn-chart-2); } .mn-case[data-hue="4"] { --case-hue: var(--bn-chart-4); }
.mn-case[data-hue="5"] { --case-hue: var(--bn-chart-1); } .mn-case[data-hue="6"] { --case-hue: var(--bn-chart-6); }

/* You: who, the four numbers, badges, reading days, your data. */
.mn-who { display: flex; align-items: center; gap: 14px; }
.mn-avatar { width: 60px; height: 60px; border-radius: 30px; flex: none; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bn-chart-5) 22%, var(--bn-surface)); color: var(--bn-text); font: var(--bn-weight-heavy) 1.375rem/1 var(--bn-font-ui); }
.mn-who-text b { display: block; font: var(--bn-weight-bold) 1.375rem/1.1 var(--bn-font-reading); color: var(--bn-text); }
.mn-who-text span { font-size: 0.875rem; color: var(--bn-text-2); }
.mn-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mn-stat { padding: 14px; border-radius: var(--bn-radius-lg); background: var(--bn-surface); border: 1px solid var(--bn-border); display: flex; flex-direction: column; gap: 6px; }
.mn-stat b { font: var(--bn-weight-heavy) 1.75rem/1 var(--bn-font-ui); font-variant-numeric: tabular-nums; }
.mn-stat span { font-size: 0.8125rem; line-height: 1.3; color: var(--bn-text-2); }
.mn-card { padding: 14px 16px; border-radius: var(--bn-radius-lg); background: var(--bn-surface); border: 1px solid var(--bn-border); display: flex; flex-direction: column; gap: 10px; }
.mn-card h2 { margin: 0; font: var(--bn-weight-bold) 1.0625rem/1.2 var(--bn-font-ui); }
.mn-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 8px; justify-items: center; }
.mn-badges .bn-badge { width: 76px; }
.mn-streak-line { display: flex; align-items: center; gap: 12px; }
.mn-streak-line svg { color: var(--bn-accent-gold); flex: none; }
.mn-streak-line b { display: block; font: var(--bn-weight-heavy) 1.375rem/1 var(--bn-font-ui); }
.mn-streak-line span { font-size: 0.8125rem; color: var(--bn-text-2); }
.mn-days { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; list-style: none; margin: 0; padding: 0; }
.mn-days li { height: 14px; border-radius: var(--bn-radius-xs); background: var(--bn-surface-2); border: 1px solid var(--bn-border-subtle); }
.mn-days li.is-read { background: color-mix(in srgb, var(--bn-chart-5) 70%, var(--bn-surface)); border-color: transparent; }
.mn-switch-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.mn-switch-row h2 { flex-grow: 1; }
.mn-switch-row .bn-switch { min-height: 44px; }
.mn-data-row { min-height: 48px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--bn-border); font: var(--bn-weight-medium) 1rem/1.2 var(--bn-font-ui);
  color: var(--bn-text); text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; padding: 0; cursor: pointer; text-align: left; }
.mn-data-row--danger { color: var(--bn-danger-text); }
.mn-keys { list-style: none; margin: 0; padding: 0; }
.mn-keys li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--bn-border); }
.mn-keys li span { flex-grow: 1; }
.mn-keys small { color: var(--bn-text-3); display: block; }
.mn-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.mn-inline .mn-field { flex: 1 1 12rem; }
.mn-inline .mn-btn { width: auto; }
details.mn-details > summary { min-height: 48px; display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; border-top: 1px solid var(--bn-border);
  font: var(--bn-weight-medium) 1rem/1.2 var(--bn-font-ui); color: var(--bn-text); }
details.mn-details > summary.mn-data-row--danger { color: var(--bn-danger-text); }
details.mn-details > summary::-webkit-details-marker { display: none; }
details.mn-details[open] > summary { margin-bottom: 10px; }

/* The sheet: "Keep this story", for a reader who is not a member (canvas: Bookmark). */
.mn-sheet { max-height: 92vh; overflow-y: auto; }
.mn-sheet-in { display: flex; flex-direction: column; gap: 14px; padding: 4px 20px 28px; max-width: 34rem; margin: 0 auto; width: 100%; box-sizing: border-box; }
.mn-sheet-title { display: flex; align-items: center; gap: 12px; }
.mn-sheet-title h2 { margin: 0; flex-grow: 1; font: var(--bn-weight-bold) 1.375rem/1.15 var(--bn-font-reading); }
.mn-close { width: 44px; height: 44px; border: 0; background: none; color: var(--bn-text-2); border-radius: var(--bn-radius-md); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mn-close:hover { background: var(--bn-surface-2); }
@media (min-width: 841px) {
  .mn-sheet { left: 50%; right: auto; bottom: 50%; width: 30rem; border: 1px solid var(--bn-border); border-radius: var(--bn-radius-xl);
    transform: translate(-50%, 60%); opacity: 0; transition: transform var(--bn-dur-3) var(--bn-ease-io), opacity var(--bn-dur-2) var(--bn-ease); }
  .mn-sheet.is-open { transform: translate(-50%, 50%); opacity: 1; }
  .mn-sheet .bn-sheet-grip-hit { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mn-sheet, .bn-sheet-scrim { transition: none; } }

/* Ad slots (decision 0019). Always labelled, set apart from the story by a rule and a
   quieter surface, never styled as one of ours. */
.ad { margin: 24px 0; padding: 12px 14px 14px; border-radius: var(--bn-radius-lg); border: 1px solid var(--bn-border); background: var(--bn-surface-2);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; color: var(--bn-text); }
.ad-label { font: var(--bn-weight-bold) 0.75rem/1 var(--bn-font-ui); color: var(--bn-text-3); letter-spacing: 0.02em; }
.ad-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; color: inherit; text-decoration: none; min-height: 44px; }
.ad-link:hover .ad-title { text-decoration: underline; }
.ad-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--bn-radius-md); display: block; background: var(--bn-surface-3); }
.ad-words { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-title { font: var(--bn-weight-bold) 1.0625rem/1.25 var(--bn-font-ui); }
.ad-line { font-size: 0.9375rem; line-height: 1.4; color: var(--bn-text-2); }
.ad-by { font-size: 0.8125rem; color: var(--bn-text-3); }
.ad--front { max-width: 46rem; margin-left: auto; margin-right: auto; width: calc(100% - 32px); box-sizing: border-box; }
@media (min-width: 600px) { .ad-link--img { grid-template-columns: 200px minmax(0, 1fr); align-items: center; } .ad--side .ad-link--img { grid-template-columns: minmax(0, 1fr); } }
.ad--side { margin: 0; }
@media (max-width: 840px) { .ad--side { display: none; } }
