:root {
  --navy: #0a1223;
  --gold: #e8ad24;
  --bg: #f5f6f8;
  --line: #e3e7ee;
  --muted: #647086;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--navy);
  background: var(--bg);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
header {
  height: 78px;
  background: var(--navy);
  color: #fff;
  padding: 0 5%;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 3px solid var(--gold);
}
.brand {
  font-size: 21px;
  letter-spacing: 1px;
  font-weight: 850;
  color: white;
  text-decoration: none;
}
.brand span {
  color: var(--gold);
}
.brand small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  margin-left: 18px;
}
.headerlabel {
  color: #aebacf;
  font-size: 12px;
}
header button {
  margin-left: auto;
  background: transparent;
  color: #ddd;
  border-color: #46516a;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 44px 36px;
  min-height: 80vh;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  margin-bottom: 34px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #987219;
}
h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -1.3px;
  margin: 12px 0 16px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin: 0 0 9px;
}
p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 18px;
}
button {
  font: inherit;
  font-weight: 650;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--navy);
  cursor: pointer;
}
button:hover {
  border-color: var(--gold);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #211900;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  border: 1px solid var(--line);
  padding: 20px;
  background: white;
  border-radius: 12px;
}
.stat b {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}
.stat small {
  color: var(--muted);
}
nav {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
  overflow: auto;
}
nav button {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 12px 0 16px;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
nav button.selected {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.toolbar {
  display: flex;
  gap: 10px;
  margin: 12px 0 24px;
}
.toolbar input {
  flex: 1;
  min-width: 120px;
}
input,
select,
textarea {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--navy);
}
.toolbar select {
  width: auto;
  max-width: 190px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}
label input,
label select,
label textarea {
  margin-top: 6px;
}
textarea {
  resize: vertical;
}
.items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.item,
.panel,
.idea {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 24px;
}
.item.important {
  border-top: 3px solid var(--gold);
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.3px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #eff2f7;
  color: #46546d;
}
.tag.gold {
  background: #fff2cf;
  color: #8a6410;
}
.item h2 {
  font-size: 19px;
  line-height: 1.4;
}
.item h2 a {
  color: inherit;
  text-decoration: none;
}
.item h2 a:hover {
  text-decoration: underline;
}
.meta,
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.item p {
  font-size: 13px;
}
.item ul {
  padding-left: 18px;
  color: #46546d;
  line-height: 1.6;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.actions button {
  font-size: 11px;
  padding: 7px 10px;
}
.actions a {
  font-size: 12px;
  color: #746026;
  margin-left: auto;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  background: white;
  border: 1px dashed #cbd2de;
  border-radius: 12px;
  padding: 60px 24px;
}
.empty h2 {
  font-size: 21px;
}
.sourceform {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.wide {
  grid-column: 1/-1;
}
.sourceform button {
  justify-self: start;
}
.sourcerow {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
}
.sourcerow .info {
  flex: 1;
  min-width: 0;
}
.sourcerow a {
  display: block;
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin: 4px 0;
}
.sourcerow button {
  font-size: 11px;
}
.error {
  color: #ad3a34;
  font-size: 12px;
  line-height: 1.6;
}
.ideagrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.idea h2 {
  font-size: 18px;
  line-height: 1.4;
}
.idea .exercise {
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
}
.idea a {
  font-size: 11px;
  color: #8a6410;
}
.settingsgrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.settingsgrid label {
  margin: 18px 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
.event {
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  line-height: 1.7;
}
.login {
  max-width: 430px;
  margin: 40px auto;
  background: white;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.login h1 {
  font-size: 30px;
}
.login label {
  margin: 18px 0;
}
.login button {
  width: 100%;
}
#message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 12px 20px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  box-shadow: 0 8px 20px #0002;
  z-index: 10;
}
#message:empty {
  display: none;
}
footer {
  max-width: 1240px;
  margin: auto;
  padding: 24px 36px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
footer span {
  float: right;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  main {
    padding: 25px 18px;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 30px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .items,
  .ideagrid,
  .settingsgrid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input {
    width: 100%;
    flex-basis: 100%;
  }
  .headerlabel {
    display: none;
  }
  .sourcerow {
    flex-wrap: wrap;
  }
  .sourceform {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  header {
    padding: 0 18px;
  }
  nav {
    gap: 18px;
  }
  footer span {
    float: none;
    display: block;
    margin-top: 10px;
  }
}
