:root {
  --portfolio-blue: #4d83d2;
  --portfolio-dark-blue: #1f4f8e;
}

.skip-link {
  position: fixed;
  left: 8px;
  top: -40px;
  z-index: 300000;
  padding: 5px 10px;
  color: #000;
  background: #fff;
}
.skip-link:focus { top: 4px; }

.availability-dot {
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #27b84b;
  border: 1px solid #087720;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 1px 1px rgba(0,0,0,.22);
}

.boot-mark.boot-portrait {
  width: clamp(104px, 18vh, 164px);
  height: clamp(104px, 18vh, 164px);
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #8b8b8b;
  border-radius: 50%;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.66), 0 7px 18px rgba(0,0,0,.18);
}

.aqua .desktop-icon,
.aqua .dock-item {
  border: 0;
  padding: 0;
  background: transparent;
  background-image: none;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  font: inherit;
}
.aqua .desktop-icon {
  position: absolute;
  display: block;
  width: 84px;
  height: auto;
  color: #fff;
}
.aqua .dock-item {
  position: relative;
  display: flex;
  width: 40px;
  height: auto;
  overflow: visible;
}
.dock .dock-label { display: none !important; }
.desktop-icon:focus-visible span { outline: 2px solid #fff; outline-offset: 1px; }

.desktop.graphite { background-image: url("assets/aqua-graphite.jpg"); }
.desktop.shutting-down::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 199999;
  background: #000;
  animation: portfolio-shutdown .8s ease both;
}
@keyframes portfolio-shutdown { from { opacity: 0; } to { opacity: 1; } }

.shutdown-screen {
  position: fixed;
  inset: 0;
  z-index: 400000;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: #000;
  opacity: 0;
  transition: opacity .8s ease;
  font: 18px "Lucida Grande", sans-serif;
}
.shutdown-screen.visible { opacity: 1; }
.shutdown-screen small { display: block; margin-top: 9px; color: #aaa; font-size: 11px; }

.win {
  min-height: 120px;
  max-width: calc(100vw - 12px);
  max-height: calc(100vh - 78px);
  transition: opacity .16s ease, transform .16s ease;
}
.win.is-minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(70vh) scale(.18);
}
.win.is-zoomed {
  left: 4px !important;
  top: 25px !important;
  width: calc(100vw - 8px) !important;
  height: calc(100vh - 89px) !important;
  max-width: none;
  max-height: none;
}
.win .title-bar { touch-action: none; }
.win .win-content { min-height: 0; }
.win .status-bar { flex: 0 0 auto; }
.win .status-bar .spacer { flex: 1; }
.win .title-bar-controls button:focus-visible { outline: 2px solid #163c77; }

.portfolio-window .win-content { background: #fff; }
.portfolio-window.metal .win-content {
  background: var(--aqua-metal-base) var(--aqua-metal-tile) repeat;
  background-size: var(--aqua-metal-size);
}

.finder-layout {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  height: min(64vh, 570px);
  min-height: 390px;
  background: #fff;
}
.finder-sidebar {
  padding: 10px 8px;
  border-right: 1px solid #b9b9b9;
  background: linear-gradient(90deg, rgba(214,224,237,.94), rgba(234,239,245,.96));
}
.finder-sidebar h3 {
  margin: 8px 8px 3px;
  color: #667486;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.finder-sidebar button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #222;
  font: inherit;
  text-align: left;
}
.aqua .finder-sidebar button,
.aqua .toolbar-icon-button,
.aqua .finder-file,
.aqua .album-button,
.aqua .wallpaper-choice {
  position: relative;
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  background-image: none;
  background-origin: border-box;
  background-clip: border-box;
  image-rendering: auto;
}
.aqua .finder-sidebar button,
.aqua .toolbar-icon-button,
.aqua .finder-file,
.aqua .album-button { background-color: transparent; }
.finder-sidebar button:hover,
.finder-sidebar button[aria-current="page"] { background: rgba(77,131,210,.23); }
.finder-sidebar img { width: 18px; height: 18px; object-fit: contain; }

.finder-main { overflow: auto; min-width: 0; }
.finder-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 5px 10px;
  border-bottom: 1px solid #9e9e9e;
  background: linear-gradient(#fafafa, #dedede);
}
.finder-toolbar .spacer { flex: 1; }
.finder-toolbar input[type="search"] { width: min(190px, 34vw); }
.toolbar-icon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 2px 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  font: 10px var(--aqua-font);
}
.aqua button.toolbar-icon-button:active {
  border: 0;
  background-color: rgba(0,0,0,.12);
  background-image: none;
  box-shadow: none;
}
.toolbar-icon-button img { width: 25px; height: 25px; object-fit: contain; }

.home-panel { padding: 26px 30px 34px; }
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 28px;
}
.profile-copy h1 { margin: 0; font-size: clamp(30px, 5vw, 52px); line-height: 1.02; letter-spacing: -.035em; }
.profile-copy .eyebrow { margin: 0 0 7px; color: #647083; font-size: 13px; }
.profile-copy .role {
  min-height: 38px;
  margin: 8px 0 13px;
  color: #315f9e;
  font-size: 20px;
  font-weight: 700;
}
.profile-copy .role::after { content: "|"; margin-left: 2px; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.profile-copy p { max-width: 54ch; line-height: 1.5; }
.profile-portrait {
  width: 160px;
  height: 160px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #7f7f7f;
  border-radius: 50%;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.68), 0 7px 18px rgba(0,0,0,.18);
}
.profile-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 17px; }
.availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: #2e6639;
  font-size: 11px;
}
.availability i { width: 8px; height: 8px; border-radius: 50%; background: #27b84b; border: 1px solid #087720; }

.finder-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 15px 10px;
  padding: 24px;
}
.aqua button.finder-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 88px;
  padding: 6px;
  border: 0;
  border-radius: 5px;
  background-color: transparent;
  background-image: none;
  background-clip: border-box;
  box-shadow: none;
  image-rendering: auto;
  font: inherit;
}
.aqua button.finder-file:hover,
.aqua button.finder-file:focus,
.aqua button.finder-file:active {
  border: 0;
  background-color: #d9e6fa;
  background-image: none;
  box-shadow: none;
  outline: none;
}
.finder-file img { width: 48px; height: 48px; object-fit: contain; }

