/* Mac Torrent Download — list styles
   colors, type, chrome, the program table, then page bits */

:root {
  --ink: #24292f;
  --accent: #0969da;
  --accent-down: #0b5fbf;
  --ok: #1a7f37;
  --quiet: #59636e;
  --line: #d1d9e0;
  --wash: #f4f7fa;
  --warn: #6e2a1c;
  --paper: #ffffff;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --frame: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden; /* shot strip scrolls inside itself */
}

img { max-width: 100%; height: auto; }

button, input, textarea { font: inherit; color: inherit; }

a { color: var(--accent); }
a:hover { color: var(--accent-down); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: #d7e7fb; }

h1, h2, h3 { line-height: 1.25; font-weight: 600; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 10px;
  z-index: 40;
  border: 1px solid var(--line);
}

.skip-link:focus { top: 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-frame {
  width: min(var(--frame), calc(100% - 28px));
  margin: 0 auto;
}

/* header */

.mast {
  border-bottom: 3px solid var(--accent);
  background: var(--paper);
}

.mast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 0 10px;
}

.mast-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  min-width: 0;
}

.mast-brand:hover { color: var(--ink); }

.mast-mark { flex: 0 0 auto; display: block; }

.mast-word {
  font-size: 17px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.mast-tagline {
  margin: 0;
  flex: 1 1 100%;
  color: var(--quiet);
  font-size: 13px;
}

.mast-find {
  display: flex;
  flex: 1 1 160px;
  border: 1px solid var(--line);
  background: var(--paper);
  min-width: 0;
}

.mast-find input {
  border: 0;
  padding: 6px 8px;
  width: 100%;
  min-width: 0;
  background: transparent;
}

.mast-find input:focus { outline: none; }

.mast-find:focus-within { border-color: var(--accent); }

.mast-find button {
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--wash);
  padding: 0 8px;
  cursor: pointer;
}

.mast-burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 7px;
  cursor: pointer;
}

.mast-user {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex: 1 1 100%;
  justify-content: flex-end;
}

.mast-signin {
  font-weight: 600;
  text-decoration: none;
}

.mast-bell {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px 6px;
  cursor: pointer;
}

.mast-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  min-width: 16px;
  padding: 2px 4px;
  text-align: center;
  font-family: var(--mono);
}

.mast-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(340px, calc(100vw - 28px));
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 15;
  padding: 6px 0 0;
  box-shadow: 0 8px 20px rgba(36, 41, 47, 0.12);
}

.mast-drop[hidden] { display: none; }

.mast-drop ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mast-drop li a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.mast-drop li.is-unread a {
  background: #eef5fc;
  box-shadow: inset 3px 0 0 var(--accent);
}

.mast-drop time {
  display: block;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 2px;
}

.mast-drop-all {
  display: block;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.mast-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.mast-initials {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--mono);
}

.mast-out {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 4px 0;
  font-size: 14px;
}

.mast-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.mast-menu a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
}

.mast-menu a:hover { background: var(--wash); }

.mast-menu a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 600;
}

/* with JS the rubric row collapses under the burger */
@media (max-width: 959px) {
  .js .mast-burger { display: inline-flex; }
  .js .mast-menu { display: none; }
  .js .mast-menu.is-open { display: block; }
  .js .mast-menu ul { flex-direction: column; }
  .js .mast-menu a { padding: 9px 4px; }
}

@media (min-width: 960px) {
  .mast-tagline { flex: 1 1 auto; }
  .mast-find { flex: 0 0 220px; }
  .mast-user { flex: 0 0 auto; }
  .mast-burger { display: none !important; } /* desktop keeps the row */
}

/* footer */

.colophon {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 16px 0 36px;
  color: var(--quiet);
  font-size: 14px;
}

.colo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.colo-links a { text-decoration: none; }

.colo-links button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
}

.colo-copy { margin: 0; }

.to-top {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 8px;
}

.to-top:hover { color: var(--ink); background: var(--wash); }

.js .to-top {
  opacity: 0;
  pointer-events: none;
}

.js .to-top.is-on {
  opacity: 1;
  pointer-events: auto;
}

/* buttons */

.pg-download,
.gate-submit,
.talk-send,
.acct-save,
.sheet-go {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 600;
}

