/* Self-hosted fonts — Inter & Sora are variable fonts, one file covers all weights */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #171411;
  --bg-card: #1e1b17;
  --bg-card-hover: #27231e;
  --border: #362f28;
  --text: #ddd6ca;
  --text-dim: #807870;
  --accent: #cc9a6a;
  --accent-hover: #daa878;
  --accent2: #cc9a6a;
  --accent2-hover: #daa878;
  --color-valid: #6aaa7a;
  --color-error: #c06050;
  --color-boolean: #9a8ab0;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* header */
header {
  margin-bottom: 4rem;
  padding-top: 1rem;
}

.site-name {
  font-family: 'Sora', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 0.5rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 400;
}

/* sections */
section {
  margin-bottom: 3.5rem;
}

h2 {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* tool cards */
.tool-grid {
  display: flex;
  flex-direction: column;
}

.tool-card {
  display: block;
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
  position: relative;
}

.tool-card:last-child {
  border-bottom: none;
}

.tool-card:hover {
  color: var(--accent);
}

.tool-card:hover h3 {
  color: var(--accent);
}

.card-icon {
  display: none;
}

.tool-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}

.tool-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.card-tag {
  display: none;
}

/* links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-pill {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.link-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* tool sub-page layout */
.tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.back-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tool-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.tool-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.tool-desc-spaced {
  margin-top: 1.25rem;
}

/* shared dev-tool chrome (toolbar + status bar) */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tool-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tool-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.tool-btn:active {
  transform: scale(0.97);
}

.tool-btn.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}

.tool-btn.copied {
  border-color: var(--color-valid);
  color: var(--color-valid);
}

.tool-btn-small {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.8rem;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 0.7rem;
  min-height: 1.8rem;
}

.status-message {
  color: var(--text-dim);
  transition: color 0.2s;
}

.status-message.valid {
  color: var(--color-valid);
}

.status-message.error {
  color: var(--color-error);
}

.status-stats {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .site-name {
    font-size: 1.8rem;
  }

  .container {
    padding: 2rem 1rem;
  }

  .toolbar {
    padding: 0.5rem;
  }
}

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