/* For grandmothers (/ejeler/mamalar/): big, calm then / now cards.
   Only what hub.css does not give. Colours come from the hub.css variables,
   so dark mode follows without extra rules. Body class gm-large = the
   "larger text" choice; gm-noscroll while the screenshot card is open. */

.gm-h1 { font-size: 28px; line-height: 1.15; margin: 6px 0 8px; letter-spacing: -.015em; }

/* the letter to the grandmother */
.gm-intro { background: var(--band); border-radius: 22px; padding: 18px 18px 14px; margin: 4px 0 10px; }
.gm-intro h2 { font-size: 21px; margin: 0 0 8px; line-height: 1.25; }
.gm-intro p { margin: 0 0 10px; font-size: 17px; line-height: 1.55; }
.gm-intro .gm-sign { font-style: italic; color: var(--ink-mid); margin: 2px 0 0; }
.gm-mothers { margin: 0 0 4px; }

/* large text + print */
.gm-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 14px 0 6px; }
.gm-tools > * { flex: 1 1 200px; }
.gm-bigwrap { display: inline-flex; flex-direction: column; gap: 4px; }
.gm-bigbtn { width: 100%; }
.gm-bigbtn .gm-a { font-weight: 900; font-size: 21px; line-height: 1; }
/* pressed: olive-d with solid-ink, as .doc .btn2.p1 in hub.css.
   Contrast, 15 px / 800 text: light #FFFFFF on #6F7540 = 4.89:1, dark #1B1512 on #C2C888 = 10.25:1. */
.gm-bigbtn[aria-pressed="true"] { background: var(--olive-d); border-color: var(--olive-d); color: var(--solid-ink); }

/* contents */
.gm-toc ol { list-style: none; margin: 0; padding: 0 16px 12px; display: grid; gap: 6px; }
.gm-toc a {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px;
  font-weight: 700; text-decoration: none; border-top: 1px solid var(--line);
}
.gm-toc li:first-child a { border-top: 0; }
.gm-tocn, .gm-num {
  flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 999px; background: var(--band); color: var(--ink); font-weight: 800; font-size: 13px;
}

/* a card */
.gmcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 16px 16px; margin: 18px 0; scroll-margin-top: 12px;
}
.gm-head { display: flex; gap: 12px; align-items: flex-start; }
.gm-head .gm-num { margin-top: 1px; }
.gm-title { font-size: 22px; line-height: 1.22; margin: 0; letter-spacing: -.01em; }
.gm-part { border-radius: 16px; padding: 12px 14px; margin-top: 10px; }
.gm-part p { margin: 0; font-size: 17px; line-height: 1.5; }
/* labels in ink colours (contrast on every tint, light and dark); the dot carries the colour.
   then: neutral band; now: olive tint; do: calm green (a positive action, never a danger red);
   alert: red, the checker's "now" colour, because every alert line has a "now / at once / 03"
   clause (the checker's amber means "today"). Ink text on --red-bg: 12.58:1 light, 12.62:1 dark;
   ink-mid labels 7.33:1 / 7.90:1. */
.gm-lbl { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mid); }
.gm-lbl::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); }
.gm-then { background: var(--band); }
.gm-then p { color: var(--ink-mid); }
.gm-now { background: var(--tint-o); }
.gm-now .gm-lbl::before { background: var(--olive-d); }
.gm-do { background: var(--green-bg); box-shadow: inset 0 0 0 1px var(--green-line); }
.gm-do .gm-lbl::before { background: var(--green); }
.gm-do p { font-weight: 700; }
.gm-alert { background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red-line); }
.gm-alert p { color: var(--ink); font-weight: 700; }
.gm-alert .gm-lbl::before { background: var(--red-strong); }
/* sources: label + links wrap as whole items; each link is a 48 px tap target */
.gm-src { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; margin: 12px 2px 0; font-size: 13.5px; color: var(--ink-mid); line-height: 1.35; }
.gm-src a {
  color: var(--ink-mid); font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  display: inline-flex; align-items: center; min-height: 48px;
}
.gm-more { margin: 6px 2px 0; }
.gm-more a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 800; color: var(--terracotta-d); text-underline-offset: 3px; }
.gmcard .btnrow { margin-top: 12px; }

/* what stays the same */
.gm-keep { background: var(--tint-o); border-radius: 22px; padding: 18px 16px 12px; margin: 24px 0 10px; }
.gm-keep h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.25; }
.gm-keep > p { margin: 0 0 6px; color: var(--ink-mid); font-size: 16px; }
.gm-keep ul { list-style: none; margin: 4px 0 0; padding: 0; }
.gm-keep li { position: relative; padding: 11px 0 11px 26px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.5; }
.gm-keep li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 11px; height: 11px; border-radius: 50%; background: var(--olive);
}
.gm-keep .gm-src { margin-top: 6px; }

/* the off-ramp */
.gm-worry b { display: block; font-size: 17px; }
.gm-worry p { margin: 6px 0 12px; }
.gm-worry .gm-worry-go { width: 100%; }

