*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* clip, not hidden: hidden on html+body makes body a scroll container, which breaks the
   sticky search column on wide screens. */
html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-ink);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

[hidden] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: calc(var(--container-wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.125em;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0;
}

.accent {
  color: var(--accent);
}

/* Mono eyebrow label: "// post-chart seat finder" */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin: 0;
}
.eyebrow::before {
  content: '// ';
  opacity: 0.55;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: calc(var(--container-wide) + 2 * var(--gutter));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.brand__name .accent {
  color: var(--accent);
}

/* Header actions: hard refresh + back link */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--accent-soft);
  color: var(--ink);
}
.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.icon-btn:disabled {
  cursor: progress;
}
.icon-btn .icon {
  width: 16px;
  height: 16px;
}
.is-spinning .icon {
  animation: spin 0.8s linear infinite;
}

/* Phones: icon only. */
@media (max-width: 420px) {
  .icon-btn {
    width: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
  }
  .icon-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Back link to the portfolio (krupalvora.github.io). */
.back-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover {
  color: var(--ink);
}

/* Inside the mobile app (mobile/): no portfolio link, no browser-extension links. */
.is-app .back-link,
.is-app .site-footer a[href="install.html"] {
  display: none;
}

.site-footer {
  margin-top: var(--s-7);
  padding: var(--s-6) var(--gutter) var(--s-7);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: var(--s-1);
}

.site-footer__credit {
  margin-top: var(--s-2);
}

/* The app keeps the credit but not the outbound portfolio link (see .is-app above). */
.is-app .site-footer__credit a {
  pointer-events: none;
  color: inherit;
  text-decoration: none;
}

.site-footer strong {
  color: var(--ink-2);
  font-weight: 600;
}
