/* PantherSafari: Safari 1.1/1.2 (Mac OS X 10.3 Panther) browser interior + the
   "Saint-Theroux Software" store page that runs inside it.
   .psf-*  = Safari chrome (toolbar, bookmarks bar, tab bar, status bar)
   .sts-*  = the web page (2003-04 apple.com/store-style layout, own branding)
   Chrome measurements sampled from guidebookgallery.org
   pics/gui/applications/internet/browser/macosx103-1-1.png (Safari on 10.3):
   toolbar row 32px under the titlebar; 22px light metal buttons (Back|Forward
   joined, Stop/Reload, Add Bookmark); 22px address field with page icon; a
   splitter dot; Google capsule; 1px #888 + 1px #e1e1e1 rule; 20px bookmarks bar
   (bold 11px embossed labels); 1px #6f6e6e rule above the white page. */

.psf {
  --psf-font: "Lucida Grande", "Lucida Grande Web", Geneva, Verdana, sans-serif;
  container: psf / inline-size;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  font-family: var(--psf-font);
  color: #000;
  position: relative;
  -webkit-font-smoothing: antialiased;
}
.psf * { box-sizing: border-box; }
.psf button { font-family: inherit; }

/* ---------- toolbar ---------- */
.psf-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 1px 10px 3px 8px;
  min-width: 0;
}
.psf-seg, .psf-tbtn {
  flex: 0 0 auto;
  display: inline-flex;
  height: 22px;
  border: 1px solid #8a8a8a;
  border-top-color: #9c9c9c;
  border-bottom-color: #6e6e6e;
  border-radius: 4px;
  background: linear-gradient(180deg, #e9e9e9 0%, #efefef 30%, #f7f7f7 70%, #f2f2f2 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
}
.psf-seg button, .psf-tbtn {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  width: 26px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #4d4d4d;
}
.psf-tbtn {
  border: 1px solid #8a8a8a;
  border-top-color: #9c9c9c;
  border-bottom-color: #6e6e6e;
  background: linear-gradient(180deg, #e9e9e9 0%, #efefef 30%, #f7f7f7 70%, #f2f2f2 100%);
  width: 27px;
}
.psf-seg button + button { border-left: 1px solid #a9a9a9; box-shadow: inset 1px 0 0 #fdfdfd; }
.psf-seg button:active:not(:disabled), .psf-tbtn:active:not(:disabled) {
  background: linear-gradient(180deg, #b9b9b9 0%, #c4c4c4 40%, #cdcdcd 100%);
}
.psf-seg button:disabled, .psf-tbtn:disabled { color: #ababab; }
.psf-seg svg, .psf-tbtn svg { width: 11px; height: 11px; display: block; }
.psf-seg button:focus-visible, .psf-tbtn:focus-visible { outline: 2px solid #6d9de0; outline-offset: -2px; }

/* address field (page icon, progress fill, SnapBack) */
.psf-addr {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 22px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #9a9a9a;
  border-top-color: #727272;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.14);
}
.psf-addr:focus-within {
  border-color: #7d97ae;
  box-shadow: 0 0 0 2px #8db4d6, 0 0 0 3px #b5cde2;
}
.psf-prog {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(180deg, #d6e7fb 0%, #b4d1f4 48%, #9cc2ef 52%, #c4dcf7 100%);
  opacity: 0;
  transition: width 0.18s linear, opacity 0.2s ease;
  pointer-events: none;
}
.psf.is-loading .psf-prog { opacity: 1; }
.psf-favicon { position: relative; flex: 0 0 auto; width: 16px; height: 16px; margin: 0 3px 0 3px; display: block; }
.psf-url {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 4px 0 1px;
  background: transparent;
  font-family: var(--psf-font);
  font-size: 12px;
  color: #000;
}
.psf-snap {
  position: relative;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 3px 0 2px;
  width: 16px;
  height: 16px;
  background: transparent;
  cursor: default;
}
.psf-snap[hidden] { display: none; }
.psf-snap svg { width: 16px; height: 16px; display: block; }
.psf-snap:focus-visible { outline: 2px solid #6d9de0; border-radius: 50%; }

.psf-split { flex: 0 0 auto; width: 4px; height: 4px; margin: 0 -4px; border-radius: 50%; background: #3a3a3a; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }

/* Google search capsule */
.psf-google {
  flex: 0 1 168px;
  min-width: 90px;
  height: 21px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 5px;
  background: #fff;
  border: 1px solid #8f8f8f;
  border-top-color: #6c6c6c;
  border-radius: 11px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.16), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.psf-google:focus-within { border-color: #7d97ae; box-shadow: 0 0 0 2px #8db4d6, 0 0 0 3px #b5cde2; }
.psf-google svg { flex: 0 0 auto; width: 18px; height: 12px; display: block; }
.psf-google input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font-family: var(--psf-font);
  font-size: 12px;
  color: #000;
}
.psf-google input::placeholder { color: #8a8a8a; opacity: 1; }

/* ---------- bookmarks bar ---------- */
.psf-bookmarks {
  flex: 0 0 auto;
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 10px;
  border-top: 1px solid #888;
  box-shadow: inset 0 1px 0 #e1e1e1;
  border-bottom: 1px solid #6f6e6e;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.psf-bm-book { flex: 0 0 auto; width: 26px; height: 20px; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; }
.psf-bm-book svg { width: 18px; height: 12px; display: block; }
.psf-bm {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  height: 17px;
  padding: 0 7px;
  border-radius: 9px;
  font-family: var(--psf-font);
  font-size: 11px;
  font-weight: 700;
  color: #2b2b2b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.psf-bm:hover { background: rgba(0, 0, 0, 0.12); }
.psf-bm:active, .psf-bm[aria-expanded="true"] { background: #6d6d6d; color: #fff; text-shadow: none; }
.psf-bm svg { width: 7px; height: 6px; display: block; }
.psf-bm:focus-visible { outline: 2px solid #6d9de0; outline-offset: -1px; }
.psf-menu {
  position: absolute;
  z-index: 30;
  min-width: 170px;
  padding: 4px 0;
  margin: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0 0 5px 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  font-family: var(--psf-font);
  font-size: 13px;
}
.psf-menu button {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 18px;
  font-family: inherit;
  font-size: 13px;
  color: #000;
  cursor: default;
}
.psf-menu button:hover, .psf-menu button:focus { background: #3875d7; color: #fff; outline: 0; }

/* ---------- optional tab bar (off by default, as in Safari 1.x) ---------- */
.psf-tabs {
  flex: 0 0 auto;
  height: 21px;
  display: flex;
  align-items: flex-end;
  padding: 0 8px;
  border-bottom: 1px solid #6f6e6e;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.02));
}
.psf-tab {
  max-width: 220px;
  min-width: 0;
  height: 19px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #000;
  background: linear-gradient(180deg, #f2f2f2, #dcdcdc);
  border: 1px solid #7b7b7b;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- page viewport ---------- */
.psf-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
  position: relative;
  container: psfpage / inline-size;
}
.psf-tabs + .psf-page, .psf-bookmarks + .psf-page { border-top: 0; }

/* ---------- status bar ---------- */
.psf-status {
  flex: 0 0 auto;
  height: 17px;
  padding: 0 22px 0 9px;
  border-top: 1px solid #8c8c8c;
  font-size: 11px;
  line-height: 16px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.psf.no-status .psf-status { display: none; }

@container psf (max-width: 560px) {
  .psf-google, .psf-split { display: none; }
  .psf-toolbar { gap: 7px; }
}
@container psf (max-width: 380px) {
  .psf-add { display: none; }
}

/* =================================================================
   Saint-Theroux Software store page (lives inside .psf-page)
   Layout modelled on www.apple.com/store/ as archived 31 Mar 2004
   (web.archive.org/web/20040331044033/http://www.apple.com/store/):
   tab row + sub-nav strip, three columns (left: store title, search,
   grey-header link boxes; centre: hero + product sections; right:
   Welcome + Top Sellers), Lucida Grande, blue link text.
   ================================================================= */
.sts {
  font-family: "Lucida Grande", "Lucida Grande Web", Geneva, Verdana, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  color: #333;
  min-width: 0;
  padding-bottom: 14px;
}
.sts a { color: #1f4fb4; text-decoration: none; cursor: pointer; }
.sts a:hover { text-decoration: underline; }
.sts a:focus-visible, .sts [role="link"]:focus-visible { outline: 2px solid #6d9de0; outline-offset: 1px; }

/* tab row */
.sts-tabs {
  display: flex;
  justify-content: center;
  gap: 1px;
  padding: 6px 8px 0;
  background: repeating-linear-gradient(180deg, #ffffff 0 2px, #f1f1f1 2px 4px);
  border-bottom: 1px solid #9aa3ad;
  overflow: hidden;
}
.sts-tab {
  flex: 0 1 auto;
  min-width: 0;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-size: 13px;
  color: #000 !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, #fdfdfd 0%, #f1f1f1 50%, #e6e6e6 51%, #f0f0f0 100%);
  border: 1px solid #a8a8a8;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.sts-tab.logo { flex: 0 0 56px; padding: 0; }
.sts-tab.logo svg { width: 20px; height: 18px; display: block; }
.sts-tab.sel {
  background: linear-gradient(180deg, #dfe6ee 0%, #c9d3de 50%, #bcc8d5 51%, #d3dce6 100%);
  border-color: #7f8a96;
}
.sts-subnav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 18px;
  padding: 2px 10px 3px;
  background: linear-gradient(180deg, #e5ebf3 0%, #d4dce6 70%, #c3ccd7 100%);
  border-bottom: 1px solid #8d97a3;
  font-size: 12px;
}
.sts-subnav a { color: #111 !important; }

/* columns */
.sts-cols {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) 142px;
  gap: 12px;
  padding: 10px 10px 0;
  max-width: 800px;
  margin: 0 auto;
}
.sts-left, .sts-right { min-width: 0; }
.sts-brand {
  background: #ececec;
  padding: 6px 6px 8px;
  margin-bottom: 8px;
  border-radius: 0 0 4px 4px;
}
.sts-brand h1 { margin: 0 0 5px; font-size: 19px; line-height: 1.05; color: #000; font-weight: 700; letter-spacing: -0.3px; }
.sts-search { display: flex; gap: 4px; align-items: center; margin-bottom: 5px; }
.sts-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 19px;
  border: 1px solid #8e8e8e;
  border-top-color: #6c6c6c;
  font: 11px "Lucida Grande", "Lucida Grande Web", Geneva, sans-serif;
  padding: 0 3px;
}
.sts-search button {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 35%, #a9b6c6, #6f8299 70%, #5b6d83);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sts-search button svg { width: 11px; height: 11px; display: block; }
.sts-scope { width: 100%; font: 11px "Lucida Grande", "Lucida Grande Web", Geneva, sans-serif; }

.sts-box { margin-bottom: 9px; background: #f5f5f5; border-radius: 4px 4px 0 0; }
.sts-box-hd {
  padding: 2px 6px 3px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #a7acb3, #8f959e);
  border-radius: 4px 4px 0 0;
}
.sts-box ul, .sts-box ol { list-style: none; margin: 0; padding: 4px 6px 6px; }
.sts-box li { padding: 1px 0; }
.sts-box p { margin: 0; padding: 5px 6px 6px; }
.sts-welcome { background: #f5f5f5; padding: 5px 6px 7px; margin-bottom: 9px; border-radius: 4px; }
.sts-welcome h3 { margin: 0 0 3px; font-size: 13px; color: #000; }

/* hero */
.sts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #c9c9c9;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #f3f6fa 100%);
  cursor: pointer;
  margin-bottom: 10px;
}
.sts-hero-kicker { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #8a8f96; }
.sts-hero-title { font-size: 24px; line-height: 1.05; font-weight: 700; color: #5aa51f; letter-spacing: -0.5px; margin: 2px 0 6px; }
.sts-hero-blurb { font-size: 13px; line-height: 1.3; color: #4a4d52; margin: 0 0 6px; }
.sts-hero .sts-boxart { width: 92px; }

/* sections + grid */
.sts-sec { display: flex; align-items: baseline; gap: 6px; border-bottom: 1px solid #d4d4d4; margin: 4px 0 6px; padding-bottom: 2px; }
.sts-sec h2 { margin: 0; font-size: 12px; color: #000; }
.sts-sec span { color: #8a8f96; font-size: 11px; }
.sts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 10px 8px;
  margin-bottom: 8px;
}
.sts-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 0;
}
.sts-item:hover .sts-item-t { text-decoration: underline; }
.sts-item .sts-boxart { width: 64px; margin-bottom: 6px; }
.sts-item-t { color: #1f4fb4; font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sts-item-g { color: #6b7078; font-size: 10px; }

/* product box art: cover face + a skewed spine for the boxed-software look */
.sts-boxart {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin-right: 7px;
  flex: 0 0 auto;
}
.sts-boxart svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.sts-boxart::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -7px;
  width: 7px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.25)), var(--spine, #777);
  transform: skewY(-28deg);
  transform-origin: left top;
}
.sts-boxart::before {
  content: "";
  position: absolute;
  left: 6%;
  right: -4px;
  bottom: -7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 70%);
}

/* product detail */
.sts-crumbs { max-width: 800px; margin: 0 auto; padding: 8px 10px 0; font-size: 11px; color: #555; }
.sts-crumbs .sep { color: #999; margin: 0 4px; }
.sts-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 10px 4px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.sts-detail .sts-boxart { width: 140px; }
.sts-detail h1 { margin: 0; font-size: 26px; line-height: 1.1; color: #000; letter-spacing: -0.5px; }
.sts-by { color: #6b6f75; font-size: 12px; margin: 2px 0 8px; }
.sts-desc { font-size: 13px; line-height: 1.4; color: #333; margin: 0 0 10px; }
.sts-spec { border-collapse: collapse; margin: 0 0 12px; font-size: 11px; }
.sts-spec th { text-align: right; color: #6b6f75; font-weight: 400; padding: 1px 8px 1px 0; vertical-align: top; }
.sts-spec td { color: #000; padding: 1px 0; }
.sts-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sts-more { max-width: 800px; margin: 10px auto 0; padding: 0 10px; }

/* 2003-era aqua-ish web buttons (drawn, not images) */
.sts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 23px;
  padding: 0 16px;
  border-radius: 12px;
  font: 700 12px "Lucida Grande", "Lucida Grande Web", Geneva, sans-serif;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #6e7680;
  color: #000 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 45%, #dcdcdc 50%, #ececec 78%, #ffffff 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sts-btn.buy {
  color: #fff !important;
  text-shadow: 0 -1px 0 rgba(0, 40, 110, 0.55);
  border-color: #1c4d97;
  background: linear-gradient(180deg, #b9daff 0%, #6eaaf0 45%, #3f84de 50%, #4f9ae9 78%, #9fd0ff 100%);
}
.sts-btn:active { filter: brightness(0.85); }
/* greyed out: no link yet (or not for sale) */
.sts-btn.off, .sts-btn.buy.off {
  cursor: default;
  color: #9a9ea5 !important;
  text-shadow: none;
  border-color: #bfc3c8;
  background: linear-gradient(180deg, #fbfbfb 0%, #f1f1f1 50%, #e9e9e9 51%, #f3f3f3 100%);
  box-shadow: none;
}
.sts-btn.off:active { filter: none; }
/* "Private use" label on a title */
.sts-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 0 5px;
  border: 1px solid #c9a646;
  border-radius: 3px;
  background: #fff6cf;
  color: #6b5200;
  font: 700 9px/14px "Lucida Grande", "Lucida Grande Web", Geneva, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  vertical-align: middle;
}
.sts-btn.small { min-width: 0; height: 19px; padding: 0 11px; font-size: 10px; }

.sts-notice {
  margin: 10px 0 0;
  padding: 6px 9px;
  border: 1px solid #e2c766;
  background: #fff8d6;
  border-radius: 4px;
  font-size: 12px;
  color: #3d3418;
}
.sts-notice b { color: #000; }
.sts-page-notice { max-width: 780px; margin: 8px auto 0; }

.sts-plain { max-width: 640px; margin: 0 auto; padding: 18px 14px 6px; font-size: 13px; }
.sts-plain h1 { font-size: 22px; margin: 0 0 8px; color: #000; }

.sts-foot {
  max-width: 800px;
  margin: 14px auto 0;
  padding: 6px 10px 0;
  border-top: 1px solid #d4d4d4;
  color: #8a8f96;
  font-size: 10px;
  text-align: center;
}

/* Desktop: Safari 1.x lays the page out at a fixed minimum width and scrolls
   horizontally instead of reflowing navigation away. Narrow windows only tighten
   the tab row so every tab stays reachable. */
@media (min-width: 961px) {
  .sts { min-width: 600px; }
  @container psfpage (max-width: 800px) {
    .sts-tabs { padding: 6px 4px 0; }
    .sts-tab { padding: 0 9px; font-size: 11px; }
    .sts-tab.logo { flex-basis: 40px; }
  }
}
/* Phone (stacked windows): stack the columns */
@media (max-width: 960px) {
  @container psfpage (max-width: 620px) {
    .sts-cols { grid-template-columns: minmax(0, 1fr); }
    .sts-right { display: none; }
    .sts-left { order: 2; }
    .sts-brand h1 { font-size: 16px; }
    /* every tab stays reachable: the tab row scrolls sideways on its own */
    .sts-tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 0; }
    .sts-tab { flex: 0 0 auto; padding: 0 9px; font-size: 11px; }
    .sts-tab.logo { flex-basis: 40px; }
  }
  /* phone width: tighter tabs so all five fit next to the logo without scrolling */
  @container psfpage (max-width: 420px) {
    .sts-tabs { padding: 6px 2px 0; }
    .sts-tab { padding: 0 4px; font-size: 10.5px; }
    .sts-tab.logo { flex-basis: 26px; }
  }
  @container psfpage (max-width: 460px) {
    .sts-detail { grid-template-columns: minmax(0, 1fr); }
    .sts-detail .sts-boxart { width: 110px; }
    .sts-hero { grid-template-columns: minmax(0, 1fr); }
    .sts-hero .sts-boxart { display: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .psf-prog { transition: none; }
}
