:root {
  color-scheme: light;
  font-family: Arial, "Helvetica Neue", sans-serif;
  background: #f6f7f9;
  color: #17191f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  font: inherit;
}

.shell {
  width: min(920px, calc(100vw - 32px));
  margin: 32px auto;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #d8dde6;
}

header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d8dde6;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #596274;
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: 36px;
}

a {
  color: #214f9f;
}

nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #ffffff;
}

.navigator strong,
.navigator span {
  display: block;
}

.navigator strong {
  margin-bottom: 6px;
  font-size: 20px;
}

.navigator span {
  color: #596274;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.nav-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c9d0dc;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.nav-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.word {
  display: block;
  padding: 14px;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
}

.word-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.word-link strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.word-link span {
  color: #596274;
}

.word-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.word-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #c9d0dc;
  border-radius: 8px;
  background: #ffffff;
  color: #214f9f;
  cursor: pointer;
}

.word-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ai-status {
  color: #596274;
  font-size: 14px;
}

.tutor-insight,
.ai-response {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #d8dde6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.7;
}

.word.is-collapsed {
  padding-bottom: 12px;
}

.empty {
  color: #596274;
}

@media (max-width: 720px) {
  .navigator {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-actions button,
  .word-actions button {
    flex: 1 1 96px;
  }
}
