/* Classic Mac OS 8/9 "Platinum" skin. Loads after styles.css; layout stays there.
   Rules here beat styles.css's phone block at equal specificity, so every desktop size that
   phones must not get is restated in the phone block at the end of this file. */
:root {
  --platinum: #dddddd;
  --platinum-dark: #888888;
  --platinum-text-off: #6b6b6b;
  --mac-highlight: #3b3bc4;
  /* Pinstripes: a grey groove over a white highlight, every 2px. */
  --pinstripes: repeating-linear-gradient(180deg, #999999 0 1px, #ffffff 1px 2px);
}

/* Windows: 1px black outline, white top-left and grey bottom-right bevel, small hard shadow. */
.os-window {
  padding: 0 5px 5px;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px var(--platinum-dark),
    2px 2px 0 #00000059;
}

/* Title bar: close box | centred title | collapse and zoom boxes.
   A three-column grid keeps the title centred on the window, not between the boxes. */
.titlebar,
.arcade-toolbar {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  gap: 0;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
  background: transparent;
  color: #000;
}
.titlebar {
  margin: 0 -4px;
}
.titlebar > .os-button,
.arcade-toolbar > .os-button {
  justify-self: start;
}
.titlebar > .controls {
  justify-self: end;
}
/* Only the front window (and the game window) gets pinstripes. They are painted in the content
   box, so they stop at the bar's side padding; the title and boxes cover them with platinum. */
.os-window.is-front > .titlebar {
  background-image: var(--pinstripes);
  background-size: 100% 12px;
  background-position: 0 50%;
  background-repeat: no-repeat;
  background-origin: content-box;
  background-clip: content-box;
}
.window-title,
.popup .window-title,
.arcade-toolbar span {
  justify-self: center;
  grid-column: 2;
  gap: 5px;
  padding: 0 7px;
  background: var(--platinum);
  color: #000;
  /* DM Sans Bold, not Pixelify: Pixelify's capital C reads as an O ("Oontact.app"). */
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0;
}
.os-window:not(.is-front) .window-title {
  color: var(--platinum-text-off);
}
.os-window:not(.is-front) > .titlebar .os-button svg,
.os-window:not(.is-front) .window-title svg {
  opacity: 0.45;
}
.window-title svg {
  height: 15px;
  width: 13px;
}
.controls {
  gap: 7px;
  background: var(--platinum);
}

/* Boxes: the glyph carries the bevelled square; the button is a platinum pad around it,
   which also keeps the pinstripes 2px clear of each box. */
.os-button,
.arcade-toolbar .os-button {
  width: 17px;
  height: 17px;
  padding: 2px;
  background: var(--platinum);
  box-shadow: none;
  border: 0;
}
/* The glyph stays 13px on phones too: whole device pixels per glyph pixel keep the lines crisp. */
.os-button svg,
.arcade-toolbar .os-button svg {
  width: 13px;
  height: 13px;
  display: block;
  shape-rendering: crispEdges;
}
.os-button:active {
  transform: none;
  box-shadow: none;
  filter: invert(1);
}
.os-button:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: 0;
}

/* Content wells sit in the frame: black line with a grey/white bevel just outside it. */
.main-content {
  margin-top: 3px;
  border: 1px solid #000;
  box-shadow:
    -1px -1px 0 var(--platinum-dark),
    1px 1px 0 #fff;
}
.pop-body {
  margin-top: 3px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px #000,
    -1px -1px 0 var(--platinum-dark),
    1px 1px 0 #fff;
}

