:root {
  --bg: #f6f7f3;
  --ink: #1e2528;
  --muted: #454f4f;
  --line: #d9ded8;
  --panel: #ffffff;
  --teal: #00565d;
  --teal-dark: #004f57;
  --coral: #86311d;
  --shadow: 0 12px 30px rgba(31, 45, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

/* WCAG 2.2 AAA: every palette pair above is at least 7:1, focus is a solid 3px ring, and every
   control is at least 44px tall. */
:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  background: var(--panel);
  color: var(--teal-dark);
  font-weight: 800;
  padding: 10px 14px;
}

.skip-link:focus {
  top: 8px;
}

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

button {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  min-width: 44px;
  padding: 9px 13px;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-copy {
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 18px;
}

.auth-error {
  border: 1px solid #ebb59f;
  border-radius: 6px;
  color: #84341d;
  margin: 14px 0 0;
  padding: 10px 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.primary-button {
  background: var(--teal);
  color: white;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.app-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.topbar {
  margin-bottom: 20px;
}

.auth-user {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.ghost-button {
  background: #eef4f2;
  border-color: #cbd8d5;
  color: var(--teal-dark);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: inherit;
  padding: 20px;
  text-decoration: none;
}

.tool-tile:hover {
  border-color: var(--teal);
}

.tool-tile h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.tool-tile p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.shell-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
}

.shell-home {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.shell-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px;
}

.shell-nav a {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  padding: 6px 10px;
  text-decoration: none;
}

.shell-nav a[aria-current="page"] {
  background: #eef4f2;
  color: var(--teal-dark);
}

.shell-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.shell-frame {
  border: 0;
  flex: 1;
  width: 100%;
}
