/* Campus Filing: reusable components shared across pages. */

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--btn-primary-bg);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn:hover { background: var(--btn-primary-bg-hover); border-color: var(--btn-primary-bg-hover); color: var(--btn-primary-fg); }

.btn-green { background: var(--btn-accent-bg); border-color: var(--btn-accent-bg); color: var(--btn-accent-fg); }
.btn-green:hover { background: var(--btn-accent-bg-hover); border-color: var(--btn-accent-bg-hover); color: var(--btn-accent-fg); }

.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--navy); border-color: var(--blue); }

.btn-quiet { background: transparent; border-color: #3C464C; color: var(--white); }
.btn-quiet:hover { background: #1D262C; color: var(--white); }

.btn-sm { font-size: 14px; padding: 8px 15px; }

/* A destructive button that has been armed by a first click. */
.btn-armed, .btn-armed:hover { background: var(--rust); border-color: var(--rust); color: var(--white); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 1.4rem 0 0; }

.btn-row .aside { font-size: 14px; color: var(--muted); }

/* ---------- cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.card h3 { margin-bottom: 8px; }

.card p { font-size: 15px; color: var(--slate); margin-bottom: 0; }

.card p + p { margin-top: .7rem; }

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

.card-link:hover { border-color: var(--blue); color: inherit; }

.card-link .more { display: block; margin-top: 12px; color: var(--navy); font-size: 14px; font-weight: 500; }

.card-num {
  font-family: "Newsreader", Georgia, serif;
  font-size: 15px;
  color: var(--forest);
  border-bottom: 2px solid var(--sage);
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: block;
}

.stat { border-left: 3px solid var(--forest); padding-left: 18px; }

.stat .value { font-size: 30px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }

.stat .label { font-size: 14px; color: var(--muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
  margin: 8px 0 38px;
}

.stat-row[hidden] { display: none; }

/* ---------- notes ---------- */

.note {
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  color: var(--navy);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  margin: 0 0 1.4rem;
  max-width: 76ch;
}

.note p { max-width: none; margin-bottom: .6rem; }
.note p:last-child { margin-bottom: 0; }

.note-warn { border-left-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.note-stop { border-left-color: var(--rust); background: var(--rust-soft); color: var(--rust); }
.note-good { border-left-color: var(--forest); background: var(--sage); color: var(--forest); }

.note[hidden] { display: none; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin-bottom: 1.4rem; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.data th {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--sand);
  white-space: nowrap;
}

table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

table.data tr:last-child td { border-bottom: none; }

table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- accordion (FAQ) ---------- */

.qa {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.qa summary {
  cursor: pointer;
  padding: 15px 20px;
  font-weight: 500;
  font-size: 16px;
  list-style: none;
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.qa[open] summary::after { content: "\2212"; }

.qa summary:hover { background: var(--blue-soft); }

.qa .answer { padding: 0 20px 18px; font-size: 15px; color: var(--slate); }

.qa .answer p { margin-bottom: .7rem; }

.qa .answer p:last-child { margin-bottom: 0; }

/* ---------- timeline ---------- */

.timeline { list-style: none; padding: 0; margin: 0; max-width: 76ch; }

.timeline li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.timeline li:first-child { border-top: none; }

.timeline .when { font-weight: 600; font-size: 15px; color: var(--navy); }

.timeline .what { font-size: 15px; color: var(--slate); }

.timeline .what b { color: var(--ink); display: block; font-weight: 600; }

.timeline li.now { background: var(--sage); border-radius: var(--radius); padding-left: 16px; padding-right: 16px; }

/* ---------- definition list (glossary) ---------- */

.terms { max-width: 76ch; }

.terms dt {
  font-weight: 600;
  font-size: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  margin-top: 16px;
}

.terms dt:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.terms dd { margin: 4px 0 0; color: var(--slate); font-size: 15px; }

/* ---------- checklist ---------- */

.checklist { list-style: none; padding: 0; margin: 0; max-width: 76ch; }

.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
}

.checklist li:first-child { border-top: none; }

.checklist .mark { color: var(--forest); font-weight: 600; }

.checklist b { display: block; }

.checklist span.detail { color: var(--slate); }

/* ---------- form controls ---------- */

.field { margin-bottom: 16px; }

.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }

.field small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; line-height: 1.5; }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.money-wrap { position: relative; }

.money-wrap > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.money-wrap input { padding-left: 25px; font-variant-numeric: tabular-nums; }

.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; }

.error { color: var(--rust); font-size: 14px; font-weight: 500; }
.error:empty { display: none; }

/* ---------- misc ---------- */

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--sage);
  color: var(--forest);
  font-weight: 500;
}

.tag-muted { background: var(--sand); color: var(--slate); }

.lede { font-size: 18px; color: var(--slate); max-width: 62ch; }