/* Push buttons inside windows */
.popup .pop-body .retro-button {
  border: 1px solid #000;
  border-radius: 5px;
  background: linear-gradient(#ffffff, #d4d4d4);
  box-shadow:
    inset 1px 1px #fff,
    inset -1px -1px #a0a0a0;
  color: #000;
}
.popup .pop-body .retro-button:active {
  background: linear-gradient(#bdbdbd, #e2e2e2);
  box-shadow:
    inset 1px 1px #8a8a8a,
    inset -1px -1px #f2f2f2;
  transform: none;
}
.popup .pop-body .retro-button:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: 2px;
}

/* Restore tabs: Platinum tabs standing on the bottom edge of the screen. */
.task-dock {
  bottom: 0;
}
.task-button {
  background: var(--platinum);
  border: 1px solid #000;
  border-bottom-width: 0;
  border-radius: 7px 7px 0 0;
  box-shadow:
    inset 1px 1px #fff,
    inset -1px 0 var(--platinum-dark),
    2px 0 0 #00000040;
  color: #000;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.task-button:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: -4px;
}
.task-button:active {
  background: #c4c4c4;
  box-shadow: inset 1px 1px var(--platinum-dark);
}

/* Game window: the board's border becomes the Platinum frame; the canvas size is unchanged. */
/* 3px of the frame is the board's own border; the shadow adds 2px more platinum outside it,
   so the frame matches the 5px window frames without narrowing the canvas. */
.arcade-board {
  border: 3px solid var(--platinum);
  border-top-width: 0;
  box-shadow:
    0 0 0 2px var(--platinum),
    0 0 0 3px #000,
    2px 2px 0 3px #00000059;
}
.arcade-toolbar {
  padding: 0 3px;
  font-size: 15px;
  background-color: var(--platinum);
}
/* Active game window (nothing in front of it): pinstripes in the content box plus a solid
   layer that fills the side padding the clipped stripes leave empty. */
.secret-arcade:not(.is-back) .arcade-toolbar {
  background-image: var(--pinstripes), linear-gradient(var(--platinum), var(--platinum));
  background-size:
    100% 12px,
    100% 100%;
  background-position: 0 50%;
  background-repeat: no-repeat;
  background-origin: content-box, border-box;
  background-clip: content-box, border-box;
}
.secret-arcade.is-back .arcade-toolbar span {
  color: var(--platinum-text-off);
}
.secret-arcade.is-back .arcade-toolbar .os-button svg {
  opacity: 0.45;
}
.arcade-hud {
  box-shadow: inset 0 1px #000;
}
/* The overlay must start where the HUD ends: toolbar height + HUD height
   (desktop 22 + 41 = 63px, phones 52 + 36 = 88px). Change these with either height. */
.game-overlay {
  inset: 63px 0 0;
}

/* Desktop icon labels: Mac-style plates, DM Sans Bold (Pixelify's capital C reads as an O).
   Selected (window open) or keyboard-focused labels invert to white on black. */
.shortcut span,
.arcade-reopen span {
  padding: 1px 5px 2px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
  background: #fff;
  color: #000;
  text-shadow: none;
  line-height: 1.15;
}
.shortcut[aria-expanded='true'] span,
.shortcut:focus-visible span,
.arcade-reopen:focus-visible span {
  background: #000;
  color: #fff;
}
/* No tinted box behind the icon: hover outlines the plate, selection is the inverted plate. */
.shortcut:hover,
.shortcut[aria-expanded='true'],
.arcade-reopen:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.shortcut:hover span,
.arcade-reopen:hover span {
  outline: 1px solid #000;
}
/* A black outline vanishes on a black (selected) plate. */
.shortcut[aria-expanded='true']:hover span {
  outline-color: #888;
}
/* Keyboard focus: the inverted plate plus a two-tone ring (black, white, black) on the plate,
   readable on the day sky, the night sky and a selected plate. It replaces the yellow dashed
   ring around the whole, otherwise invisible, button box. */
.shortcut:focus-visible,
.arcade-reopen:focus-visible {
  outline: none;
}
.shortcut:focus-visible span,
.shortcut[aria-expanded='true']:focus-visible span,
.arcade-reopen:focus-visible span {
  outline: 2px solid #fff;
  outline-offset: 1px;
  box-shadow:
    0 0 0 1px #000,
    0 0 0 5px #000;
}
/* Tablet widths: the 88px shortcut column is narrower than a 13px Contact.app plate. */
@media (max-width: 1000px) and (min-width: 701px) {
  .shortcut span {
    font-size: 12px;
    padding: 1px 3px 2px;
  }
}
/* Windows high contrast: keep the selected plate distinct from the others. */
@media (forced-colors: active) {
  .shortcut[aria-expanded='true'] span {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
}

/* Menu bar: Platinum strip above the desktop. The desktop gets shorter by the bar height, so
   bar plus desktop fill exactly one screen; positions inside the desktop are unchanged relative
   to it. Sticky, so it stays on top when a short phone page scrolls. */
:root {
  --menubar-h: 24px;
}
.menubar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: var(--menubar-h);
  padding: 0 10px 0 6px;
  background: var(--platinum);
  /* White top highlight and black bottom edge as inset shadows, not a border, so the menu
     titles get the full bar height (a 44px target on phones). */
  box-shadow:
    inset 0 1px #fff,
    inset 0 -1px #000;
  color: #000;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.menu-titles {
  display: flex;
  height: 100%;
}
.menu-title {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #000;
}
.menu-title[aria-expanded='true'] {
  background: var(--mac-highlight);
  box-shadow: inset 0 -1px #000;
  color: #fff;
}
/* A thin inset ring instead of the global yellow dashed one, which would spill out of a 24px bar. */
.menu-title:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: -2px;
}
/* The pineapple is a one-colour silhouette (#pine-silhouette, fill currentColor), so it takes
   the .menu-title colours: black on the bar, white while its menu is open (system colours in
   high contrast). */
