/* Additions to styles.css made for the built site. styles.css stays the design system of the
   mockups; rules here cover parts that only exist in the application. */

/* Skip link, visible when focused. */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: 8px 12px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

/* Website menu on small screens: the Menu button opens the main links (js/site.js). */
@media (max-width: 960px) {
  .site-header.is-open .site-nav { display: flex; flex-direction: column; gap: 0; width: 100%; margin: 0 0 12px; order: 10; }
  .site-header.is-open .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-header.is-open .header-cta { display: inline-flex; order: 11; margin: 0 0 16px; }
}

/* Buttons that look like links, for actions sent by POST such as signing out. */
.link-button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--red); }
.app-sidebar-foot form { margin: 4px 0 0; }
.app-sidebar-foot .link-button { color: #D9E0EA; }
.app-sidebar-foot .link-button:hover { color: #fff; }

/* Style warnings under a field: shown, but they do not block the save. */
.field-warning { font-size: 14px; color: var(--amber); margin: 0; }
.crm .field-warning { font-size: 13px; }

/* Messages after an action. */
.messages { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.messages li { margin: 0; }

/* Sign-in pages. */
.login-box .brand { margin-bottom: 28px; }
.login-box input[type="email"], .login-box input[type="password"], .login-box input[type="text"] { min-height: 44px; font-size: 16px; }
.login-box input.code-input { font: 500 20px/1.2 var(--mono); }
.login-note { flex: 0 0 100%; margin: 0; text-align: center; }
.qr { display: block; width: 200px; height: 200px; margin: 0 0 16px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.qr svg { width: 100%; height: 100%; }
.secret-key { font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.recovery-codes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-family: var(--mono); font-size: 16px; }
.recovery-codes li { margin: 0; }

/* Error pages. */
.error-page { padding: 72px 0; }

/* The hidden attribute wins over the display rules of components (author rules beat the browser's own
   [hidden] rule), for example the parts of the request form that do not apply to the type chosen. */
.site [hidden], .crm [hidden] { display: none !important; }

/* Website headings on tablets and phones. The 960 px rules of styles.css (:where(.site) h1 and h2) lose
   to the base .site h1 and .site h2, so they are restated here, with the headings that keep their size. */
@media (max-width: 960px) {
  .site h1 { font-size: 34px; }
  .site .page-header h1 { font-size: 32px; }
  .site h2 { font-size: 26px; }
  .site .cta-band h2 { font-size: 24px; }
  .site .aside-box h2 { font-size: 20px; }
  .site .footer-grid h2 { font-size: 15px; }
}

/* Line drawings in figures scale with their column. */
.figure svg { width: 100%; height: auto; }