.sample-plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.sample-plan h4 { margin-bottom: 6px; }

.sample-plan p { font-size: 15px; color: var(--slate); margin-bottom: .6rem; }

.sample-plan p:last-child { margin-bottom: 0; }

.caption { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- account page ---------- */

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 15px;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link:hover { color: var(--blue); }

.acct-switch { margin: 14px 0 0; font-size: 15px; }

.acct-switch + .acct-switch { margin-top: 6px; }

.acct-gap { margin-top: 1.4rem; }

.acct-who { color: var(--slate); margin-bottom: 1.4rem; }

.acct-more { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }

.acct-more summary { cursor: pointer; font-weight: 500; }

.acct-more[open] summary { margin-bottom: 1rem; }

.plan-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.field small[hidden] { display: none; }

#plans-body th, #plans-body td { vertical-align: middle; }

/* ---------- saved plan summary ---------- */

.plan-cols {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 34px;
}

@media (max-width: 860px) {
  .plan-cols { grid-template-columns: 1fr; gap: 28px; }
}

.plan-steps { padding-left: 0; list-style: none; counter-reset: step; }

.plan-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 42px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.plan-steps li:last-child { border-bottom: none; }

/* The number carries the order, so it is the only thing with weight. */
.plan-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-docs { padding-left: 0; list-style: none; }

.plan-docs li {
  padding: 9px 0 9px 26px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.plan-docs li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 2px solid var(--forest);
}

.stat-good { border-left-color: var(--forest); }
.stat-warn { border-left-color: var(--rust); }
.stat-warn .value { color: var(--rust); }

@media print {
  .site-header, .site-footer, .btn-row, .skip, #plan-status { display: none !important; }
  .plan-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- walkthrough assistant ---------- */

.ask-mount {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.ask-toggle {
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 22px;
  padding: 11px 20px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 21, 25, .18);
}

.ask-toggle:hover { background: var(--btn-accent-bg-hover); }

.ask-panel {
  width: min(380px, calc(100vw - 44px));
  max-height: min(540px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 28px rgba(16, 21, 25, .16);
  overflow: hidden;
}

.ask-panel[hidden] { display: none; }

.ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.ask-close {
  background: none;
  border: none;
  color: var(--slate);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  padding: 2px 0;
}

.ask-close:hover { color: var(--forest); }

.ask-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.6;
}

.ask-msg { margin-bottom: 14px; }
.ask-msg p { margin: 0 0 6px; max-width: none; }

.ask-you p {
  background: var(--sage);
  color: var(--forest);
  padding: 9px 12px;
  border-radius: 10px 10px 2px 10px;
  margin-left: 32px;
}

.ask-bot p {
  background: var(--paper);
  padding: 9px 12px;
  border-radius: 10px 10px 10px 2px;
  margin-right: 24px;
}

.ask-jump { font-size: 13px; color: var(--slate); background: none !important; padding: 4px 2px !important; }

.ask-openers-head { color: var(--slate); font-size: 13.5px; margin-bottom: 10px; }

.ask-opener {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.ask-opener:hover { border-color: var(--forest); color: var(--forest); }

.ask-form { display: flex; gap: 8px; padding: 12px 16px 0; }

.ask-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14.5px;
}

.ask-send {
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 9px 15px;
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
}

.ask-send:disabled { opacity: .55; cursor: default; }

.ask-foot {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 16px 14px;
  margin: 0;
  max-width: none;
}

@media print { .ask-mount { display: none !important; } }

/* ---------- in-place editing, tax content manager only ---------- */

.edit-pen {
  display: block;
  background: none;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--slate);
  font: inherit;
  font-size: 12.5px;
  padding: 2px 10px;
  margin: 4px 0 14px;
  cursor: pointer;
}

.edit-pen:hover { color: var(--forest); border-color: var(--forest); }

/* Inside a collapsed FAQ answer the button should not float loose. */
details.qa .edit-pen { margin-left: 0; }

.edit-box { margin: 6px 0 16px; }

.edit-area {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  padding: 10px 12px;
  border: 1px solid var(--forest);
  border-radius: 8px;
  resize: vertical;
}

.edit-hint { font-size: 12.5px; color: var(--slate); margin: 0 0 6px; }

.edit-box .btn-row { margin-top: 8px; }

.figure-pen {
  background: none;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--slate);
  font: inherit;
  font-size: 12px;
  padding: 1px 8px;
  margin-left: 10px;
  cursor: pointer;
}

.figure-pen:hover { color: var(--forest); border-color: var(--forest); }

.figure-input {
  width: 110px;
  font: inherit;
  font-size: 14.5px;
  padding: 4px 8px;
  border: 1px solid var(--forest);
  border-radius: 6px;
  margin-right: 8px;
}

.seat-off { color: var(--rust); }