.pg-download:hover,
.gate-submit:hover,
.talk-send:hover,
.acct-save:hover,
.sheet-go:hover {
  background: var(--accent-down);
  border-color: var(--accent-down);
  color: #fff;
}

.pg-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pg-older,
.pg-fav,
.sheet-quiet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 12px;
  text-decoration: none;
  cursor: pointer;
}

.pg-older:hover,
.pg-fav:hover,
.sheet-quiet:hover { background: var(--wash); color: var(--ink); }

.pg-fav.is-on {
  border-color: var(--ok);
  color: var(--ok);
}

/* catalog table */

.dl-section { margin: 28px 0; }

.dl-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.dl-section-title {
  margin: 0;
  font-size: 1.25rem;
}

.dl-all { font-size: 14px; }

.dl-table {
  width: 100%;
  border-collapse: collapse;
}

.dl-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.dl-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.dl-row { position: relative; }

.dl-row:hover { background: var(--wash); }

.dl-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.dl-hit:hover { color: var(--ink); }

/* the name is the link text; this stretches the hit across the row */
.dl-hit::after {
  content: "";
  position: absolute;
  inset: 0;
}

.dl-ico {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  max-width: none;
}

.dl-label { overflow-wrap: anywhere; }

.dl-flag {
  display: inline-block;
  margin-left: 6px;
  color: var(--ok);
  font-weight: 600;
  font-size: 12px;
  font-family: var(--sans);
}

.dl-ver, .dl-size span, .dl-when time {
  font-family: var(--mono);
  font-size: 13px;
}

.dl-ver { overflow-wrap: anywhere; }

.dl-size span {
  border: 1px solid var(--line);
  padding: 1px 6px;
  display: inline-block;
  background: var(--paper);
}

.dl-cat { color: var(--quiet); font-size: 14px; }

@media (max-width: 799px) {
  .dl-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .dl-table,
  .dl-table tbody,
  .dl-table tr,
  .dl-table td { display: block; width: auto; }

  .dl-row {
    border: 1px solid var(--line);
    margin: 0 0 10px;
    padding: 8px 8px 6px;
  }

  .dl-table td {
    border: 0;
    padding: 2px 0 2px 96px;
  }

  .dl-table td.dl-name { padding-left: 0; }

  .dl-ver::before,
  .dl-size::before,
  .dl-cat::before,
  .dl-when::before {
    content: attr(data-col);
    position: absolute;
    left: 8px;
    width: 84px;
    color: var(--quiet);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
  }

  .dl-ver, .dl-size, .dl-cat, .dl-when { position: relative; }
}

/* home */

.hm-intro { padding: 22px 0 6px; }

.hm-intro h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  max-width: 22em;
}

.hm-intro p { max-width: 68ch; margin: 0 0 0.75em; }

.hm-steps {
  max-width: 68ch;
  margin: 8px 0 0;
  padding: 10px 12px 10px 32px;
  border: 1px solid var(--line);
  background: var(--wash);
}

.hm-steps li { margin: 0 0 4px; }

.hm-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.hm-log-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 8px 12px;
  align-items: baseline;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.hm-log-item time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--quiet);
}

.hm-log-cat { color: var(--quiet); font-size: 13px; }

@media (max-width: 640px) {
  .hm-log-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 0;
  }
}

@media (min-width: 900px) {
  .hm-log-list {
    column-count: 2;
    column-gap: 28px;
  }
  .hm-log-item { break-inside: avoid; }
}

/* category */

.rub-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 14px 0 8px;
  padding: 0;
  font-size: 13px;
  color: var(--quiet);
}

.rub-crumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 6px;
  color: var(--quiet);
}

.rub-head h1 { margin: 0 0 8px; font-size: 1.6rem; }

.rub-lead { max-width: 68ch; margin: 0 0 8px; }

.rub-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
}

.rub-pager a {
  display: inline-block;
  min-width: 2.1rem;
  text-align: center;
  border: 1px solid var(--line);
  padding: 4px 8px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}

.rub-pager a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rub-pager .rub-step { min-width: 0; }

.rub-note {
  margin-top: 22px;
  max-width: 68ch;
  color: var(--quiet);
  font-size: 14.5px;
}

/* program */

.pg-head { padding-top: 6px; }

.pg-id {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pg-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  max-width: none;
}

.pg-title {
  margin: 0 0 4px;
  font-size: 1.55rem;
  overflow-wrap: anywhere;
}

