/* PROTOTYPE: the five apps on Andy's computer (contract: .dev/brief-mac-contract.md).
   Content layout only, scoped under .app-<id>. Every control, sidebar item, group, row, button, tag and text style is
   the kit's (css/mac.css, owned by the shell) and is not restyled here; colors come from the kit's tokens.
   Units: 1 px inside the desktop = 1 macOS point. */

/* ---------- shared ---------- */
.mac .app-main {
  /* secondary text that must be read: the label color at 72%, which keeps small text above 4.5:1 in both
     appearances (mac-label-secondary is 3.9:1 on white) */
  --app-secondary: color-mix(in srgb, var(--mac-label-primary) 72%, transparent);
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--mac-label-primary);
}
.mac .app-main :is(h2, h3, p, ol, ul) { margin: 0; }
.mac .app-glyph { flex: none; display: inline-block; vertical-align: -2px; }
.mac .app-ext { margin-left: 2px; vertical-align: 0; opacity: 0.8; }
.mac :is(.app-main, .app-sidebar) .mac-btn .app-ext { width: 11px; height: 11px; }
.mac .app-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0; }

/* Settings-style icon tile: a system color with a white glyph (24×24 glyph scaled to ~68% of the tile) */
.mac .app-tile {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--app-tile-size, 20px); height: var(--app-tile-size, 20px);
  border-radius: calc(var(--app-tile-size, 20px) * 0.225); background: var(--app-tile, var(--system-blue)); color: var(--on-accent);
}
.mac .app-tile svg, .mac .mac-sidebar-item__icon .app-tile svg { width: 68%; height: 68%; }

/* rows: a text stack that takes the room, trailing items after it */
.mac :is(.app-about, .app-contact) .app-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mac :is(.app-about, .app-contact) .app-row__title { overflow-wrap: anywhere; }
.mac :is(.app-about, .app-contact) .app-row__sub { color: var(--app-secondary); overflow-wrap: anywhere; }
.mac :is(.app-about, .app-contact) .app-row__trail { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mac :is(.app-about, .app-contact) .mac-row.app-row--top { align-items: flex-start; }
.mac :is(.app-about, .app-contact) .app-row--top > .app-tile { margin-top: -2px; }
.mac :is(.app-about, .app-contact) .mac-row > .app-tile { margin-right: 2px; }

/* sidebar content (inside the shell's glass sidebar pane) */
.mac .app-sidebar { display: block; }
.mac .app-sidebar .app-side-label { flex: 1 1 auto; }
.mac .app-sidebar .app-side-count {
  flex: none; margin-left: auto; padding-left: 6px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--mac-label-secondary);
}

/* ---------- Records ---------- */
.mac .app-records.app-main { overflow: hidden; }
.mac .app-records__scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 24px 28px; }
.mac .app-records__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.mac .app-records__titles { min-width: 0; }
.mac .app-records__count { margin-top: 2px; color: var(--app-secondary); }

.mac .app-records__controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mac .app-records__controls.is-toolbar .mac-segmented { height: var(--mac-control-large); }
.mac .app-records__search { flex: 0 1 200px; width: 200px; min-width: 120px; padding: 0 4px 0 7px; cursor: text; }
.mac .app-records__controls.is-toolbar .app-records__search { height: var(--mac-control-large); border-radius: var(--radius-capsule); padding: 0 6px 0 10px; }
.mac .app-records__search input::-webkit-search-cancel-button,
.mac .app-records__search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.mac .app-records__search .app-records__loupe { width: 13px; height: 13px; color: var(--mac-label-secondary); }
.mac .app-records__clear {
  appearance: none; -webkit-appearance: none; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mac-label-tertiary); cursor: default;
}
.mac .app-records__clear svg { width: 14px; height: 14px; color: var(--mac-label-tertiary); }
.mac .app-records__clear:hover svg { color: var(--mac-label-secondary); }
.mac .app-records__clear[hidden] { display: none; }

