:root {
  --ink: #1d2923;
  --muted: #5c6961;
  --paper: #fffef9;
  --canvas: #edf1ec;
  --line: #cbd4cc;
  --green: #24543c;
  --green-light: #e1eee5;
  --blue: #315e78;
  --red: #a33b35;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

button {
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #e0a52b;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  top: 1rem;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  padding: clamp(2rem, 6vw, 5rem) max(1rem, calc((100vw - 1180px) / 2));
  background: var(--green);
  color: white;
}

.guide-header > div {
  max-width: 820px;
}

.guide-header h1 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.guide-header p:last-child {
  max-width: 68ch;
  margin: 0;
  color: #e4eee7;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-header .eyebrow {
  color: #f2c1bc;
}

.app-link {
  flex: 0 0 auto;
  border: 1px solid white;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  color: white;
  font-weight: 850;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.contents {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
}

.contents strong {
  margin-bottom: 0.2rem;
}

.contents a {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.guide-content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
}

.guide-content section {
  min-width: 0;
  scroll-margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2.4rem);
  background: var(--paper);
}

.admin-guide {
  order: 99;
  scroll-margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.authoring-guide {
  order: 98;
}

.admin-guide > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.admin-guide > summary::-webkit-details-marker {
  display: none;
}

.admin-guide > summary strong,
.admin-guide > summary small {
  display: block;
}

.admin-guide > summary strong {
  color: var(--ink);
}

.admin-guide > summary small {
  margin-top: 0.15rem;
}

.admin-guide .toggle-label {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-guide[open] > summary {
  border-bottom: 1px solid var(--line);
}

.admin-guide[open] .toggle-label {
  font-size: 0;
}

.admin-guide[open] .toggle-label::before {
  content: "Hide directions";
  font-size: 0.82rem;
}

.admin-guide > section {
  margin: 1rem;
}

h2,
h3,
p {
  margin-top: 0;
}

h2,
h3 {
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.85rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.15rem;
}

p,
li {
  max-width: 78ch;
}

code {
  border-radius: 3px;
  padding: 0.08rem 0.28rem;
  background: #e8ede8;
  color: #183c2a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  border-left: 5px solid var(--green);
  border-radius: 4px;
  padding: 1rem;
  background: #17251e;
  color: #f4f7f4;
  font-size: 0.88rem;
  line-height: 1.55;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.steps {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.5rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.workflow-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: #f7f9f6;
}

.workflow-card.recommended {
  border-color: #96b5a0;
  background: var(--green-light);
}

.workflow-card h3 {
  margin-top: 0;
}

.path-label {
  margin-bottom: 0.4rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-directions {
  border: 1px solid #a9bdca;
  border-radius: var(--radius);
  padding: 1.2rem;
  background: #edf4f7;
}

.student-directions .steps {
  margin: 0;
}

.field-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.2rem 0;
}

.field-row {
  display: grid;
  grid-template-columns: 150px 120px minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem;
}

.field-row:first-child {
  border-top: 0;
}

.field-heading {
  background: var(--green-light);
  font-weight: 900;
}

.important {
  border-left: 5px solid var(--red);
  border-radius: 4px;
  padding: 1rem;
  background: #f7e4e1;
}

.important p {
  margin-bottom: 0;
}

.note {
  margin-top: 1.5rem;
  border-left: 5px solid var(--blue);
  padding: 1rem 1.2rem;
  background: #eaf1f5;
}

.note strong {
  color: #244c63;
}

.note p {
  margin: 0.35rem 0 0;
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--green-light);
}

.prompt-toolbar strong,
.prompt-toolbar span {
  display: block;
}

.prompt-toolbar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.prompt-toolbar button {
  border: 0;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.ai-prompt {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
}

@media (max-width: 900px) {
  .guide-header {
    display: grid;
    align-items: start;
  }

  main {
    grid-template-columns: 1fr;
  }

  .contents {
    position: static;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .admin-guide > summary {
    align-items: flex-start;
  }
}