.menu-pineapple svg {
  display: block;
  width: 16px;
  height: 20px;
}
.menu-clock {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
/* styles.css sets 100svh and a 740px (580px on short screens) floor; both lose the bar height. */
.desktop {
  height: calc(100svh - var(--menubar-h));
  min-height: calc(740px - var(--menubar-h));
}
@media (max-height: 720px) and (min-width: 701px) {
  .desktop {
    min-height: calc(580px - var(--menubar-h));
  }
}
/* High contrast drops box shadows, so the bottom edge becomes a real border there. The bar grows
   by that 1px and overlaps the desktop by it, keeping 44px phone targets and the page height. */
@media (forced-colors: active) {
  .menubar {
    height: calc(var(--menubar-h) + 1px);
    margin-bottom: -1px;
    border-bottom: 1px solid CanvasText;
  }
}

/* Menus: one shared panel under the open title, rendered from the `menus` data in app.js. */
/* An open title is already --mac-highlight, so its keyboard ring is white with a black inner
   line instead. */
.menu-title[aria-expanded='true']:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 3px #000;
}
.menu-panel {
  position: absolute;
  top: 100%;
  min-width: 210px;
  padding: 3px 0;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow:
    inset 1px 1px #fff,
    2px 2px 0 #00000059;
}
.menu-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 3px 20px;
  border: 0;
  background: transparent;
  color: #000;
  text-align: left;
  white-space: nowrap;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--mac-highlight);
  color: #fff;
  outline: none;
}
.menu-item[aria-disabled='true'],
.menu-item[aria-disabled='true']:hover {
  background: transparent;
  color: var(--platinum-text-off);
  cursor: default;
}
/* A disabled item can take keyboard focus but is never highlighted; a dotted ring shows where
   focus is. */
.menu-item[aria-disabled='true']:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -3px;
}
/* Empty alt text: aria-checked already tells screen readers, so the mark stays out of the name. */
.menu-item[aria-checked='true']::before {
  content: '\2713';
  content: '\2713' / '';
  position: absolute;
  left: 6px;
}
.menu-sep {
  height: 1px;
  margin: 3px 1px;
  background: var(--platinum-dark);
  box-shadow: 0 1px #fff;
}
/* High contrast: system highlight colours for the open title and the current item; the
   separator becomes a border, because forced colours repaint backgrounds as Canvas. */
