/* Same cyanotype palette and type as Skill Motion. Fonts are self-hosted. */
@font-face {
  font-family: "Marcellus";
  src: url("./fonts/marcellus-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("./fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("./fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --plate: #17324d;
  --plate-deep: #102539;
  --plate-line: #2d5677;
  --paper: #eef3f1;
  --ink: #dbe6ed;
  --muted: #93abbe;
  --left: #f1b55f;
  --focus: #ffe4a8;
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --ui: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--plate-deep);
  color: var(--ink);
  font: 16px/1.55 var(--ui);
}

html {
  /* The blueprint grid of the viewer's stage, faint. */
  background-image:
    linear-gradient(var(--plate) 1px, transparent 1px),
    linear-gradient(90deg, var(--plate) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
}

body {
  background: none;
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 16px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

a {
  color: var(--paper);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--paper);
  margin: 0;
}

header h1 {
  font-size: 44px;
  line-height: 1.1;
}

header p {
  color: var(--muted);
  margin: 8px 0 0;
}

main {
  flex: 1;
}

.tools {
  list-style: none;
  padding: 0;
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}

.card {
  display: block;
  height: 100%;
  padding: 20px 22px;
  background: var(--plate);
  border: 1px solid var(--plate-line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--left);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 26px;
}

.card p {
  margin: 8px 0 0;
}

.card .needs {
  color: var(--muted);
  font-size: 14px;
}

footer {
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--plate-line);
  padding-top: 16px;
}

footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}

/* Shell: a tool in a frame under a slim tool bar (shell.js). */
body.shell-on {
  max-width: none;
  padding: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
body.shell-on > header,
body.shell-on > main,
body.shell-on > footer {
  display: none;
}
.shell-bar {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  flex-wrap: wrap;
  padding: 6px 16px;
  background: var(--plate-deep);
  border-bottom: 1px solid var(--plate-line);
  font-size: 14px;
}
.shell-bar[hidden] {
  display: none;
}
.shell-home {
  font-family: var(--display);
  font-size: 18px;
  text-decoration: none;
}
.shell-tools {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  min-width: 0;
}
.shell-tools a {
  color: var(--muted);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.shell-tools a:hover {
  color: var(--paper);
}
.shell-tools a[aria-current="true"] {
  color: var(--paper);
  background: var(--plate);
}
.shell-file {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shell-file[hidden] {
  display: none;
}
.shell-file button {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--plate-line);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}
.shell-frame {
  flex: 1;
  width: 100%;
  border: 0;
  display: block;
  min-height: 0;
}
