/* AuthSome guides. Loaded after ../styles.css, which gives the sub-screen look (.sub, .doc, .plate).
   A guide is an article, so its text is set open on the page, at a width that reads well, and its headings are read
   as headings. Plates are kept for what is a block of its own: a table, the box about AuthSome, the list of other
   guides and the sources. */

/* The trail above the heading is in ../styles.css (.trail), since the privacy and support pages show one too. */

.guide h1 { font-size: clamp(32px, 5.4vw, 46px); line-height: 1.08; text-wrap: balance; }
.guide .doc-lede { max-width: 31em; margin-bottom: 14px; color: var(--ink); }
.guide .byline { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.guide .byline a { color: inherit; text-underline-offset: 3px; }

/* The sections of the page, as links under the byline, so a reader with one question need not scroll past the rest. */
.guide-jump { padding-top: 14px; border-top: 1px solid var(--line); }
.guide-jump h2 { color: var(--muted); font-size: 14px; font-weight: 600; }
.guide-jump ol { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.guide-jump a { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; font-weight: 600; text-decoration: none; }
.guide-jump a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The article's own text. */
.guide .prose { margin-top: 44px; }
.guide .prose > h2 { margin: 0 0 12px; color: var(--ink); font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.guide .prose h3 { margin: 28px 0 6px; font-size: 19px; line-height: 1.3; scroll-margin-top: 16px; }
.guide .prose p, .guide .prose ul, .guide .prose ol { max-width: 34em; margin: 0 0 14px; }   /* about 68 characters a line */
.guide .prose p, .guide .prose li { font-size: 17px; line-height: 1.6; }
.guide .prose ul, .guide .prose ol { padding-inline-start: 22px; }
.guide .prose li { margin-bottom: 8px; padding-inline-start: 4px; }
.guide .prose > :last-child { margin-bottom: 0; }
.guide .prose a { text-underline-offset: 3px; }
.guide .prose strong { font-weight: 600; }
.guide .prose kbd { background: var(--plate); }
.guide .prose dfn { font-style: normal; }   /* the first use of a word the guide explains, marked for build.py and for machines */

/* The one warning in a guide that comes before a step that could lock the reader out. build.py makes it from a
   paragraph marked class="caution". It is a plate with a rule down its leading edge and a label in words, so it
   does not rely on colour. The label's colour measures above 4.5 to 1 on the plate, in the light and in the dark. */
.guide .caution { --caution: #A34400; max-width: 34em; margin: 6px 0 18px; padding: 14px 18px 16px; border-inline-start: 4px solid var(--caution); border-radius: 6px 16px 16px 6px; background: var(--plate); }
@media (prefers-color-scheme: dark) { .guide .caution { --caution: #FFB24D; } }
.guide .caution .caution-label { margin: 0 0 4px; color: var(--caution); font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; }
.guide .caution p:last-child { margin: 0; font-weight: 500; }

/* A table sits on a plate. Its cells wrap, so a table of up to four columns fits a phone, down to 320px. One of
   five or more columns may be wider than a small phone, and then scrolls sideways inside its plate, so the page
   itself never does. build.py makes that plate a region the keyboard can reach. The shade at an edge shows there is more that
   way, and goes when that edge is reached. */
.guide .table-scroll { margin: 6px 0 18px; padding: 4px 18px 6px; border-radius: 20px; background: var(--plate); overflow-x: auto; }
.guide .table-scroll[tabindex] {
  --shade: color-mix(in srgb, var(--ink) 30%, transparent);
  background:
    linear-gradient(to right, var(--plate) 50%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(to left, var(--plate) 50%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(to right, var(--shade), transparent) left / 16px 100% no-repeat scroll,
    linear-gradient(to left, var(--shade), transparent) right / 16px 100% no-repeat scroll,
    var(--plate);
}
.guide .table-scroll:focus-visible { outline-color: var(--accent); outline-offset: 2px; border-radius: 20px; }
.guide table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.guide caption { caption-side: top; padding: 10px 0 2px; color: var(--muted); font-size: 13px; text-align: start; }
.guide th, .guide td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.guide th:last-child, .guide td:last-child { padding-inline-end: 0; }
.guide thead th { color: var(--muted); font-weight: 600; }
.guide tbody th { font-weight: 600; }
.guide tbody tr:last-child > * { border-bottom: 0; }

/* The plates under the article. */
.guide .plate { margin-top: 16px; padding: 22px 22px 24px; }
.guide .prose + .plate { margin-top: 48px; }
.guide .plate h2 { margin: 0 0 10px; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.guide .plate p, .guide .plate li { font-size: 17px; line-height: 1.55; }

/* Where a reader finishes: what AuthSome is, and the way to it. */
.guide .app-plate { display: grid; grid-template-columns: 56px 1fr; gap: 6px 16px; align-items: start; }
.guide .app-plate img { grid-row: span 3; width: 56px; height: 56px; }
.guide .app-plate h2 { margin: 2px 0 0; }
.guide .app-plate p { margin: 0; }
.guide .app-plate .app-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 10px; }
.guide .app-plate .app-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.guide .app-plate .button { color: #fff; text-decoration: none; }

.guide .sources li { font-size: 15px; overflow-wrap: anywhere; }
.guide .sources a { text-underline-offset: 3px; }

/* The list of guides, on the index and under each guide. A title is in the text colour and turns violet under the pointer. */
.plate .guide-list { margin: 0; padding: 0; list-style: none; }
.guide-list li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-list li:first-child { padding-top: 0; }
.guide-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.guide .plate .guide-list a { display: block; color: var(--ink); font-size: 18px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.guide .plate .guide-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.guide-list span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.guide .plate .all-guides { margin: 14px 0 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: 16px; }
.guide .plate .all-guides a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 3px; }

/* The index is a list, not an article. */
.guide-index .doc-lede { margin-bottom: 26px; }

@media (max-width: 520px) {
  .guide .prose { margin-top: 38px; }
  .guide .prose > h2 { font-size: 23px; }
  .guide .plate { padding: 18px 18px 20px; }
  .guide .table-scroll { padding-inline: 14px; }
}
@media (max-width: 360px) {
  .guide table { font-size: 14px; }
  .guide th, .guide td { padding-inline-end: 5px; }
  .guide .table-scroll { padding-inline: 12px; }
}