@media (forced-colors: active) {
  .menu-title[aria-expanded='true'],
  .menu-item:hover,
  .menu-item:focus-visible {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  .menu-title[aria-expanded='true']:focus-visible {
    outline-color: HighlightText;
    box-shadow: none;
  }
  .menu-item:focus-visible {
    outline: 2px solid HighlightText;
    outline-offset: -3px;
  }
  .menu-item[aria-disabled='true'],
  .menu-item[aria-disabled='true']:hover,
  .menu-item[aria-disabled='true']:focus-visible {
    background: Canvas;
    color: GrayText;
  }
  .menu-item[aria-disabled='true']:focus-visible {
    outline: 1px dotted CanvasText;
  }
  .menu-sep {
    height: 0;
    border-top: 1px solid CanvasText;
  }
}

/* Phones: 44px targets and the taller title bars. Rules above that phones share (bar padding,
   13px glyphs, restore tabs on the bottom edge) already beat styles.css's phone block,
   because this file loads later; only phone-specific values are restated here. */
@media (max-width: 700px), (max-width: 1000px) and (hover: none) and (pointer: coarse) {
  .titlebar,
  .arcade-toolbar {
    height: 52px;
    min-height: 52px;
  }
  .os-window.is-front > .titlebar {
    background-size: 100% 16px;
  }
  .secret-arcade:not(.is-back) .arcade-toolbar {
    background-size:
      100% 16px,
      100% 100%;
  }
  /* The big touch pads are transparent so the stripes run up to the glyph; the glyph keeps a
     2px platinum ring, as on desktop. */
  .controls {
    gap: 0;
    background: transparent;
  }
  .os-button,
  .arcade-toolbar .os-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: transparent;
  }
  .os-button svg,
  .arcade-toolbar .os-button svg {
    background: var(--platinum);
    box-shadow: 0 0 0 2px var(--platinum);
  }
  /* Each glyph sits at the outer edge of its pad, 2px in, like desktop, so no stripes appear
     between a box and the frame; the rest of the 44px pad shows the stripes. */
  .titlebar > .os-button,
  .arcade-toolbar > .os-button {
    place-items: center start;
    padding-left: 2px;
  }
  .controls .os-button {
    place-items: center end;
    padding-right: 2px;
  }
  .os-button:focus-visible {
    outline: none;
  }
  .os-button:focus-visible svg {
    outline: 2px solid var(--mac-highlight);
    outline-offset: 2px;
  }
  .window-title,
  .popup .window-title,
  .arcade-toolbar span {
    font-size: 15px;
    padding: 0 8px;
  }
  .game-overlay {
    inset: 88px 0 0;
  }
  /* Menu bar: 44px tall, pineapple and clock only. The phone layout keeps its 740px floor. */
  :root {
    --menubar-h: 44px;
  }
  .menubar {
    padding: 0 12px 0 4px;
    font-size: 15px;
  }
  .menu-title:not(.menu-pineapple) {
    display: none;
  }
  .menu-title {
    min-width: 44px;
    padding: 0 12px;
  }
  /* 1px bottom margin: centres the odd 25px height on a whole pixel in the 44px bar. */
  .menu-pineapple svg {
    width: 20px;
    height: 25px;
    margin-bottom: 1px;
  }
  /* The merged pineapple menu spans the screen and scrolls inside when it is taller than the
     space under the stuck bar (320x640 phones). */
  .menu-panel {
    left: 0 !important;
    right: 0;
    max-height: calc(100svh - var(--menubar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .menu-item {
    min-height: 44px;
    padding: 10px 28px;
    font-size: 16px;
  }
  .menu-item[aria-checked='true']::before {
    left: 10px;
  }
  /* The desktop height rule above already uses the 44px bar; only the 740px floor is restated,
     because the desktop rule above would lower it. */
  .desktop {
    min-height: 740px;
  }
  /* Four labels share one row on phones; smaller plates keep them apart. */
  .shortcut span,
  .arcade-reopen span {
    font-size: 12px;
    padding: 1px 3px 2px;
  }
}
@media (max-width: 360px) {
  .shortcut span,
  .arcade-reopen span {
    font-size: 11px;
    padding: 1px 2px 2px;
  }
}

/* Services.md: service names with Mac help-balloon tooltips (see the tooltip code in app.js). */
.service-list {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
/* The item is as wide as its name, so hovering the name or its tooltip keeps the tooltip open. */
.service-list li {
  position: relative;
  max-width: 100%;
}
.service-tip {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline dotted 2px;
  text-underline-offset: 4px;
  cursor: help;
}
.service-tip:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: 2px;
}
/* In one column beside the names, so it never covers them; app.js places it on open (left,
   top, max-width) or moves it below the name (.is-below) when the screen has no room. Nothing
   between the window and the desktop clips overflow on desktop, so it shows in full. */
.tooltip {
  display: block;
  position: absolute;
  z-index: 5;
  top: 50%;
  left: calc(100% + 14px);
  transform: translateY(-50%);
  width: max-content;
  max-width: 300px;
  padding: 8px 10px;
  background: #ffffcc;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 #00000059;
  color: #000;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}
/* Hit area from the name to the column (width set by app.js as --bridge), so the pointer can move
   onto the tooltip without it closing. It is as tall as the name, so it never covers other names. */
.service-list li.has-tip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: var(--bridge, 0);
}
/* No room beside the names (narrow desktop windows, e.g. 768px): the tooltip opens in the flow
   below its name, like on phones, so it pushes the names below down instead of covering them. */
.tooltip.is-below {
  position: static;
  width: auto;
  max-width: none;
  margin: 4px 0 8px;
  transform: none;
}
/* Maximized Services: the names grow with the window. */
.popup.maximized .service-tip {
  font-size: clamp(20px, 2vw, 28px);
}
@media (forced-colors: active) {
  .tooltip {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
  }
}

/* About.md: pixel person icon in the Connect on LinkedIn button. */
.popup .pop-body .linkedin-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.linkedin-button svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* Phones: names are 44px targets and the tooltip opens in the flow below its name, inside the
   window's scrolling body (an absolute balloon would be clipped there). */
@media (max-width: 700px), (max-width: 1000px) and (hover: none) and (pointer: coarse) {
  .service-list {
    gap: 2px;
    justify-items: stretch;
  }
  .service-tip {
    min-height: 44px;
    font-size: 18px;
  }
  .tooltip,
  .tooltip.is-below {
    position: static;
    width: auto;
    max-width: none;
    margin: 2px 0 8px;
    transform: none;
    box-shadow: none;
  }
  .service-list li.has-tip::after {
    content: none;
  }
  .popup.maximized .service-tip {
    font-size: 18px;
  }
}

/* About.md carries the longest copy: maximized, its text grows less than the other windows'
   and the body padding follows the screen height, so the buttons stay inside on short screens;
   on very short screens its body scrolls instead of pushing the buttons out of the window. */
.popup.about-window.maximized .pop-body {
  padding: clamp(24px, 5vh, 70px) clamp(24px, 6vw, 100px);
  overflow-y: auto;
  justify-content: safe center;
}
.popup.about-window.maximized .pop-body p {
  font-size: clamp(17px, min(1.7vw, 2.7vh), 26px);
}
/* Narrow desktops: the maximized About keeps the normal two-column proportions. */
@media (max-width: 1000px) and (min-width: 701px) {
  .popup.about-window.maximized .about-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 28px;
  }
  .popup.about-window.maximized .about-portrait {
    height: min(250px, 40vh);
  }
}

/* Contact.app: Platinum form. Text fields are white wells with a black line and a grey inner
   bevel; the window body scrolls when the form is taller than the screen allows. */
.popup.contact-window {
  max-height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
}
.popup.contact-window .pop-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  justify-content: flex-start;
  padding: 28px 34px 30px;
}
.popup.contact-window .pop-body h2 {
  margin-bottom: 10px;
}
.popup.contact-window .pop-body > p:not(#contact-status) {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 18px;
}
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  /* A label that wraps (the source question) keeps its field level with its neighbour. */
  align-items: end;
  width: 100%;
}
.form-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.field-message,
.form-actions {
  grid-column: 1 / -1;
}
.form-field label {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
}
.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
}
.field-optional {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #6b6b6b;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-shadow:
    inset 1px 1px 0 #a0a0a0,
    -1px -1px 0 var(--platinum-dark);
  color: #000;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
}
.contact-form textarea {
  min-height: 92px;
  resize: vertical;
}
/* A Platinum pop-up menu: the field look plus a small black arrow. */
.contact-form select {
  appearance: none;
  padding-right: 28px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h9v1H0zM1 1h7v1H1zM2 2h5v1H2zM3 3h3v1H3zM4 4h1v1H4z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
}
.contact-form select:invalid {
  color: #6b6b6b;
}
.contact-form option {
  color: #000;
}
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: 1px;
}
/* Present in the markup for bots, out of sight and out of reach for people and assistive tech
   (visibility: hidden also drops it from the tab order and the accessibility tree). */