.pg-cat {
  display: inline-block;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.pg-updated {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 14px;
}

.pg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.pg-facts {
  display: grid;
  gap: 14px;
  margin: 4px 0 18px;
}

.pg-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0;
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.pg-specs dt {
  font-size: 12px;
  color: var(--quiet);
  margin: 0;
}

.pg-specs dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.pg-specs .pg-mono { font-family: var(--mono); font-size: 14px; }

.pg-glance {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pg-glance caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.pg-glance th,
.pg-glance td {
  border: 1px solid var(--line);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}

.pg-glance th {
  width: 34%;
  font-weight: 600;
  background: var(--wash);
  color: var(--quiet);
}

@media (max-width: 640px) {
  .pg-specs { grid-template-columns: 1fr; }
}

@media (min-width: 800px) {
  .pg-facts {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.pg-shots { margin: 8px 0 18px; }

.pg-shots h2 { font-size: 1.15rem; margin: 0 0 8px; }

.pg-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch; /* safari: otherwise the snap row jumps */
}

.pg-frame {
  flex: 0 0 86%;
  scroll-snap-align: start;
  margin: 0;
  max-width: 560px;
}

.pg-frame.is-wide { flex-basis: 100%; max-width: none; }

.pg-frame img {
  display: block;
  width: 100%;
  background: var(--wash);
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.pg-frame figcaption {
  font-size: 13px;
  color: var(--quiet);
  margin-top: 4px;
}

.pg-shot-hint { font-size: 13px; color: var(--quiet); margin: 6px 0 0; }

.pg-shots-empty {
  margin: 0;
  padding: 14px 12px;
  border: 1px dashed var(--line);
  color: var(--quiet);
}

.pg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-top: 8px;
}

.pg-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 14px 7px;
  margin-bottom: -1px;
  color: var(--quiet);
  cursor: pointer;
}

.pg-tab.is-on {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.pg-panel { padding-top: 14px; }

html:not(.js) .pg-panel[hidden] { display: block !important; }

.pg-article {
  display: block;
}

.pg-toc {
  border: 1px solid var(--line);
  padding: 8px 12px 10px;
  margin: 0 0 16px;
  background: var(--wash);
}

.pg-toc-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
}

.pg-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
}

.pg-toc a { text-decoration: none; }
.pg-toc a:hover { text-decoration: underline; }

@media (min-width: 960px) {
  .pg-article {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .pg-toc { position: sticky; top: 10px; }
}

.pg-prose {
  font-size: 17px;
  line-height: 1.58;
  max-width: 68ch;
  min-width: 0;
}

.pg-prose h2 {
  font-size: 1.28rem;
  margin: 1.45em 0 0.35em;
}

.pg-prose h3 { font-size: 1.05rem; margin: 1.2em 0 0.3em; }

.pg-prose p { margin: 0 0 0.8em; }

.pg-prose ul, .pg-prose ol { margin: 0 0 0.9em; padding-left: 1.25rem; }

.pg-prose li { margin: 0 0 0.3em; }

.pg-prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 0 4px;
}

.pg-prose pre {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 10px 12px;
  overflow-x: auto;
  line-height: 1.45;
}

.pg-prose pre code { border: 0; background: transparent; padding: 0; }

.pg-prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  margin: 0 0 1em;
}

.pg-prose th, .pg-prose td {
  border: 1px solid var(--line);
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}

.pg-prose th { background: var(--wash); }

.pg-ask { border-bottom: 1px solid var(--line); }

.pg-faq { margin-top: 22px; max-width: 68ch; }

.pg-faq h2 { font-size: 1.2rem; margin: 0 0 6px; }

.pg-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 9px 0;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pg-q::after { content: "+"; color: var(--quiet); font-weight: 400; }

.pg-ask.is-open .pg-q::after { content: "–"; }

.pg-a { padding: 0 0 10px; color: var(--ink); }

.pg-a p { margin: 0; }

.js .pg-a { display: none; }
.js .pg-ask.is-open .pg-a { display: block; }

/* comments */

.talk { margin-top: 32px; }

.talk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.talk-bar h2 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.talk-sort { display: flex; gap: 6px; }

.talk-sort button {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 3px 8px;
  cursor: pointer;
}

.talk-sort button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.talk-form, .talk-invite { margin: 12px 0; }

.talk-field { margin: 0 0 8px; }