.mac .app-records__grid {
  list-style: none; padding: 0; display: grid; gap: 22px 18px;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
}
.mac .app-records__grid[hidden] { display: none; }
.mac .app-records__cell { min-width: 0; }
.mac .app-records__cell[hidden] { display: none; }
.mac .app-records__item {
  appearance: none; -webkit-appearance: none; display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; border-radius: var(--radius-mac-regular);
  -webkit-tap-highlight-color: transparent;
}
.mac .app-records__art {
  position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-mac-regular); background-color: var(--mac-fill-secondary);
}
.mac .app-records__art::after {      /* a hairline, so a pale cover still has an edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 0.5px var(--separator);
}
.mac .app-records__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mac .app-records__art img[hidden] { display: none; }
.mac .app-records__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--mac-label-secondary); }
.mac .app-records__ph[hidden] { display: none; }
.mac .app-records__ph svg { width: 36%; height: 36%; }
.mac .app-records__title { display: block; margin-top: 8px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mac .app-records__note { display: flex; align-items: center; gap: 4px; margin-top: 1px; color: var(--app-secondary); overflow: hidden; white-space: nowrap; }
.mac .app-records__played { width: 12px; height: 12px; color: var(--system-green); }
.mac .app-records__item:focus-visible { outline: none; }
.mac .app-records__item:focus-visible .app-records__art { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.mac .app-records__item:active .app-records__art::after { background: var(--pressed-overlay); }

.mac .app-records__empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 56px 16px; }
.mac .app-records__empty[hidden] { display: none; }
.mac .app-records__empty-glyph { color: var(--mac-label-tertiary); margin-bottom: 6px; }
.mac .app-records__empty-text { color: var(--app-secondary); margin-bottom: 10px; }

/* phone: the controls sit above the grid, full width; three covers a row */
.mac .app-records.is-narrow .app-records__scroll { padding: 12px 16px 24px; }
.mac .app-records.is-narrow .app-records__head { flex-direction: column; align-items: stretch; margin-bottom: 14px; }
.mac .app-records.is-narrow .app-records__controls { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
.mac .app-records.is-narrow .app-records__search { flex: none; width: 100%; height: var(--mac-control-large); }
.mac .app-records.is-narrow .app-records__search input { font-size: 16px; }   /* no zoom-on-focus on phones */
.mac .app-records.is-narrow .mac-segmented { display: grid; width: 100%; height: var(--mac-control-large); }
.mac .app-records.is-narrow .app-records__grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px 12px; }
/* the phone's Group menu (data/groups.json): a pop-up button over the system's own picker */
.mac .app-records__group { position: relative; display: flex; }
.mac .app-records__group-select {
  appearance: none; -webkit-appearance: none; width: 100%; height: var(--mac-control-large); margin: 0; padding: 0 36px 0 12px;
  border: 0; border-radius: var(--radius-mac-large); background: var(--mac-fill-secondary); color: var(--mac-label-primary);
  font: 500 16px/20px var(--font-sans); letter-spacing: -0.2px; cursor: pointer;   /* 16px: no zoom-on-focus */
}
.mac .app-records__group-select:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.mac .app-records__group-chev {
  position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--mac-label-secondary); pointer-events: none;
}

/* ---------- About Andy ---------- */
.mac .app-about.app-main { overflow: hidden; }
.mac .app-about__scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.mac .app-about__page { outline: none; }
.mac .app-about__content { display: flex; flex-direction: column; gap: 22px; max-width: 660px; margin: 0 auto; padding: 22px 28px 36px; }
.mac .app-about__block { display: flex; flex-direction: column; }
.mac .app-about__block > .mac-group__header { display: flex; align-items: center; gap: 6px; }
.mac .app-about__foot { padding: 6px 10px 0; color: var(--app-secondary); }

.mac .app-about__hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 6px 0 2px; }
.mac .app-about__hero-tile { margin-bottom: 8px; }
.mac .app-about__hero-tile svg { width: 64%; height: 64%; }
.mac .app-about__lede { max-width: 54ch; color: var(--app-secondary); }
.mac .app-about__photo {
  width: 112px; height: 112px; margin-bottom: 10px; border-radius: 50%; object-fit: cover; object-position: 50% 18%;
  background: var(--mac-fill-secondary);
}
.mac .app-about__where { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--app-secondary); }
.mac .app-about__where .app-glyph { width: 13px; height: 13px; }
.mac .app-about__hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.mac .app-about__bio .app-row__text { gap: 8px; }
.mac .app-about__bio .mac-body { max-width: 68ch; }

/* certificates: the three featured badges as cards */
.mac .app-about__badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; }
.mac .app-about__badges > .mac-group { margin-top: 0; }     /* (the kit spaces stacked groups; these sit in a grid) */
.mac .app-about__badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 16px 12px 14px; }
.mac .app-about__badge-img { width: 92px; height: 92px; object-fit: contain; margin-bottom: 8px; }
.mac .app-about__badge-name { max-width: 22ch; }
.mac .app-about__verify { margin-top: auto; }
.mac .app-about__badge .app-row__sub:last-of-type { margin-bottom: 10px; }
/* the other certificates: the certificate itself, landscape in its own proportions, as a sheet of paper on the card */
.mac .app-about__badge-img.app-about__cert-img {
  width: auto; max-width: 100%; height: 104px; margin-bottom: 10px; border-radius: 3px; background: var(--white);
  box-shadow: 0 0 0 0.5px var(--separator), 0 1px 3px rgb(0 0 0 / 0.14);
}