.form-pot {
  position: absolute;
  left: -10000px;
  visibility: hidden;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.popup .pop-body .contact-form .retro-button {
  min-width: 96px;
  margin-top: 0;
}
.popup .pop-body .contact-form .retro-button:disabled {
  color: #6b6b6b;
}
.popup .pop-body p.form-privacy {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}
.form-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
}
.popup .pop-body #contact-status {
  margin: 0;
  max-width: none;
  font-size: 16px;
  line-height: 1.45;
}
.popup .pop-body #contact-status:not(:empty) {
  margin-top: 16px;
}
.popup .pop-body #contact-status:not(:empty) {
  font-weight: 700;
}
.popup .pop-body .form-done {
  margin: 0;
}
.popup .pop-body .form-done:focus {
  outline: none;
}
.popup .pop-body #contact-status:focus {
  outline: none;
}
.popup .pop-body .form-result .retro-button {
  margin-top: 0;
}
/* Maximized: the form keeps a readable width and the body scrolls instead of growing type. */
.popup.contact-window.maximized .pop-body {
  justify-content: safe center;
  padding: clamp(24px, 5vh, 60px) clamp(24px, 6vw, 100px);
}
.popup.contact-window.maximized .pop-body > * {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}
.popup.contact-window.maximized .pop-body > p:not(#contact-status) {
  font-size: clamp(17px, 1.6vw, 22px);
}
.popup.contact-window.maximized .pop-body h2 {
  font-size: clamp(30px, 3.4vw, 48px);
}
@media (forced-colors: active) {
  .contact-form select {
    appearance: auto;
    background-image: none;
  }
}
/* Phones: one column, 44px fields. */
@media (max-width: 700px), (max-width: 1000px) and (hover: none) and (pointer: coarse) {
  .popup.contact-window {
    max-height: 100%;
  }
  .popup.contact-window .pop-body {
    padding: 22px 18px 26px;
  }
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    min-height: 44px;
  }
  .contact-form textarea {
    min-height: 110px;
  }
  .popup .pop-body .contact-form .retro-button,
  .popup .pop-body .form-result .retro-button {
    min-height: 44px;
  }
}