.talk-field label, .gate-field label, .acct-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.talk-field textarea,
.gate-field input,
.acct-field input,
.miss-search input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 7px 8px;
  background: var(--paper);
  border-radius: 2px;
}

.talk-field textarea { min-height: 96px; resize: vertical; }

.talk-trap, .gate-trap {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.talk-hint { color: var(--quiet); font-size: 13px; margin: 0 0 8px; }

.talk-error, .gate-error {
  color: var(--warn);
  font-size: 14px;
  margin: 4px 0;
}

.talk-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.talk-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0 10px;
}

.talk-wait { opacity: 0.62; }

.talk-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.talk-name { font-weight: 600; }

.talk-top time {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
}

.talk-badge {
  font-size: 12px;
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 0 5px;
}

.talk-body { margin: 0 0 6px; }

.talk-tools { display: flex; gap: 8px; margin: 0; }

.talk-like, .talk-reply {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 2px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.talk-like.is-on {
  border-color: var(--ok);
  color: var(--ok);
}

.talk-replies {
  margin: 8px 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.talk-replyform {
  margin-top: 8px;
  max-width: 36rem;
}

.talk-empty {
  color: var(--quiet);
  padding: 12px;
  border: 1px dashed var(--line);
}

/* auth + account */

.gate, .acct-form {
  max-width: 28rem;
  padding: 8px 0 12px;
}

.gate h1, .acct-head h1 { margin: 14px 0 6px; font-size: 1.5rem; }

.gate-lead { margin: 0 0 10px; color: var(--quiet); }

.gate-field, .acct-field { margin: 0 0 10px; }

.gate-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-size: 14.5px;
}

.gate-links { font-size: 14px; }

.gate-ok, .acct-saved {
  color: var(--ok);
  font-weight: 600;
  margin: 0 0 10px;
}

.acct-person {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.acct-person .mast-initials { width: 40px; height: 40px; font-size: 14px; }

.acct-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 10px 0 16px;
}

.acct-tabs a {
  text-decoration: none;
  color: var(--quiet);
  padding: 8px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}

.acct-tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.acct-empty {
  border: 1px dashed var(--line);
  padding: 12px;
  color: var(--quiet);
}

.acct-notes { list-style: none; margin: 0; padding: 0; }

.acct-notes li {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.acct-notes time {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--quiet);
  margin-top: 4px;
}

.acct-badge {
  display: inline-block;
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 0 5px;
  margin-left: 6px;
  color: var(--quiet);
}

.acct-badge-wait { color: var(--warn); border-color: var(--warn); }

.acct-comment-text { margin: 4px 0 0; }

/* static pages */

.doc { padding-top: 8px; }

.doc h1 { font-size: 1.6rem; margin: 12px 0 8px; }

.doc-body { max-width: 68ch; font-size: 17px; line-height: 1.58; }

.doc-body h2 { font-size: 1.25rem; margin: 1.4em 0 0.35em; }

.doc-body p { margin: 0 0 0.75em; }

.doc-body ul, .doc-body ol { margin: 0 0 0.8em; padding-left: 1.2rem; }

.doc-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--wash);
  padding: 0 4px;
  border: 1px solid var(--line);
}

.doc-body pre {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 10px 12px;
  overflow-x: auto;
}

/* errors */

.miss { padding: 18px 0 8px; max-width: 40rem; }

.miss-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--quiet);
  margin: 0 0 4px;
}

.miss h1 { margin: 0 0 8px; font-size: 1.55rem; }

.miss-search {
  display: flex;
  gap: 0;
  margin: 12px 0;
  border: 1px solid var(--line);
  max-width: 24rem;
}

.miss-search input { border: 0; }

.miss-search button {
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--wash);
  padding: 0 10px;
  cursor: pointer;
}

.miss-rubs { list-style: none; margin: 0; padding: 0; }

.miss-rubs li { border-bottom: 1px solid var(--line); }

.miss-rubs a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--ink);
}

.miss-rubs a:hover { color: var(--accent); }

/* modal */

.sheet[hidden] { display: none; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}

.sheet-back {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(36, 41, 47, 0.46);
  cursor: pointer;
}

.sheet-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 16px 16px 18px;
  box-shadow: 0 12px 28px rgba(36, 41, 47, 0.16);
}

.sheet-x {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 4px;
  cursor: pointer;
}

