/* whatport.net — man page typography, Mac sensibility.
   Generated site; edit this file, not the copies under /site/<port>/. */

/* ---------- tokens ---------- */
:root {
  --bg: #fdfdfc;
  --surface: #ffffff;
  --ink: #1c1d1f;
  --ink-soft: #55585e;
  --rule: #e3e2de;
  --rule-strong: #c9c8c3;
  --accent: #3d7f95;      /* app #6DB5C9 darkened for light-bg contrast */
  --ok: #467a5c;          /* app #7DB796 darkened */
  --warn: #b05f1a;        /* app #E8873E darkened */
  --danger: #c22f2f;      /* app #FF5959 darkened */
  --code-bg: #f3f2ef;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --prose: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #1d1f22;
    --ink: #e8e7e3;
    --ink-soft: #9a9da3;
    --rule: #2c2e32;
    --rule-strong: #3a3e44;
    --accent: #6db5c9;
    --ok: #7db796;
    --warn: #e8873e;
    --danger: #ff5959;
    --code-bg: #1f2124;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--prose);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

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

code, .cmd { font-family: var(--mono); font-size: 0.875em; }
p code, li code, dd code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* ---------- man-page running header / footer ---------- */
.manhead,
.manfoot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.manhead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin-bottom: 2.5rem;
}
.manfoot {
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.manhead a, .manfoot a { color: inherit; text-decoration: none; }
.manhead a:hover, .manfoot a:hover { color: var(--accent); }
.manhead .edge:last-child { text-align: right; }
@media (max-width: 34rem) {
  .manhead .edge:last-child { display: none; }
}

/* the same page as data, and where to send a correction — quiet lines under the
   footer rule */
.formats, .contribute {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.formats code { font-size: inherit; background: none; padding: 0; }
.formats a, .contribute a { color: inherit; }
.formats a:hover, .contribute a:hover { color: var(--accent); }

/* ---------- masthead: the number beside the answer ---------- */
.masthead {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.portnum {
  font-family: var(--mono);
  font-size: clamp(4.5rem, 14vw, 7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ident { flex: 1 1 20rem; }
.ident h1 {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.ident .answer {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-top: 0.35rem;
}
.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.12rem 0.45rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge.accent { border-color: var(--accent); color: var(--accent); }

/* ---------- man-page section rhythm ---------- */
section { margin-bottom: 2.75rem; }

h2 {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

section > p,
section > .indent {
  margin-left: 1.75rem;   /* the man-page hanging body */
  margin-bottom: 1rem;
}
section > p:last-child { margin-bottom: 0; }
@media (max-width: 34rem) {
  section > p, section > .indent { margin-left: 0; }
}

/* ---------- verdict ---------- */
/* Every verdict carries a modifier class; the base only holds the shared shape. */
.verdict { border-left: 3px solid var(--rule-strong); padding: 0.25rem 0 0.25rem 1rem; }
.verdict .word {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.verdict p { margin-bottom: 0.5rem; }
.verdict p:last-child { margin-bottom: 0; }
.verdict.v-careful { border-left-color: var(--warn); }
.verdict.v-careful .word { color: var(--warn); }
.verdict.v-fine { border-left-color: var(--ok); }
.verdict.v-fine .word { color: var(--ok); }
.verdict.v-never { border-left-color: var(--danger); }
.verdict.v-never .word { color: var(--danger); }

/* ---------- command blocks ---------- */
.cmdblock {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.875rem 1rem;
  overflow-x: auto;
}
.cmdblock pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre;
}
.cmdblock .prompt { color: var(--ink-soft); user-select: none; }
.cmdblock .c { color: var(--ink-soft); }

/* ---------- SEE ALSO: mono kind gutter ---------- */
.seealso { list-style: none; margin-left: 1.75rem; }
@media (max-width: 34rem) { .seealso { margin-left: 0; } }
.seealso li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.25rem 0;
}
.seealso .kind {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  flex: 0 0 3.5rem;
  text-align: right;
}
.seealso .title { font-size: 0.9375rem; }
.seealso .host {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
@media (max-width: 34rem) {
  .seealso li { display: block; }
  .seealso .kind { text-align: left; display: block; }
}

/* ---------- app funnel card ---------- */
.funnel {
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.funnel p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 26rem;
}
.funnel p strong { color: var(--ink); font-weight: 600; }
.funnel .cta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.funnel .cta:hover { background: var(--accent); color: var(--bg); }
/* Shown instead of the button while there is no live App Store listing to link to. */
.funnel .soon {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px dashed var(--rule-strong);
  border-radius: 5px;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
}

/* ---------- lookup (index + 404) ---------- */
.lede {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 1.75rem;
  max-width: 32rem;
}
.lede .big {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
  margin-bottom: 0.75rem;
}
.lookup {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.lookup label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lookup input {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  width: 7.5rem;
  padding: 0.4rem 0.6rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
}
.lookup input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lookup button {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.lookup button:hover { background: var(--accent); color: var(--bg); }
.lookup-msg {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  min-height: 1.6em;
  margin-bottom: 2rem;
}
.lookup-msg.miss { color: var(--warn); }
/* The lookup box needs JS; without it, say where to go instead. */
.lookup-noscript { font-size: 0.9rem; color: var(--ink-soft); margin-top: -0.4rem; }
.more { margin-bottom: 2.5rem; }

/* Sort toggle above the list. Two words and a separator's worth of weight — the list is
   the thing on this page, not its controls. */
.sortby {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  /* Flush with the list it sorts, not with the man-page body indent. */
  margin-left: 0;
  margin-bottom: 0.75rem;
}
.sortby > span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sortby button {
  font: inherit;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 1px;
  cursor: pointer;
}
.sortby button:hover { color: var(--ink); }
.sortby button[aria-pressed='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.sortby button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Ships hidden; the sort script reveals it. Without JS there is nothing to toggle. */
.sortby[hidden] { display: none; }

/* ---------- port index table ---------- */
.portlist { list-style: none; border-top: 1px solid var(--rule); }
/* Prevalence order is baked into each row as --o; the toggle only adds this class. */
.portlist.by-prevalence { display: flex; flex-direction: column; }
.portlist.by-prevalence li { order: var(--o); }
.portlist li {
  display: grid;
  grid-template-columns: 5.5rem 4rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.portlist .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.0625rem;
  font-weight: 600;
}
.portlist .num a { text-decoration: none; }
.portlist .num a:hover { text-decoration: underline; }
.portlist .proto {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.portlist .svc { font-size: 0.9375rem; }
.portlist .svc .dot { color: var(--ink-soft); }
.portlist .svc .one { color: var(--ink-soft); }
@media (max-width: 34rem) {
  .portlist li { grid-template-columns: 4.5rem 1fr; }
  .portlist .proto { grid-row: 2; grid-column: 1; }
  .portlist .svc { grid-column: 2; grid-row: 1 / span 2; }
}
.portlist li[hidden] { display: none; }
