/* Shared by aristotle.html and aristotle-community.html */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0a0a0a;
  --dark:    #141414;
  --white:   #ffffff;
  --off:     #f4f4f4;
  --accent:  #1b3d7a;
  --accent2: #2a5cad;
  --text:    #1a1a1a;
  --muted:   #666666;
  --light:   #e8e8e8;
  --warn:    #9a5b00;
  --warn-bg: #fff6e5;
  --error:   #a12a2a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: 17px;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--accent);
}
.nav-logo { text-decoration: none; display: flex; align-items: center; }
.nav-logo-img { height: 52px; width: auto; display: block; }
.nav-links { display: flex; list-style: none; }
.nav-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 0 1.1rem;
  height: 64px;
  display: flex; align-items: center;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); border-bottom-color: var(--accent); }

/* ── SERVER WAKE-UP BANNER ── */
.wake-banner {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 300;
  width: min(460px, calc(100% - 2rem));
  background: var(--white); border: 1px solid var(--light); border-top: 3px solid var(--accent);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18); padding: 1rem 1.2rem;
}
.wake-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.wake-text { font-size: 0.9rem; font-weight: 300; line-height: 1.5; margin: 0.3rem 0 0.7rem; }
.wake-bar { height: 6px; background: var(--light); overflow: hidden; }
.wake-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }
.wake-time { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; text-align: right; }

/* ── HERO ── */
.hero {
  position: relative;
  background: var(--black);
  padding: 9rem 5rem 4rem;
}
.hero-signin {
  position: absolute; top: calc(64px + 1.2rem); right: 5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.8); text-decoration: none;
  border: 1px solid rgba(255,255,255,0.35); padding: 0.45rem 1rem;
  transition: color 0.2s, border-color 0.2s;
}
.hero-signin:hover { color: var(--white); border-color: var(--accent); }
.hero-inner { max-width: 1200px; }
.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.8rem;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.2rem;
}
.hero-title-sub {
  display: block;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.8);
}
.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2.5rem;
  max-width: 620px;
  line-height: 1.7;
}
.btn-primary {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.9rem 2.4rem;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); }
.link-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  margin-left: 1.5rem;
}
.link-btn:hover { color: var(--white); }

/* ── SECTIONS ── */
section { padding: 3rem 3rem; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--black);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.section-rule {
  width: 50px; height: 3px;
  background: var(--accent);
  margin-bottom: 1.5rem;
}
.body-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: #333;
  margin-bottom: 0.8rem;
}

/* ── FRAMEWORK LIST ── */
.framework-list {
  list-style: none;
  margin: 1.5rem 0;
  max-width: 600px;
}
.framework-list li {
  font-size: 1rem;
  font-weight: 400;
  padding: 0.6rem 0 0.6rem 1.2rem;
  border-bottom: 1px solid var(--light);
  position: relative;
  color: var(--text);
}
.framework-list li:last-child { border-bottom: none; }
.framework-list li::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--accent);
}

/* ── NAMESAKE ── */
#aristotle-history { background: var(--off); }
.namesake-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.namesake-text { flex: 1; }
.namesake-portrait { flex: 0 0 220px; }
.namesake-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--light);
}