.sheet-panel h2 { margin: 0 36px 8px 0; font-size: 1.2rem; }

.sheet-body h3 { margin: 14px 0 6px; font-size: 1rem; }

.sheet-body ol, .sheet-body ul { padding-left: 1.2rem; }

.sheet-body li { margin: 0 0 6px; }

.sheet-links { display: flex; flex-wrap: wrap; gap: 8px; }

.sheet-old { list-style: none; margin: 0; padding: 0; }

.sheet-old li {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.sheet-old p { margin: 0 0 4px; font-weight: 600; }

.sheet-old a { margin-right: 12px; }

html.has-sheet { overflow: hidden; }

/* a couple of one-off fixes */

.rub-pager { margin-bottom: 8px; }

.pg-prose .wide-note { overflow-x: auto; } /* long rows stay inside the column */

/* сеть: липкая шапка с поиском, вход, плейсхолдеры иконок, вкладки по aria, установка на странице */

.mast { position: sticky; top: 0; z-index: 20; }
.mast-row { padding: 8px 0; }
.mast-find { height: 36px; }
.mast-find input { height: 34px; }
.mast-signin {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
}
.mast-signin:hover { background: var(--accent-down); border-color: var(--accent-down); color: #fff; }
.mast-belt { position: relative; }
.mast-bell { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; }
.mast-out { height: 36px; }
.mast-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; }
.mast-drop:not([hidden]) { display: block; }
.mast-burger { height: 36px; width: 36px; place-items: center; padding: 0; }

@media (max-width: 959px) {
  .mast-tagline { display: none; }
  .mast-user { flex: 0 0 auto; margin-left: auto; order: 2; }
  .js .mast-burger { order: 3; margin-left: 0; display: inline-grid; }
  .mast-find { order: 5; flex: 1 1 100%; }
  .mast-name { display: none; }
  .js .mast-menu.is-open { max-height: 60vh; overflow-y: auto; }
}

.dl-ph {
  display: inline-grid; place-items: center; background: var(--wash); border: 1px solid var(--line);
  color: var(--quiet); font-family: var(--mono); font-size: 15px; font-weight: 600; text-transform: uppercase;
}
.pg-icon.dl-ph { font-size: 18px; }

.pg-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.pg-fav-on { display: none; }
.pg-fav[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.pg-fav[aria-pressed="true"] .pg-fav-on { display: inline; }
.pg-fav[aria-pressed="true"] .pg-fav-off { display: none; }
.pg-fav[aria-pressed="true"] svg { fill: currentColor; }
.pg-actions a, .pg-actions button { min-height: 36px; }
.pg-intel {
  display: inline-block; margin-left: 8px; font-size: 12px; padding: 0 6px;
  border: 1px solid var(--warn); color: var(--warn);
}

.pg-install { margin-top: 26px; max-width: 68ch; border-top: 1px solid var(--line); padding-top: 6px; }
.pg-install h2 { font-size: 1.2rem; margin: 10px 0 8px; }

.talk-replies:empty { display: none; }
.talk-replies > .talk-item { border-bottom: 0; padding: 8px 0 4px; }
.talk-like[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.talk-invite { color: var(--quiet); }
.talk-form, .talk-replyform { max-width: 40rem; }

.hm-about, .rub-about { margin-top: 32px; }
.hm-about h2, .rub-about h2 { font-size: 1.25rem; }
.rub-gap { color: var(--quiet); padding: 0 2px; }
.gate-field input, .acct-field input { min-height: 36px; }
.gate-field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.gate-field textarea { width: 100%; border: 1px solid var(--line); padding: 7px 8px; font: inherit; }
.dmca-gate { max-width: 36rem; margin-top: 24px; }
.acct-notes li.is-unread { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.sheet-body > p.sheet-links { margin: 0 0 6px; }

[id] { scroll-margin-top: 150px; }
@media (min-width: 960px) {
  [id] { scroll-margin-top: 110px; }
  .pg-toc { top: 100px; }
}
@media (min-width: 960px) { .mast-find { flex: 0 0 260px; } }
@media (max-width: 599px) {
  .mast-row { gap: 8px 10px; }
  .mast-word { font-size: 16px; }
  .mast-signin { padding: 0 10px; }
  .to-top-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .to-top { width: 36px; height: 36px; justify-content: center; padding: 0; }
}