.projects-shell { height: min(67vh, 620px); overflow: auto; background: #fff; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 18px;
}
.project-card {
  overflow: hidden;
  border: 1px solid #a9a9a9;
  border-radius: 6px;
  background: #f7f7f7;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.project-card[hidden] { display: none; }
.project-card > img { display: block; width: 100%; height: 128px; object-fit: cover; border-bottom: 1px solid #aaa; }
.project-card > img.project-logo { object-fit: contain; }
.project-logo-dark { background: #111a1e; }
.project-logo-light { background: #faf9f7; }
.project-card-content { padding: 11px 12px 13px; }
.project-card h3 { margin: 0 0 4px; font-size: 15px; }
.project-card p { margin: 7px 0 10px; color: #4f4f4f; font-size: 11px; line-height: 1.45; }
.award { display: inline-block; padding: 1px 6px; border: 1px solid #9b7d21; border-radius: 8px; color: #604c12; background: #fff4b8; font-size: 9px; }

.project-preview .win-content { overflow: hidden; background: #fff; }
.case-study { height: 100%; overflow: auto; color: #252525; background: #fff; }
.case-hero {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(300px, 1.1fr);
  min-height: 225px;
  border-bottom: 1px solid #9b9b9b;
  background: #f5f5f5;
}
.case-hero > img { width: 100%; height: 100%; min-height: 225px; object-fit: cover; }
.case-hero > img.project-logo { object-fit: contain; }
.case-hero-copy { padding: 22px 24px 20px; }
.case-hero-copy .case-kicker { margin: 12px 0 2px; color: #687383; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.case-hero-copy h1 { margin: 0; font-size: clamp(25px, 4vw, 38px); line-height: 1.04; letter-spacing: -.035em; }
.case-hero-copy .case-tagline { margin: 8px 0; color: #25558f; font-size: 14px; font-weight: 700; line-height: 1.35; }
.case-hero-copy > p:last-child { margin: 0; color: #505050; font-size: 11px; line-height: 1.5; }
.case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #aaa; background: linear-gradient(#fafafa, #e6e6e6); }
.case-metrics > div { display: flex; flex-direction: column; align-items: center; padding: 10px 8px; border-right: 1px solid #bbb; text-align: center; }
.case-metrics > div:last-child { border-right: 0; }
.case-metrics strong { color: #234f88; font-size: 18px; line-height: 1; }
.case-metrics span { margin-top: 3px; color: #555; font-size: 9px; }
.case-tabs { padding: 12px 18px 0; background: #efefef; }
.case-panels { padding: 0 18px; background: #efefef; }
.case-panel { min-height: 176px; padding: 17px 19px 20px; border-radius: 0 5px 5px 5px; background: #fff; }
.case-panel[hidden] { display: none; }
.case-panel h2 { margin: 0 0 6px; color: #254f83; font-size: 13px; }
.case-panel p { margin: 0; color: #474747; font-size: 11px; line-height: 1.55; }
.case-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.case-facts { margin: 17px 0 0; border-top: 1px solid #ddd; }
.case-facts > div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding-top: 8px; }
.case-facts dt { color: #666; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.case-facts dd { margin: 0; color: #333; font-size: 10px; line-height: 1.4; }
.case-list { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: #454545; font-size: 11px; line-height: 1.45; }
.case-panel .case-list + h2 { margin-top: 18px; }
.case-stack { padding: 8px 10px; border: 1px solid #c7c7c7; border-radius: 4px; background: #f2f2f2; font-family: Monaco, "Courier New", monospace; }
.case-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; background: #efefef; }
.case-links a { padding: 5px 9px; border: 1px solid #9a9a9a; border-radius: 4px; color: #164d91; background: linear-gradient(#fff, #dedede); font-size: 10px; text-decoration: none; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.case-links a:hover, .case-links a:focus-visible { color: #fff; border-color: #003897; background: linear-gradient(#6ca5f2, #1e65c6); outline: 0; }
.aqua button.case-share {
  min-width: 0;
  height: auto;
  padding: 5px 10px;
  border: 1px solid #003897;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(#6ca5f2, #1e65c6);
  background-image: linear-gradient(#6ca5f2, #1e65c6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 1px rgba(0,0,0,.14);
  font-size: 10px;
  text-shadow: 0 -1px 0 rgba(0,0,0,.28);
}
.aqua button.case-share:active { background-image: linear-gradient(#174f9e, #4e8edc); }

.resume-page { height: min(67vh, 620px); overflow: auto; padding: 20px 24px 30px; background: #fff; }
.resume-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.resume-head h1 { margin: 0; font-size: 25px; }
.resume-head p { margin: 4px 0 0; color: #555; }
.resume-tabs { margin-top: 18px; }
.resume-panel { padding: 17px 4px 0; }
.resume-entry { display: grid; grid-template-columns: 118px 1fr; gap: 17px; padding: 12px 0; border-bottom: 1px solid #ddd; }
.resume-entry:last-child { border-bottom: 0; }
.resume-entry .org { color: #395f93; font-weight: 700; }
.resume-entry h3 { margin: 0 0 4px; font-size: 14px; }
.resume-entry p { margin: 0; color: #555; line-height: 1.45; }
.skill-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; padding: 0; list-style: none; }
.skill-list li { padding: 9px; border: 1px solid #ccc; border-radius: 5px; background: #f5f5f5; }

.music-shell { padding: 16px; }
.now-playing { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; }
.now-playing img { width: 112px; height: 112px; object-fit: cover; border: 1px solid #666; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
.now-playing h2 { margin: 0 0 4px; font-size: 17px; }
.now-playing p { margin: 0 0 12px; color: #555; }
.player-controls { display: flex; align-items: center; gap: 10px; }
.album-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 16px; }
.aqua button.album-button { padding: 2px; border: 1px solid transparent; background: none; }
.aqua button.album-button[aria-pressed="true"] { border-color: #245ba3; background: #81b3ef; }
.album-button img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

.contact-card { padding: 24px; text-align: center; background: #fff; }
.contact-card img { width: 72px; height: 72px; object-fit: contain; border-radius: 50%; border: 1px solid #aaa; }
.contact-card h2 { margin: 10px 0 4px; }
.contact-card p { margin: 5px auto 16px; max-width: 42ch; color: #555; line-height: 1.45; }

.web-shell { background: #fff; }
.address-bar { display: flex; align-items: center; gap: 7px; padding: 7px; border-bottom: 1px solid #aaa; background: linear-gradient(#f8f8f8,#ddd); }
.address-bar input { flex: 1; min-width: 0; }
.bookmarks { padding: 18px; }
.bookmark { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 9px; border-bottom: 1px solid #ddd; }
.bookmark img { width: 32px; height: 32px; object-fit: contain; }
.bookmark h3 { margin: 0 0 2px; font-size: 13px; }
.bookmark p { margin: 0; color: #666; font-size: 10px; }

.terminal-shell {
  height: min(56vh, 430px);
  padding: 12px;
  overflow: auto;
  color: #c7f5c0;
  background: #101712;
  font: 12px/1.55 Monaco, "Courier New", monospace;
}
.terminal-output { white-space: pre-wrap; user-select: text; }
.terminal-line { display: flex; align-items: center; }
.terminal-prompt { color: #7fdcff; white-space: nowrap; }
.terminal-input { flex: 1; min-width: 20px; padding: 0 0 0 7px; border: 0; outline: 0; color: #fff; background: transparent; font: inherit; }

.clock-app { padding: 24px 36px; text-align: center; }
.clock-app .big-time { font-size: 42px; font-weight: 700; letter-spacing: -.04em; }
.clock-app .big-date { margin-top: 3px; color: #555; }

.preferences { padding: 20px; }
.wallpaper-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.aqua button.wallpaper-choice { padding: 5px; border: 2px solid transparent; background: none; }
.aqua button.wallpaper-choice[aria-pressed="true"] { border-color: #3f7ac2; }
.wallpaper-choice img { display: block; width: 150px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wallpaper-choice span { display: block; margin-top: 4px; }

/* Icon tiles use their own selection treatments, never the generic Aqua push-button caps. */
.aqua button.desktop-icon:active,
.aqua button.dock-item:active {
  border: 0;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
.aqua .finder-sidebar button:active {
  border: 0;
  background-color: rgba(77,131,210,.23);
  background-image: none;
  box-shadow: none;
}
.aqua button.album-button:active,
.aqua button.album-button[aria-pressed="true"] {
  background-color: #81b3ef;
  background-image: none;
  box-shadow: none;
}
.aqua button.wallpaper-choice:active,
.aqua button.wallpaper-choice[aria-pressed="true"] {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}
.aqua button.sherlock-result:active {
  color: #fff;
  background-color: #4d83d2;
  background-image: none;
  box-shadow: none;
}
.aqua button.memory-card:active {
  background-color: #245a9e;
  background-image: linear-gradient(145deg,#79c4ff,#1d559d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 1px 2px rgba(0,0,0,.24);
}

/* Expanded PierceOS applications */
.agents-app { height: min(69vh, 650px); display: flex; flex-direction: column; background: #fff; }
.agents-mode { color: #666; font-size: 10px; }
.agents-document {
  flex: 1;
  overflow: auto;
  padding: 28px 36px 54px;
  color: #222;
  background: #fff;
  line-height: 1.52;
  user-select: text;
}
.agents-document > * { max-width: 76ch; margin-left: auto; margin-right: auto; }
.agents-document h2 { margin-top: 26px; margin-bottom: 8px; font-size: 22px; border-bottom: 1px solid #ccc; padding-bottom: 5px; }
.agents-document h3 { margin-top: 22px; margin-bottom: 5px; font-size: 16px; color: #294f80; }
.agents-document h4 { margin-top: 16px; margin-bottom: 4px; font-size: 14px; }
.agents-document p { margin-top: 0; margin-bottom: 10px; }
.agents-document ul { padding-left: 22px; margin-top: 4px; margin-bottom: 15px; }
.agents-document li { margin: 3px 0; }
.agents-document code { padding: 1px 4px; border-radius: 3px; background: #eee; font-family: Monaco, monospace; font-size: 11px; }

.sherlock-app { height: 100%; min-height: 390px; display: flex; flex-direction: column; background: #edf0f5; }
.sherlock-search-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px 11px; border-bottom: 1px solid #a2a7af; background: linear-gradient(#f7f8fa,#d6dbe2); }
.sherlock-search-row > img { width: 48px; height: 48px; object-fit: contain; }
.sherlock-search-row input { flex: 1; min-width: 0; height: 26px; font-size: 14px; }
.sherlock-summary { padding: 6px 16px; color: #5e6878; border-bottom: 1px solid #c5c8cc; font-size: 10px; background: #e8eaf0; }
.sherlock-results { flex: 1; overflow: auto; padding: 8px; background: #fff; }
.aqua .sherlock-result {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: auto;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  color: #222;
  background: #fff;
  background-image: none;
  box-shadow: none;
  text-align: left;
}
.aqua .sherlock-result:hover, .aqua .sherlock-result:focus { color: #fff; background: #4d83d2; outline: none; }
.sherlock-result img { width: 38px; height: 38px; object-fit: contain; }
.sherlock-result span { min-width: 0; }
.sherlock-result strong, .sherlock-result small { display: block; }
.sherlock-result small { margin-top: 2px; overflow: hidden; color: #616975; text-overflow: ellipsis; white-space: nowrap; }
.sherlock-result:hover small, .sherlock-result:focus small { color: #eef5ff; }
.sherlock-result b { font-size: 10px; font-weight: 400; }
.sherlock-empty { padding: 36px; color: #777; text-align: center; }

.browser-window .win-content { overflow: hidden; }
.browser-app { height: 100%; display: flex; flex-direction: column; min-height: 380px; }
.browser-toolbar { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-bottom: 1px solid #858585; }
.browser-toolbar input { flex: 1; min-width: 80px; height: 22px; font-size: 11px; }
.aqua .browser-nav { width: 25px; height: 25px; font-size: 13px; font-weight: 700; }
.browser-notice { padding: 3px 9px; color: #626262; border-bottom: 1px solid #b8b8b8; background: #fff8cf; font-size: 9px; }
.browser-frame { flex: 1; min-height: 280px; width: 100%; border: 0; background: #fff; }
.browser-status { flex: 0 0 auto; overflow: hidden; padding: 3px 8px; color: #444; border-top: 1px solid #999; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.help-viewer { height: 100%; overflow: auto; padding: 22px 28px 42px; color: #222; background: #fff; line-height: 1.5; user-select: text; }
.help-viewer > * { max-width: 68ch; margin-left: auto; margin-right: auto; }
.help-viewer h1 { margin-top: 0; color: #244f86; font-size: 25px; }
.help-viewer h2 { margin-top: 24px; padding-bottom: 4px; border-bottom: 1px solid #c7c7c7; color: #315f9e; font-size: 16px; }
.help-viewer p, .help-viewer li { font-size: 12px; }
.help-viewer .legal-note { padding: 12px 14px; border: 1px solid #b5c7da; border-radius: 5px; background: #eef6ff; }

.calculator-window .win-content { overflow: hidden; }
.calculator-app { padding: 14px; }
.calculator-display { width: 100%; height: 42px !important; margin-bottom: 10px; padding: 4px 8px !important; text-align: right; font: 24px/1 Monaco, monospace !important; }
.calculator-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.aqua .calculator-keys button {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0;
  font-size: 15px;
}
.aqua .calculator-keys .calc-equals { color: #fff; background-image: repeating-linear-gradient(to bottom, var(--aqua-btn-default)); }

.game-app { padding: 16px; background-image: repeating-linear-gradient(to bottom, #dedede 0 1px,#ebebeb 1px 2px,#dedede 2px 3px,#d7d7d7 3px 4px); }
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.game-head strong, .game-head span { display: block; }
.game-head strong { font-size: 17px; }
.game-head span { margin-top: 2px; color: #555; font-size: 10px; }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.aqua .memory-card {
  min-width: 0;
  width: 100%;
  height: 68px;
  padding: 0;
  border: 1px solid #6e6e6e;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg,#6ab8ff,#245a9e);
  background-image: linear-gradient(145deg,#79c4ff,#1d559d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 2px 4px rgba(0,0,0,.28);
  font-size: 25px;
}
.aqua .memory-card.revealed, .aqua .memory-card.matched { color: #222; background: #f8f8f8; background-image: linear-gradient(#fff,#ddd); }
.aqua .memory-card.matched { opacity: .58; }
.game-score { margin-top: 11px; padding-top: 7px; border-top: 1px solid #aaa; color: #444; text-align: center; font-size: 11px; }

.about-mac { padding: 24px 30px 28px; text-align: center; }
.about-mac-logo { width: 76px; height: 76px; object-fit: contain; }
.about-mac h1 { margin: 5px 0 1px; font: 28px/1.1 Georgia, serif; }
.about-mac-version { margin: 0 0 17px; color: #666; }
.system-specs { overflow: hidden; border: 1px solid #aaa; border-radius: 5px; background: #fff; text-align: left; }
.system-specs > div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 7px 10px; border-top: 1px solid #e1e1e1; }
.system-specs > div:first-child { border-top: 0; }
.system-specs b { color: #425b7f; }
.system-specs span { min-width: 0; }
.system-meter { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; margin: 16px 0; text-align: left; }
.system-meter progress { width: 100%; }

.preferences-expanded { height: 100%; overflow: auto; }
.preferences-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.preferences-hero img { width: 52px; height: 52px; object-fit: contain; }
.preferences-hero strong, .preferences-hero span { display: block; }
.preferences-hero strong { font-size: 18px; }
.preferences-hero span { color: #666; }
.preferences-expanded fieldset { margin: 0 0 15px; }
.preference-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; }
.preference-row select { min-width: 190px; }
.graphite-accent {
  --aqua-accent-dark: #697585;
  --aqua-accent-light: #a5b3c1;
  --aqua-selection: #697585;
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.dock.no-magnify .dock-item { width: 40px !important; }

.matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 500000;
  display: flex;
  justify-content: space-around;
  overflow: hidden;
  border: 0;
  color: #50ff70;
  background: rgba(0,7,1,.94);
  font: 12px/1.1 Monaco, monospace;
  text-align: center;
}
.matrix-overlay span { display: block; opacity: .75; transform: translateY(-110%); animation: matrix-fall 3.2s linear infinite; animation-delay: var(--d); }
@keyframes matrix-fall { to { transform: translateY(110vh); } }

@media (max-width: 760px) {
  .profile-hero { grid-template-columns: 1fr 112px; gap: 16px; }
  .profile-portrait { width: 112px; height: 112px; }
  .project-grid { grid-template-columns: 1fr; }
  .album-strip { grid-template-columns: repeat(5, minmax(54px, 1fr)); overflow-x: auto; }
}

@media (max-width: 600px) {
  .case-hero { grid-template-columns: 1fr; }
  .case-hero > img { min-height: 150px; max-height: 190px; }
  .case-hero-copy { padding: 16px; }
  .case-two-column { grid-template-columns: 1fr; gap: 16px; }
  .case-tabs { padding-left: 8px; padding-right: 8px; }
  .aqua .case-tabs > button { flex: 1; padding: 0 7px; }
  .case-panels { padding: 0 8px; }
  .case-panel { padding: 14px; }
  .case-links { padding: 10px 8px 14px; }
  .desktop-icon { display: none; }
  .dock-wrap {
    display: block;
    bottom: 3px;
    max-width: calc(100vw - 8px);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .dock { height: 52px; padding-left: 6px; padding-right: 6px; }
  .aqua .dock-item { width: 34px; flex: 0 0 34px; }
  .dock-divider { margin: 0 4px; }
  .win { height: calc(100dvh - 82px) !important; }
  .win.is-zoomed { left: 0 !important; top: 22px !important; width: 100vw !important; height: calc(100dvh - 22px) !important; }
  .finder-layout { grid-template-columns: 1fr; height: 100%; min-height: 0; }
  .finder-sidebar { display: none; }
  .finder-main { height: 100%; }
  .home-panel { padding: 20px 17px 70px; }
  .profile-hero { grid-template-columns: 1fr; text-align: center; }
  .profile-portrait { grid-row: 1; margin: auto; }
  .profile-actions { justify-content: center; }
  .availability { justify-content: center; }
  .resume-entry { grid-template-columns: 1fr; gap: 4px; }
  .skill-list { grid-template-columns: 1fr; }
  .now-playing { grid-template-columns: 86px 1fr; }
  .now-playing img { width: 86px; height: 86px; }
  .agents-document { padding: 20px 17px 80px; }
  .help-viewer { padding: 18px 16px 82px; }
  .agents-mode { display: none; }
  .sherlock-search-row { padding: 9px; gap: 6px; }
  .sherlock-search-row > img { width: 34px; height: 34px; }
  .browser-toolbar { flex-wrap: wrap; }
  .browser-toolbar input { order: 2; flex-basis: calc(100% - 60px); }
  .browser-toolbar aqua-button:last-child { display: none; }
  .browser-notice { font-size: 8px; }
  .system-specs > div { grid-template-columns: 1fr; gap: 3px; }
  .about-mac { padding: 17px 15px 78px; }
  .preference-row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .preference-row .select-wrapper, .preference-row select { width: 100%; min-width: 0; }
  .preferences-expanded { padding-bottom: 78px; }
  .aqua .memory-card { height: 55px; }
  .dock.no-magnify .dock-item { width: 34px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