/* larger text */
.gm-large .gm-intro p, .gm-large .gm-part p, .gm-large .gm-keep li { font-size: 21px; line-height: 1.5; }
.gm-large .gm-intro h2, .gm-large .gm-keep h2 { font-size: 25px; }
.gm-large .gm-title { font-size: 27px; }
.gm-large .gm-h1 { font-size: 32px; }
.gm-large .gm-lbl { font-size: 14.5px; }
.gm-large .gm-src { font-size: 16px; }
.gm-large .gm-toc a { font-size: 19px; }
.gm-large .gm-worry, .gm-large .gm-worry b { font-size: 19px; }

/* screenshot card (full screen, nothing else in the picture) */
.gm-noscroll { overflow: hidden; }
.gm-shot {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200; overflow-y: auto;
  background: var(--ground); display: flex; flex-direction: column; align-items: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.gm-shot-bar, .gm-shotcard, .gm-shot-row { width: 100%; max-width: 480px; }
.gm-shot-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.gm-shot-hint { font-size: 13.5px; color: var(--ink-mid); }
.gm-shotcard { margin: 6px 0 14px; padding: 24px 22px 18px; border: 3px solid var(--terracotta); }
.gm-shotcard h2 { font-size: 27px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.gm-shot-text { margin: 0; font-size: 22px; line-height: 1.42; font-weight: 700; }
.gm-shot-has-alert .gm-shot-text { font-size: 20px; }
.gm-shot-alert {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--red-bg); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--red-line); font-size: 16px; line-height: 1.4; font-weight: 700;
}
.gm-shot-src { margin: 16px 0 0; font-size: 14px; color: var(--ink-mid); }
.gm-shot-gen { margin: 4px 0 0; font-size: 13px; color: var(--ink-mid); }
.gm-shotcard .brandline img { width: 24px; height: 24px; border-radius: 50%; }
.gm-shot-row { display: flex; }
.gm-shot-row > * { flex: 1; }
@media (max-width: 340px) {
  .gm-shotcard { padding: 20px 16px 16px; }
  .gm-shotcard h2 { font-size: 24px; }
  .gm-shot-text { font-size: 20px; }
  .gm-shot-has-alert .gm-shot-text { font-size: 18px; }
  .gm-shot-alert { font-size: 15px; }
}

@media (min-width: 760px) {
  .gm-h1 { font-size: 36px; margin-top: 4px; }
  .gm-intro { padding: 24px 28px 18px; }
  .gm-intro p { font-size: 18px; }
  .gm-toc ol { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .gm-toc li:nth-child(2) a { border-top: 0; }
  .gmcard { padding: 24px 26px 20px; }
  .gm-title { font-size: 25px; }
  .gm-part p { font-size: 18px; }
  .gm-large .gm-part p, .gm-large .gm-intro p, .gm-large .gm-keep li { font-size: 22px; }
  .gm-large .gm-title { font-size: 29px; }
  .gm-keep { padding: 22px 26px 14px; }
}

/* the booklet: A5, a cover page, then one card per page */
@page { size: A5; margin: 12mm; }
@media print {
  .gm-shot, .gm-toc, .gm-tools { display: none !important; }
  .gm-h1 { font-size: 22pt; }
  .gm-intro { background: #fff; border: 1px solid #999; }
  .gmcard {
    break-before: page; page-break-before: always; break-inside: avoid; page-break-inside: avoid;
    border: 0; border-radius: 0; padding: 0; margin: 0; background: #fff;
  }
  .gm-title { font-size: 18pt; }
  .gm-part { background: #fff !important; border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
  .gm-part p { font-size: 12.5pt; }
  /* the booklet keeps one size, so each card stays on its own A5 page in larger-text mode too */
  .gm-large .gm-part p, .gm-large .gm-intro p, .gm-large .gm-keep li { font-size: 12.5pt; }
  .gm-large .gm-title { font-size: 18pt; }
  .gm-large .gm-h1 { font-size: 22pt; }
  .gm-large .gm-lbl { font-size: 12.5px; }
  .gm-large .gm-src { font-size: 13.5px; }
  .gm-large .gm-worry, .gm-large .gm-worry b { font-size: 14.5px; }
  .gm-large .gm-intro h2, .gm-large .gm-keep h2 { font-size: 21px; }
  .gm-lbl { color: #333; }
  .gm-src, .gm-src a { color: #333; }
  .gm-src a { min-height: 0; }
  .gm-alert { border: 2px solid #777; box-shadow: none; }
  .gm-pfoot { margin-top: 10pt; font-size: 9pt; color: #555; }
  .gm-keep { break-before: page; page-break-before: always; }
  .gm-keep, .gm-worry { background: #fff; border: 1px solid #999; break-inside: avoid; }
  .gm-worry { color: #000; }
  .gm-worry .gm-worry-go { display: none; }
}