/* ── CTA SECTION ── */
#launch {
  background: var(--accent);
  padding: 3rem 3rem;
  text-align: center;
}
.btn-launch {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.1rem 3rem;
  background: var(--white);
  color: var(--accent);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-launch:hover { background: var(--off); transform: translateY(-2px); }

/* ── QUESTIONNAIRE ── */
#survey { padding: 7rem 3rem 4rem; min-height: calc(100vh - 80px); }
.survey-inner { max-width: 760px; margin: 0 auto; }
.progress-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.save-status { letter-spacing: 0.05em; text-transform: none; font-weight: 400; font-family: 'Barlow', sans-serif; }
.save-status.error { color: var(--error); }
.progress-bar { height: 4px; background: var(--light); margin-bottom: 2.5rem; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.25s; }
.q-text {
  font-size: 1.35rem; font-weight: 500; line-height: 1.5;
  color: var(--black);
  margin-bottom: 1.5rem;
}
.q-helper {
  font-size: 1rem; font-weight: 300; line-height: 1.7; color: #333;
  background: var(--off);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.q-helper p + p { margin-top: 0.5rem; }
.q-text a { color: var(--accent2); }
.q-text .qnum { color: var(--accent); font-weight: 600; margin-right: 0.5rem; }
.q-group + .q-group { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--light); }

/* Definitions and notes sit in a margin column beside the question */
.survey-inner.wide { max-width: 1080px; }
.q-layout.has-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  grid-template-areas: "text aside" "answer aside";
  grid-template-rows: auto 1fr;
  column-gap: 2.5rem;
}
.q-layout.has-aside.type-matrix { grid-template-areas: "text aside" "answer answer"; grid-template-rows: auto auto; }
.q-layout.has-aside .q-text { grid-area: text; }
.q-layout.has-aside .q-answer { grid-area: answer; }
.q-aside {
  grid-area: aside; align-self: start;
  font-size: 0.92rem; font-weight: 300; font-style: italic; line-height: 1.6; color: #444;
  border-left: 2px solid var(--accent2);
  padding: 0.2rem 0 0.2rem 1rem;
}
.q-aside p + p { margin-top: 0.5rem; }
.q-aside-label {
  font-family: 'Barlow Condensed', sans-serif; font-style: normal;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 0.3rem;
}
textarea, input.q-input, select.q-input {
  width: 100%;
  font-family: 'Barlow', sans-serif; font-size: 1.05rem; font-weight: 400;
  color: var(--text);
  border: 1px solid #c8c8c8;
  padding: 0.8rem 0.9rem;
  background: var(--white);
}
textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
textarea:focus, input.q-input:focus, select.q-input:focus { outline: 2px solid var(--accent2); outline-offset: -1px; border-color: var(--accent2); }
input.q-input.num { width: 9rem; }
.selects { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.selects label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.selects select { width: 12rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0 2rem; }
.checks label { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; padding: 0.35rem 0; cursor: pointer; }
.checks input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.unit { margin-left: 0.6rem; color: var(--muted); }

.matrix { display: grid; grid-template-columns: 8.5rem repeat(3, 1fr); gap: 0.4rem; }
.matrix .mh {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  align-self: end; padding-bottom: 0.2rem;
}
.matrix .mr {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; align-self: center;
}
.matrix textarea { min-height: 110px; font-size: 0.95rem; padding: 0.5rem; }
.matrix .cell-label { display: none; }

.alloc { display: grid; grid-template-columns: repeat(2, minmax(0, 12rem)); gap: 1rem 2rem; }
.alloc label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.alloc-wrap { display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; }
.alloc-pie { width: 250px; height: auto; flex: 0 0 auto; overflow: visible; }
.pie-label {
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; fill: var(--text);
  opacity: 0; transition: transform 0.35s ease, opacity 0.2s ease;
}
.pie-label.shown { opacity: 1; }
.pie-empty { fill: var(--off); stroke: var(--light); stroke-width: 1; }
.pie-slice {
  fill: none; stroke-width: 50;
  transition: stroke-dasharray 0.35s ease, stroke-dashoffset 0.35s ease;
}
.swatch { display: inline-block; width: 0.75em; height: 0.75em; margin-right: 0.45em; border-radius: 2px; vertical-align: baseline; }
.slice-0 { stroke: #1b3d7a; background: #1b3d7a; }
.slice-1 { stroke: #2f8f8a; background: #2f8f8a; }
.slice-2 { stroke: #6f9be0; background: #6f9be0; }
.slice-3 { stroke: #c98a1b; background: #c98a1b; }
.alloc-total { margin-top: 1.2rem; color: var(--muted); }
.alloc-warning {
  margin-top: 0.8rem; padding: 0.7rem 1rem;
  background: var(--warn-bg); color: var(--warn); border-left: 3px solid var(--warn);
}

.q-nav {
  display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--light);
}
.q-nav .spacer { flex: 1; }
.btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--accent);
  background: var(--white); color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--off); }
.btn.primary { background: var(--accent); color: var(--white); }
.btn.primary:hover { background: var(--accent2); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn:disabled { opacity: 0.4; cursor: default; }

.review-section { margin-bottom: 2.5rem; }
.review-section h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--black);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.4rem; margin-bottom: 0.5rem;
}
.review-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--light);
  font: inherit; color: inherit;
  padding: 1rem 0.6rem; cursor: pointer;
}
.review-item:hover { background: var(--off); }
.review-item .rq { font-weight: 500; margin-bottom: 0.35rem; }
.review-item .rq .rid { color: var(--accent); margin-right: 0.4rem; }
.review-item .ra { font-weight: 300; color: #333; white-space: pre-wrap; line-height: 1.6; }
.review-item .ra.empty { color: #999; font-style: italic; }
.review-item .edit { float: right; font-size: 0.85rem; color: var(--accent); margin-left: 1rem; }
.submit-row { margin-top: 2rem; text-align: center; }
.submit-error { margin-top: 1rem; color: var(--error); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  border-top: 3px solid var(--accent);
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-logo span { color: #7aaaff; }
.footer-schola {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 0.2rem;
}
.footer-copy {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .q-layout.has-aside, .q-layout.has-aside.type-matrix { grid-template-columns: 1fr; grid-template-areas: "text" "aside" "answer"; grid-template-rows: auto; }
  .q-aside { margin-bottom: 1.5rem; }
  nav { padding: 0 1.2rem; }
  .nav-links a { padding: 0 0.6rem; font-size: 0.72rem; }
  .hero { padding: 7rem 2rem 4rem; }
  .hero-signin { right: 2rem; top: calc(64px + 0.8rem); }
  section { padding: 2rem 1.5rem; }
  #survey { padding: 6rem 1.5rem 3rem; }
  .namesake-layout { flex-direction: column-reverse; }
  .namesake-portrait { flex: 0 0 auto; width: 160px; }
  .matrix { grid-template-columns: 1fr; gap: 0.3rem; }
  .matrix .mh.col { display: none; }
  .matrix .mr { margin-top: 1.2rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.2rem; }
  .matrix .cell-label { display: block; font-size: 0.9rem; font-weight: 500; margin-top: 0.5rem; }
  .matrix textarea { min-height: 80px; }
  footer { flex-direction: column; gap: 0.5rem; padding: 1.2rem; text-align: center; }
}
@media (max-width: 500px) {
  .nav-links a { padding: 0 0.4rem; font-size: 0.65rem; letter-spacing: 0.08em; }
  .hero { padding: 7rem 1.2rem 3rem; }
  .hero-signin { right: 1.2rem; }
  #survey { padding: 5.5rem 1rem 3rem; }
  .alloc { grid-template-columns: 1fr; }
  .alloc-wrap { flex-direction: column; align-items: flex-start; }
  .alloc-pie { align-self: center; }
  .link-btn { display: block; margin: 1rem 0 0; }
  .q-nav .btn { padding: 0.8rem 1.1rem; }
}
