/*
 * Markdown Eye — web/web.css
 *
 * Layered on top of styles.css, which is copied verbatim from the desktop app.
 * Nothing here restyles the app; it only covers what a browser tab has that an
 * Electron window doesn't: the markdowneye.com wordmark, the help popover that
 * stands in for the native Help menu, the extra empty-state links, and a
 * <noscript> message. Keeping it separate means styles.css can be regenerated
 * from renderer/styles.css at any time without a merge.
 */

/* ---- viewport ----------------------------------------------------------- */

/* 100vh on a phone means "including the URL bar", which cuts off the status
   bar until you scroll. dvh is the modern, honest answer; browsers that don't
   know it keep the 100vh from styles.css. */
@supports (height: 100dvh) {
  body {
    height: 100dvh;
  }
}

/* ---- brand: the wordmark carries the domain ----------------------------- */

/* In the desktop window .brand is a plain <div>; here it is the link home, so
   it needs the underline and the user-agent link colour taken back off. The
   logo sets its own colour, and both halves of the wordmark set theirs. */
.brand {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
}
.brand:hover .brand-name {
  color: var(--accent-text, var(--accent));
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.brand-domain {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ---- help popover ------------------------------------------------------- */

/* Reuses .theme-menu for its shell, so it inherits the panel, the shadow and
   the blur. Only the bits a theme swatch would have occupied differ. */
.help-menu {
  width: 268px;
}
.help-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--accent-text, var(--accent));
}
.help-foot {
  margin: 6px 2px 2px;
  padding-top: 7px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted-2);
}
.help-foot a {
  display: block;
  margin-top: 2px;
  color: var(--accent-text, var(--accent));
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.help-foot a:hover {
  border-bottom-color: var(--accent-text-line, var(--accent-line));
}
/* Developer credit, last line of the Help popover. Its own hairline separates it
   from the two sentences above, which are about the app; this one is about who
   made it. Deliberately quieter than the "About Markdown Eye" link above it —
   it is a signature, not somewhere the reader is being sent. */
.help-credit {
  display: block;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  font-size: 10.5px;
  color: var(--muted-2);
}
.help-foot .help-credit a {
  display: inline;
  margin-top: 0;
  color: var(--muted);
}
.help-foot .help-credit a:hover {
  color: var(--accent-text, var(--accent));
}

/* ---- empty state: guides and the privacy note --------------------------- */

.empty-links {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.empty-privacy {
  margin: 18px auto 0;
  max-width: 42ch;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-2);
}

/* A button that reads as a link — so "welcome guide" can sit inside a sentence
   without pretending to be a navigable href. */
.linkish {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent-text, var(--accent));
  border-bottom: 1px solid var(--accent-text-line, var(--accent-line));
  cursor: pointer;
}
.linkish:hover {
  color: var(--accent-strong, var(--accent));
}
.linkish:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- status bar wordmark ------------------------------------------------ */

.status-mark {
  color: var(--muted-2);
}

/* ---- no JavaScript ------------------------------------------------------ */

/* The whole app is client-side rendering, so without scripts there is nothing
   to show. Say so plainly, and say the privacy part too — it's the one thing
   someone reading a noscript message might actually want to know. */
.noscript {
  margin: 0;
  padding: 12px 18px;
  background: #1b1e24;
  color: #e9edf2;
  border-bottom: 1px solid #262a31;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- responsive -------------------------------------------------------- */

/* Below the desktop app's narrowest supported width there isn't room for two
   lines of brand plus a filename, so the domain steps out of the toolbar. It
   is still in the status bar, the title and the page itself. */
@media (max-width: 1080px) {
  .brand-domain {
    display: none;
  }
}
@media (max-width: 860px) {
  .status-mark {
    display: none;
  }
}

/* ---- print ------------------------------------------------------------- */

/* styles.css already strips the chrome for Ctrl+P; these are the web-only
   additions it doesn't know about. */
@media print {
  .noscript,
  .empty-links,
  .empty-privacy,
  .help-menu,
  .status-mark {
    display: none !important;
  }
}
