/* diskdiary.com — shared tokens, header, buttons, footer, text pages and the screenshot viewer. */

:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --bg-alt: #f2f4f8;
  --card: #ffffff;
  --text: #15171c;
  --muted: #5d636f;
  --faint: #8a909b;
  --line: rgba(18, 26, 44, 0.1);
  --line-strong: rgba(18, 26, 44, 0.16);
  --accent: #1a6fdc;
  --accent-hover: #155cb8;
  --accent-text: #ffffff;
  --accent-soft: rgba(26, 111, 220, 0.1);
  --growth: #d8392b;
  --shrink: #1c9548;
  --navy: #0b1d4d;
  --navy-2: #244880;
  --sun: #ed9747;
  --header: rgba(251, 251, 253, 0.8);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 30px 60px -24px rgba(16, 24, 40, 0.32);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 32px -16px rgba(16, 24, 40, 0.18);
  --radius: 22px;
  --wrap: 1180px;
  --gutter: 32px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0f;
    --bg-alt: #111319;
    --card: #171a21;
    --text: #f2f3f6;
    --muted: #a3a8b3;
    --faint: #7c818c;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #4b94ff;
    --accent-hover: #6ea9ff;
    --accent-text: #ffffff;
    --accent-soft: rgba(75, 148, 255, 0.14);
    --growth: #ff6f61;
    --shrink: #45d07c;
    --header: rgba(10, 11, 15, 0.74);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 30px 60px -24px rgba(0, 0, 0, 0.85);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { flex: 1; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; top: -100px; left: 16px; z-index: 20; padding: 10px 14px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-soft); }
.skip-link:focus { top: 12px; }

/* Header */

.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { width: auto; height: 44px; }
.links { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.links a { color: var(--text); padding: 7px 12px; border-radius: 999px; transition: background-color .15s; }
.links a:hover { background: var(--bg-alt); text-decoration: none; }
.links .pill { margin-left: 8px; background: var(--accent); color: var(--accent-text); font-weight: 600; padding: 8px 16px; }
.links .pill:hover { background: var(--accent-hover); }

/* Buttons and links that act like them */

.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text);
  font-size: 16px; font-weight: 600; line-height: 1.2;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 8px 20px -8px rgba(26, 111, 220, .6);
  transition: background-color .15s, transform .15s;
}
.button:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); }
.text-link { font-size: 15px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

.eyebrow {
  margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.requirements { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* Text pages: Support, Privacy, 404 */

.plain { max-width: 760px; padding-top: 72px; padding-bottom: 112px; }
.plain h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -.03em; }
.plain h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; margin: 44px 0 10px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.plain .contact + h2 { border-top: 0; padding-top: 0; }
.plain p, .plain li { color: var(--muted); }
.plain p strong, .plain li strong { color: var(--text); }
.plain ul { padding-left: 20px; }
.plain li { margin: 8px 0; }
.plain li::marker { color: var(--faint); }
.plain .updated { color: var(--muted); margin: 12px 0 0; font-size: 19px; }
.plain code { font: 14px/1.4 var(--mono); color: var(--text); background: var(--bg-alt); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.contact {
  margin: 36px 0 52px; padding: 22px 24px 22px 64px; position: relative;
  border-radius: 18px; background: var(--accent-soft); border: 1px solid var(--line);
}
.contact::before {
  content: "@"; position: absolute; left: 22px; top: 22px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 15px; line-height: 1;
}
.contact p { margin: 0; color: var(--text); }
.missing { text-align: center; padding-top: 120px; }
.missing img { margin: 0 auto 28px; filter: drop-shadow(0 18px 30px rgba(11, 29, 77, .35)); }

/* Footer */

.bottom { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--bg); }
.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 24px; padding-bottom: 32px; }
.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.bottom a { color: var(--muted); }
.bottom a:hover { color: var(--text); }

/* Screenshot viewer */

.screenshot-link { display: block; cursor: zoom-in; border-radius: 12px; }
.viewing-screenshot { overflow: hidden; }
.screenshot-viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 64px 24px 24px; border: 0; background: transparent; }
.screenshot-viewer[open] { display: flex; align-items: center; justify-content: center; }
.screenshot-viewer::backdrop { background: rgba(5, 8, 16, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.screenshot-viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.viewer-close { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font: 26px/1 system-ui, sans-serif; cursor: pointer; }
.viewer-close:hover { background: rgba(255, 255, 255, .2); }
.viewer-close:focus-visible { outline-color: #fff; }

/* Narrow windows and phones */

@media (max-width: 980px) { .top .nav-detail { display: none; } }
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .top .wrap { height: 58px; gap: 8px; }
  .logo img { height: 38px; }
  .links { font-size: 13px; }
  .links a { padding: 6px 8px; }
  .links .pill { margin-left: 4px; padding: 7px 13px; }
  .plain { padding-top: 48px; padding-bottom: 80px; }
  .contact { padding: 18px 18px 18px 56px; }
  .contact::before { left: 16px; top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Optional website analytics; equal choices, available again on every page. */
.analytics-choice[hidden], .analytics-settings[hidden] { display: none; }
.analytics-choice { position: fixed; z-index: 100; bottom: 58px; left: 16px; right: 16px; max-width: 560px; margin: 0 auto; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font-size: 15px; }
.analytics-choice p { margin: 0 0 14px; }
.analytics-choice > div { display: flex; gap: 12px; }
.analytics-choice button { flex: 1; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-alt); color: var(--text); cursor: pointer; font: inherit; }
.analytics-settings { position: fixed; z-index: 99; left: 12px; bottom: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--card); font: 12px/1.4 system-ui, sans-serif; cursor: pointer; }
.analytics-choice button:focus-visible, .analytics-settings:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