.mac .app-about .app-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.mac .app-about__rec { padding-left: 6px; }
.mac .app-about__rec .app-glyph { width: 13px; height: 13px; }
.mac .app-about__thumb { flex: none; width: 16px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 0.5px var(--separator); }

/* experience: a compact timeline (each role led by its organization's logo tile, a hairline joining them) */
.mac .app-about__timeline { list-style: none; }
.mac .app-about__lead { flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: center; margin-right: 4px; }
.mac .app-about__lead::after {         /* down to 6 px above the next row's tile (row padding 12 + 12) */
  content: ""; flex: 1 1 auto; width: 1px; min-height: 0; margin: 6px 0 -18px; background: var(--separator);
}
.mac .app-about__timeline > li:last-child .app-about__lead::after { display: none; }
.mac .app-about__when { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* organization logo tiles: a white plate (in both appearances, so brand colors read), a hairline edge, the logo contained.
   Two organizations: two smaller plates in a diagonal cascade; the front one covers only the back one's bottom padding. */
.mac .app-about__orgs { position: relative; flex: none; display: block; width: var(--org-size, 36px); height: var(--org-size, 36px); }
.mac .app-about__orgs.is-pair { height: calc(var(--org-tile) * 1.86); }
.mac .app-about__logo {
  position: absolute; left: 0; top: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: var(--org-tile, 36px); height: var(--org-tile, 36px); padding: calc(var(--org-tile, 36px) * 0.14);
  border-radius: calc(var(--org-tile, 36px) * 0.25); background: var(--white); box-shadow: inset 0 0 0 0.5px var(--separator);
}
.mac .app-about__logo + .app-about__logo {     /* the front plate: a ring of the group's ground cuts it out of the back one */
  left: auto; top: auto; right: 0; bottom: 0;
  box-shadow: inset 0 0 0 0.5px var(--separator), 0 0 0 1.5px color-mix(in srgb, var(--mac-window-background) 97%, var(--mac-label-primary));
}
.mac .app-about__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mac .app-about .mac-row > .app-about__orgs { margin-right: 2px; }
.mac .app-about .app-row--top > .app-about__orgs { margin-top: -2px; }     /* as the star tile beside it in Awards */

/* the profile card at the top of the sidebar: aligned with the items below it */
.mac .app-about__me {
  appearance: none; -webkit-appearance: none; display: flex; align-items: center; gap: 10px; width: calc(100% - 20px);
  margin: 0 10px 10px; padding: 6px 8px; border: 0; border-radius: var(--radius-mac-menu-item); background: transparent;
  color: var(--mac-label-primary); font: inherit; text-align: start; cursor: pointer;
}
.mac .app-about__me:hover { background: var(--mac-fill-quaternary); }
.mac .app-about__me:focus-visible { outline-offset: -3px; }
.mac .app-about__me img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--mac-fill-secondary); }
.mac .app-about__me-text { display: flex; flex-direction: column; min-width: 0; }
.mac .app-about__me-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mac .app-about__me-sub { color: var(--mac-label-secondary); }

/* phone: the sections as a scrolling row of segments */
.mac .app-about__pillbar {
  flex: none; overflow-x: auto; overflow-y: hidden; padding: 6px 16px 10px; scrollbar-width: none;
  box-shadow: inset 0 -1px var(--separator);
}
.mac .app-about__pillbar::-webkit-scrollbar { display: none; }
.mac .app-about__pills { width: max-content; height: var(--mac-control-large); }   /* full-width segments; the bar scrolls */
.mac .app-about.is-narrow .app-about__content { padding: 18px 16px 28px; gap: 20px; }
.mac .app-about.is-narrow .app-about__badges { grid-template-columns: 1fr; gap: 10px; }
.mac .app-about.is-narrow .app-about__badge {      /* a phone: badge beside its text, not above it */
  display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: start; text-align: start; padding: 14px;
}
.mac .app-about.is-narrow .app-about__badge > .app-about__badge-img { grid-column: 1; grid-row: 1 / span 6; width: 64px; height: 64px; margin: 0; }
.mac .app-about.is-narrow .app-about__badge > :not(.app-about__badge-img) { grid-column: 2; justify-self: start; max-width: none; }
.mac .app-about.is-narrow .app-about__badge .app-row__sub:last-of-type { margin-bottom: 8px; }
.mac .app-about.is-narrow .app-about__badge--cert { grid-template-columns: 92px minmax(0, 1fr); }
.mac .app-about.is-narrow .app-about__badge--cert > .app-about__cert-img { width: 92px; height: auto; margin-top: 2px; }
.mac .app-about.is-narrow .mac-row__value { max-width: 58%; }

