/* The top bar, the same on every page: SantaRow, the product links, Auto/Light/Dark, Sign in.
   It sets its own font and width so the page around it can't move it. The sign-in dialog too. */
[hidden] { display: none !important; }
/* Keep the scrollbar's room on every page, so short and long pages put the bar in the same place. */
html { scrollbar-gutter: stable; }
nav { border-bottom: 1px solid var(--line); font: 14px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; letter-spacing: 0; }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; max-width: 980px; margin: 0 auto; padding: 0 22px; }
nav .brand { color: var(--fg); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
nav .right { display: flex; align-items: center; gap: 16px; }
nav .navlink { color: var(--dim); text-decoration: none; font-size: 14px; }
nav .navlink:hover, nav .navlink[aria-current="page"] { color: var(--fg); }

nav .theme { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 980px; }
nav .theme button {
  border: 0; background: none; color: var(--dim); font: inherit; font-size: 13px; line-height: 1;
  padding: 5px 10px; border-radius: 980px; cursor: pointer;
}
nav .theme button:hover { color: var(--fg); }
nav .theme button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
nav .theme button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

nav .signin {
  font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; border-radius: 980px; white-space: nowrap;
  border: 1px solid var(--line); background: none; color: var(--fg); padding: 5px 12px;
}
nav .signin:hover { border-color: var(--dim); }
nav .me { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
nav .me img { width: 24px; height: 24px; border-radius: 50%; background: var(--line); flex: none; }
nav .me button { font: inherit; font-size: 13px; cursor: pointer; border: 0; background: none; color: var(--dim); padding: 0; text-decoration: underline; white-space: nowrap; }

@media (max-width: 520px) { nav .me .name { display: none; } nav .right { gap: 10px; } nav .theme button { padding: 5px 8px; } }
/* A phone has no room for the links, the theme switch and Sign in; it follows the phone's setting. */
@media (max-width: 420px) { nav .theme { display: none; } nav .right { gap: 12px; } nav .navlink { font-size: 13px; } nav .signin { padding: 5px 10px; } }

dialog.sign {
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--fg);
  padding: 28px; width: min(360px, calc(100vw - 32px));
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
dialog.sign::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.sign h2 { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 6px; text-align: left; }
dialog.sign p { color: var(--dim); font-size: 15px; margin: 0 0 18px; }
dialog.sign .provider {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px;
  margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  color: var(--fg); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
}
dialog.sign .provider:hover { border-color: var(--dim); }
dialog.sign .provider svg { width: 20px; height: 20px; }
dialog.sign .fine { font-size: 14px; }
dialog.sign .fine a { color: var(--dim); }
dialog.sign .close { margin-top: 6px; border: 0; background: none; color: var(--dim); font: inherit; font-size: 14px; cursor: pointer; }