/* Privacy.md: a long read in a normal-size window. Headings and short paragraphs; the body
   scrolls when the text is taller than the screen allows (like Contact.app). */
.popup.privacy-window {
  max-height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
}
.popup.privacy-window .pop-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  justify-content: flex-start;
  padding: 28px 34px 30px;
}
.popup.privacy-window .pop-body h2 {
  margin-bottom: 10px;
}
.popup.privacy-window .pop-body h3 {
  margin: 20px 0 4px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.popup.privacy-window .pop-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  max-width: 60ch;
}
.popup.privacy-window .pop-body p.privacy-updated {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}
/* Links inside running text: underlined in the text colour, the Platinum focus ring. */
.popup .pop-body p a,
.link-button {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.popup .pop-body p a:focus-visible,
.link-button:focus-visible {
  outline: 2px solid var(--mac-highlight);
  outline-offset: 2px;
}
/* Contact.app's Privacy button looks like a link in the privacy line. */
.link-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-weight: 700;
}
/* Maximized: a readable column, the body scrolls instead of growing type. */
.popup.privacy-window.maximized .pop-body {
  justify-content: safe center;
  padding: clamp(24px, 5vh, 60px) clamp(24px, 6vw, 100px);
}
.popup.privacy-window.maximized .pop-body > * {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}
.popup.privacy-window.maximized .pop-body p {
  font-size: clamp(16px, 1.3vw, 19px);
}
.popup.privacy-window.maximized .pop-body p.privacy-updated {
  font-size: 13px;
}
.popup.privacy-window.maximized .pop-body h2 {
  font-size: clamp(30px, 3.4vw, 48px);
}
@media (max-width: 700px), (max-width: 1000px) and (hover: none) and (pointer: coarse) {
  .popup.privacy-window {
    max-height: 100%;
  }
  .popup.privacy-window .pop-body {
    padding: 22px 18px 26px;
  }
  /* A 44px tap target that still sits in the line. */
  .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    vertical-align: middle;
  }
}