/* ---------- Résumé ---------- */
.mac .app-resume.app-main { overflow: hidden; background: linear-gradient(var(--mac-fill-primary), var(--mac-fill-primary)), var(--mac-window-background); }
.mac .app-resume__canvas {
  flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; outline: none;
  display: flex; flex-direction: column; align-items: center; padding: 24px;
}
.mac .app-resume__sheet { flex: none; }
.mac .app-resume__paper { position: relative; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px var(--separator); }
.mac .app-resume__frame { display: block; border: 0; background: transparent; transform-origin: 0 0; }
.mac .app-resume__wait { margin: auto; color: var(--app-secondary); }
.mac .app-resume__cramped { flex: none; align-self: stretch; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-mac-menu); background: var(--mac-fill-quaternary); }
.mac .app-resume__cramped[hidden] { display: none; }
.mac .app-resume.is-flow .app-resume__canvas { padding: 0; align-items: stretch; }
.mac .app-resume.is-flow .app-resume__sheet, .mac .app-resume.is-flow .app-resume__paper { width: 100%; }
.mac .app-resume.is-flow .app-resume__paper { border-radius: 0; box-shadow: none; }
.mac .app-resume.is-flow .app-resume__cramped { margin: 12px; }
.mac .app-resume.is-foreign .app-resume__frame { width: 100%; height: 100%; }
.mac .app-resume__bar { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px; }
.mac .app-resume__missing { margin: auto; max-width: 420px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.mac .app-resume__missing-glyph { color: var(--mac-label-tertiary); margin-bottom: 4px; }
.mac .app-resume__missing-text { color: var(--app-secondary); }
.mac .app-resume__missing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* ---------- Contact ---------- */
.mac .app-contact.app-main { overflow: auto; overscroll-behavior: contain; outline: none; container: app-contact / inline-size; }
.mac .app-contact__body { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 460px; margin: 0 auto; padding: 26px 24px 28px; }
.mac .app-contact__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.mac .app-contact__photo { width: 96px; height: 96px; margin-bottom: 10px; border-radius: 50%; object-fit: cover; background: var(--mac-fill-secondary); }
.mac .app-contact__headline { max-width: 40ch; color: var(--app-secondary); }
.mac .app-contact .mac-row { padding: 9px 0; }
.mac .app-contact .app-row__text { gap: 1px; }
.mac .app-contact__mail { overflow-wrap: anywhere; }
.mac .app-contact__copy { min-width: 84px; }
.mac .app-contact__copy svg { width: 13px; height: 13px; }
.mac .app-contact__copy.is-done { color: var(--accent); }
.mac .app-contact__foot { text-align: center; color: var(--app-secondary); }
.mac .app-contact.is-narrow .app-contact__body { padding: 20px 16px 24px; }
/* a window wide enough: the photo beside the name, as a contact card, so the card fits the compact window */
@container app-contact (min-width: 500px) {
  .mac .app-contact__body { max-width: 480px; padding-top: 22px; gap: 16px; }
  .mac .app-contact__card {
    display: grid; grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px;
    align-items: center; text-align: start;
  }
  .mac .app-contact__photo { grid-row: 1 / span 2; width: 80px; height: 80px; margin: 0; }
  .mac .app-contact__name { align-self: end; }
  .mac .app-contact__headline { align-self: start; max-width: none; }
}

/* ---------- Terminal: the window body follows the appearance; mono 12/15 ---------- */
.mac .app-terminal.app-main {
  overflow: hidden; background: var(--mac-window-background); color: var(--mac-label-primary);
  font-family: var(--font-mono); font-size: 12px; line-height: 15px; letter-spacing: 0; font-weight: 400;
  container: tm / inline-size;
}
.mac .app-terminal ::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.mac .app-terminal .tm-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 8px 12px; cursor: text; }
.mac .app-terminal .tm-out { display: block; }
.mac .app-terminal .tm-l { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 15px; }
.mac .app-terminal .tm-gap { min-height: 8px; }
.mac .app-terminal .tm-dim, .mac .app-terminal .tm-k, .mac .app-terminal .tm-td-tag { color: var(--app-secondary); }
.mac .app-terminal .tm-err { color: color-mix(in srgb, var(--system-red) 82%, var(--mac-label-primary)); }
.mac .app-terminal .tm-acc { color: var(--link); }
.mac .app-terminal .tm-code, .mac .app-terminal .tm-strong { font-weight: 700; }
.mac .app-terminal .tm-small { font-size: 11px; }
.mac .app-terminal .tm-sub { padding-left: 2ch; }
.mac .app-terminal .tm-cert { margin-top: 4px; }
.mac .app-terminal .tm-prompt { white-space: pre; }
.mac .app-terminal .tm-echo { margin-top: 1px; }
.mac .app-terminal .tm-row { display: flex; align-items: baseline; gap: 1ch; }
.mac .app-terminal .tm-input {
  flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; outline: none; background: transparent;
  font: inherit; letter-spacing: inherit; color: inherit; caret-color: var(--mac-label-primary);
}
.mac .app-terminal.is-narrow .tm-input { font-size: 16px; line-height: 15px; }   /* no zoom-on-focus on phones */
.mac .app-terminal .tm-a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 2px; }
.mac .app-terminal .tm-a:hover { text-decoration-color: var(--link); }
.mac .app-terminal :is(.tm-a, .tm-cmd):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-radius: 2px; }
.mac .app-terminal .tm-cmd {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; font-weight: 700; color: var(--link); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 2px;
}
.mac .app-terminal .tm-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 2ch; }
.mac .app-terminal .tm-k { white-space: nowrap; }
.mac .app-terminal .tm-v { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.mac .app-terminal :is(.tm-help, .tm-apps) .tm-k { color: var(--mac-label-primary); font-weight: 700; }
.mac .app-terminal .tm-hist .tm-k { text-align: right; }
.mac .app-terminal .tm-chips { display: flex; flex-wrap: wrap; gap: 0 2ch; }
.mac .app-terminal .tm-src { display: block; }
.mac .app-terminal .tm-cols { display: flex; flex-wrap: wrap; gap: 0 3ch; }
.mac .app-terminal .tm-ask { margin: 2px 0 1px; padding-left: 1.5ch; box-shadow: inset 2px 0 var(--separator); }
.mac .app-terminal .tm-answer { max-width: 84ch; margin-bottom: 6px; }
.mac .app-terminal .tm-ask .tm-kv { margin-top: 2px; }
.mac .app-terminal .tm-thinking { color: var(--app-secondary); animation: app-tm-pulse 1.3s ease-in-out infinite; }
@keyframes app-tm-pulse { 50% { opacity: 0.35; } }
.mac .app-terminal .tm-table { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 2.5ch; margin: 1px 0 2px; }
.mac .app-terminal .tm-tr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.mac .app-terminal .tm-th { color: var(--app-secondary); font-weight: 700; }
.mac .app-terminal .tm-td-title { white-space: nowrap; }
@container tm (max-width: 600px) {
  .mac .app-terminal .tm-table { grid-template-columns: max-content minmax(0, 1fr); }
  .mac .app-terminal .tm-th span:nth-child(3) { display: none; }
  .mac .app-terminal .tm-tr:not(.tm-th) { padding-bottom: 4px; }
  .mac .app-terminal .tm-td-title { white-space: normal; }
  .mac .app-terminal .tm-td-tag { grid-column: 2; }
}
@container tm (max-width: 440px) {
  .mac .app-terminal .tm-scroll { padding: 4px 8px 12px; }
  .mac .app-terminal :is(.tm-help, .tm-apps) { grid-template-columns: minmax(0, 1fr); }
  .mac .app-terminal :is(.tm-help, .tm-apps) .tm-v { padding-left: 2ch; margin-bottom: 3px; }
  .mac .app-terminal .tm-table { grid-template-columns: minmax(0, 1fr); }
  .mac .app-terminal .tm-th { display: none; }
  .mac .app-terminal :is(.tm-td-title, .tm-td-tag) { grid-column: 1; padding-left: 2ch; }
}

@media (prefers-reduced-motion: reduce) {
  .mac .app-terminal .tm-thinking { animation: none; }
}

/* ---------- phones: the shell's dock floats over the bottom of a full-height window, so every scroller ends with room
   for it (the shell may set --app-dock-reserve to its real height) ---------- */
.mac .app-main.is-narrow { --app-dock-reserve: 76px; }
.mac .app-records.is-narrow .app-records__scroll,
.mac .app-about.is-narrow .app-about__content,
.mac .app-contact.is-narrow .app-contact__body { padding-bottom: calc(24px + var(--app-dock-reserve)); }
.mac .app-resume.is-narrow .app-resume__canvas { padding-bottom: var(--app-dock-reserve); }
.mac .app-terminal.is-narrow .tm-scroll { padding-bottom: calc(12px + var(--app-dock-reserve)); }
