/* apps.runasm.com — single stylesheet, system fonts only, no webfont, no CDN. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #5a6069;
  --line: #e2e5e9;
  --card: #fafbfc;
  --link: #0a52d6;
  --link-hover: #073da0;
  --focus: #0a52d6;
  /* Text drawn on top of --link. Follows the background, not the foreground:
     a light button needs dark text. */
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101215;
    --fg: #e9ebee;
    --muted: #a0a7b0;
    --line: #272b31;
    --card: #171a1e;
    --link: #8ab4ff;
    --link-hover: #b0cbff;
    --focus: #8ab4ff;
    --on-accent: #101215;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--fg);
  padding: .75rem 1rem;
  z-index: 10;
}
.skiplink:focus { left: 0; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- chrome ------------------------------------------------------------ */

.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: .9rem;
  padding-bottom: .9rem;
}
.brand { font-weight: 650; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
a.brand:hover { color: var(--link); }

.langswitch { display: flex; gap: .75rem; font-size: .9rem; }
.langswitch [aria-current] { color: var(--muted); }

/* main carries .wrap, whose `padding` shorthand outranks a bare `main`
   selector and zeroes the vertical padding. Qualify it or it does nothing. */
main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; }

.sitefoot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  padding: 1.5rem 0 2.5rem;
}
.sitefoot p { margin: .25rem 0; }

/* --- typography -------------------------------------------------------- */

h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 .6rem;
}
h2 {
  font-size: 1.3rem;
  letter-spacing: -.01em;
  margin: 2.4rem 0 .7rem;
}
h3 { font-size: 1.08rem; margin: 1.8rem 0 .4rem; }
h4 { font-size: 1rem; margin: 1.4rem 0 .3rem; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: .35rem 0; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .05em .35em;
}
.prose h2:first-child { margin-top: 0; }
.subtitle { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.1rem; }
.intro { font-size: 1.05rem; }

/* --- index list -------------------------------------------------------- */
/* A directory, not a stack of boxes. Rules instead of borders: one app reads
   as a deliberate entry, ten read as a list, and neither reads as a card that
   failed to fill itself. */

.lead {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--fg);
  max-width: 34rem;
  margin: 0 0 2.6rem;
}

.apps-heading {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--fg);
}

.apps { list-style: none; padding: 0; margin: 0; }
.app {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  margin: 0;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.app-icon { width: 64px; height: 64px; border-radius: 22%; flex: none; display: block; }
.app-main { flex: 1 1 auto; min-width: 0; }
.app h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }
/* Padding on an inline link still grows its hit box, which clears the 24px
   WCAG 2.2 minimum that a bare 1.2rem line does not. */
.app h3 a { text-decoration: none; color: var(--fg); padding: .15rem 0; }
.app h3 a:hover { color: var(--link); text-decoration: underline; }
.app p { margin: 0; }
.app-sub { color: var(--muted); margin-bottom: .6rem !important; }
.app-summary { margin-bottom: .7rem !important; }
.app-meta {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: .7rem !important;
}
.app-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: .92rem; }
/* .6rem vertical takes the link box to ~44px: these are the two targets a
   phone visitor arriving from the App Store is actually aiming for. */
.app-links a { display: inline-block; padding: .6rem 0; }

/* Desktop only: at phone width the text already fills the screen, and 104px of
   image would only squeeze it. The screenshots live on the app page anyway. */
.app-shot { display: none; }

.colophon {
  /* No rule here: the list already ends on one, and two rules a centimetre
     apart read as a mistake. */
  margin-top: 3.4rem;
  color: var(--muted);
  font-size: .95rem;
  max-width: 34rem;
}
.colophon h2 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 .6rem;
}

/* --- app page ---------------------------------------------------------- */

.hero { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 2rem; }
.hero-icon { width: 88px; height: 88px; }
.hero-text { min-width: 0; }
.hero h1 { margin-bottom: .3rem; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; }
.button {
  display: inline-block;
  background: var(--link);
  color: var(--on-accent);
  padding: .6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--link-hover); color: var(--on-accent); }
.button-disabled {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-weight: 500;
}
.price { color: var(--muted); font-size: .95rem; }

.shots {
  list-style: none;
  padding: 0 0 .5rem;
  margin: 0 0 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.shots li { margin: 0; scroll-snap-align: start; }
.shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: block;
}

.facts { margin: 0; display: grid; gap: .1rem; }
.facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: .5rem 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.pagelinks { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 2rem 0 0; }

.attribution { color: var(--muted); font-size: .88rem; margin-top: 2rem; }

/* --- legal pages ------------------------------------------------------- */

.langjump {
  display: flex;
  gap: 1rem;
  font-size: .95rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.legal { margin-bottom: 3.5rem; scroll-margin-top: 1rem; }
.legal + .legal { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.legal h2 { margin-top: 0; }
.contact-block { margin-top: 1.25rem; }

.mail { overflow-wrap: anywhere; }

/* --- narrow screens ---------------------------------------------------- */

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .hero { gap: 1rem; }
  .hero-icon { width: 68px; height: 68px; }
  .app { gap: .9rem; padding: 1.3rem 0; }
  .app-icon { width: 54px; height: 54px; }
  .lead { font-size: 1.1rem; margin-bottom: 2rem; }
  .shots { grid-auto-columns: 78%; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
  .facts dt { font-size: .88rem; }
}

@media (min-width: 46rem) {
  .shots { grid-auto-columns: 1fr; overflow-x: visible; }
  .app-shot {
    display: block;
    flex: none;
    width: 104px;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    align-self: flex-start;
  }
}

@media print {
  .topbar, .langjump, .pagelinks, .skiplink { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
}
