/* Index shell — chrome bar + layout (themes/tokens.css drives colors) */

.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--bar-h);
  padding-top: env(safe-area-inset-top, 0);
  background: var(--t-bar-bg);
  border-bottom: 1px solid var(--t-bar-edge);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--t-bar-fg);
}

.chrome-track {
  max-width: var(--maxw);
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.chrome-links {
  grid-column: 1;
  justify-self: start;
}

.chrome-links a {
  color: var(--t-bar-muted);
  text-decoration: none;
  font-size: 9px;
}

.chrome-links a:hover {
  color: var(--t-bar-accent);
  text-decoration: underline;
}

.theme-toggle {
  grid-column: 2;
  display: flex;
  gap: 4px;
  align-items: center;
  justify-self: center;
  flex-wrap: wrap;
  justify-content: center;
}

.theme-btn {
  appearance: none;
  border: 1px solid var(--t-bar-edge);
  background: var(--t-btn-bg);
  color: var(--t-bar-fg);
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.theme-btn:hover {
  color: var(--t-bar-active);
  border-color: var(--t-bar-muted);
}

.theme-btn[aria-pressed="true"] {
  color: var(--t-bar-active);
  background: var(--t-btn-active);
  border-color: var(--t-bar-accent);
  box-shadow: 0 0 0 1px var(--btn-active-ring);
  font-weight: 700;
}

.theme-btn .swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

.theme-btn[data-theme="crt"] .swatch { background: #3bf07a; }
.theme-btn[data-theme="github"] .swatch { background: #58a6ff; }
.theme-btn[data-theme="paper"] .swatch-light {
  background: #faf8f2;
  border: 1px solid #d9d3c6;
  box-sizing: border-box;
}

.actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.actions a {
  color: var(--t-bar-muted);
  text-decoration: none;
  font-size: 9px;
}

.actions a:hover {
  color: var(--t-bar-accent);
  text-decoration: underline;
}

#resume-root {
  padding-top: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .theme-btn { transition: none; }
}

@media screen and (max-width: 640px) {
  .chrome-track { padding: 0 10px; }
  .theme-btn { padding: 5px 8px; font-size: 9px; }
  .actions .hint { display: none; }
}

@media screen and (max-width: 480px) {
  .chrome-track {
    grid-template-columns: auto 1fr auto;
    gap: 6px;
  }

  .chrome-links {
    grid-column: 1;
  }

  .theme-toggle {
    grid-column: 2;
    justify-self: center;
    gap: 3px;
  }

  .actions {
    grid-column: 3;
    justify-self: end;
    gap: 8px;
  }

  .theme-btn .theme-name {
    display: none;
  }

  .theme-btn .swatch {
    margin-right: 0;
  }

  .theme-btn {
    padding: 7px 9px;
    min-width: 28px;
  }
}

@media print {
  .chrome { display: none; }
  #resume-root { padding-top: 0; }
}
