/* Chrome on the laptop (design/desktop-apps.md): the tab in the title-bar row (40 pt, no title
   text), the toolbar with one address bar, bookmarks, the start page and the in-window web pages:
   search results, reader view and preview cards. */
.win[data-app="chrome"] { grid-template-rows: 40px minmax(0, 1fr); }
.win[data-app="chrome"] .win-bar { justify-content: flex-start; border-bottom: 0; }
.win[data-app="chrome"] .win-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.browser-tab {
  position: absolute; left: 84px; bottom: 0; width: 200px; height: 32px; display: flex; align-items: center; gap: 7px;
  padding: 0 6px 0 12px; border-radius: 8px 8px 0 0; background: var(--window-bg);
}
.tab-mark svg { display: block; width: 10px; height: 12px; }
.tab-title { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-close { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: none; font-size: 15px; line-height: 1; color: var(--ink-soft); }
.tab-close:hover { background: rgba(42, 33, 28, 0.08); }
.browser { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; }
.browser-tools { position: relative; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 10px; border-bottom: 1px solid var(--window-line); }
.browser-omni { flex: 1; margin-left: 6px; }
.browser-omni input { width: 100%; padding: 6px 14px; border: 0; border-radius: var(--radius-pill); background: var(--paper-deep); font: 13px var(--font-body); color: var(--ink); }
.bookmarks-bar { grid-row: 2; display: flex; align-items: center; gap: 4px; height: 32px; margin: 0; padding: 0 8px; list-style: none; overflow: hidden; border-bottom: 1px solid var(--window-line); }
.bookmark a { display: block; padding: 3px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap; }
.bookmark a:hover { background: var(--row-selected-dim); }
.browser-page { grid-row: 3; display: flex; flex-direction: column; padding: 24px 32px; overflow: auto; }
.start-page { display: grid; justify-items: center; margin: auto 0; text-align: center; } /* centred while it fits */
.start-mark svg { display: block; width: 31px; height: 36px; }
.start-page h3 { margin: 16px 0 0; font: 600 24px / 1.2 var(--font-display); }
.start-line { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }
.start-tiles { display: flex; flex-wrap: wrap; justify-content: center; margin: 32px 0 0; padding: 0; list-style: none; }
.start-tile { width: 120px; } /* 120, not 104: "Artificial Analysis" fits on one line */
.start-tile a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px; color: var(--ink); text-decoration: none; }
.letter-tile {
  display: block; width: 56px; height: 56px; border-radius: 14px; color: var(--paper);
  font: 600 26px / 56px var(--font-display); text-align: center; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}
.start-tile a:hover .letter-tile { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.tile-name { font-size: 13px; line-height: 1.3; white-space: nowrap; }
.results { display: grid; gap: 18px; max-width: 680px; margin: 0; padding: 0; list-style: none; }
.results a { display: grid; gap: 2px; text-decoration: none; }
.results a:hover .result-title { text-decoration: underline; }
.result-title { font: 600 15px / 1.35 var(--font-body); color: var(--terracotta-ink); }
.result-url { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.results p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.results-status { color: var(--ink-soft); }

/* Loading: a thin line along the toolbar's foot (still with reduced motion). */
.load-line { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; transform-origin: left; transform: scaleX(0); background: var(--terracotta); opacity: 0; }
.browser.is-loading .load-line { opacity: 1; animation: load-line 1.2s var(--ease-out) infinite; }
.reduced-motion .browser.is-loading .load-line { animation: none; transform: scaleX(0.6); }
@keyframes load-line { from { transform: scaleX(0.05); } to { transform: scaleX(0.9); } }
.browser.is-loading .browser-page > :not(.preview) { opacity: 0.55; transition: opacity var(--dur-fast); }
.browser-page:focus { box-shadow: none; }

/* The preview page: the picture in its own frame, the site's words on a solid panel below it
   (never text over an image); without a picture, one centred card. */
.browser-page:has(> .preview) { padding: 0; }
.preview { display: flex; flex-direction: column; height: 100%; background: var(--window-bg); }
.preview-frame {
  flex: 1 1 auto; min-height: 0; margin: 16px 20px 0; overflow: hidden; border-radius: 8px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.08);
}
.preview-frame.is-share { flex: 0 1 auto; max-height: 58%; }
.preview-frame.is-waiting { background: #F2F2F2; }
.preview-picture { display: block; height: 100%; cursor: pointer; }
.preview-picture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; animation: preview-in var(--dur-base) var(--ease-out); }
.preview-frame.is-waiting img { opacity: 0; }
@keyframes preview-in { from { opacity: 0; } }
.preview-panel { flex: none; padding: 14px 24px 18px; font-family: var(--mac-font); color: var(--mac-text); }
.preview-head { display: flex; align-items: flex-start; gap: 12px; }
.preview-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; color: var(--mac-text-2); }
.preview-icon :is(svg, img) { display: block; width: 28px; height: 28px; border-radius: 6px; }
.preview-title {
  margin: 0; font: 700 17px / 1.25 var(--mac-font); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.preview-lede { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--mac-text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 0 44px; }
.preview-open {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 7px;
  background: var(--mac-accent); color: #fff; font: 500 13px / 1 var(--mac-font); text-decoration: none;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.1); transition: filter var(--dur-fast);
}
.preview-open:hover { filter: brightness(0.94); }
.preview-hint { font-size: 12px; color: var(--mac-text-2); }
/* The card: no picture, the icon on top, everything centred once. */
.preview.is-card { justify-content: center; align-items: center; }
.preview.is-card .preview-panel { max-width: 420px; padding: 28px; text-align: center; }
.preview.is-card .preview-head { flex-direction: column; align-items: center; gap: 10px; }
.preview.is-card .preview-icon { width: 64px; height: 64px; }
.preview.is-card .preview-icon :is(svg, img) { width: 56px; height: 56px; border-radius: 12px; }
.preview.is-card .preview-title { font-size: 20px; }
.preview.is-card .preview-lede { text-wrap: balance; }
.preview.is-card .preview-actions { justify-content: center; margin-left: 0; }
