@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --paper:  #f2f0eb;
  --ink:    #292827;
  --muted:  #666666;
  --line:   #dedbd7;
  --wine:   #421d24;
  --wine-2: #683640;
  --violet: #714cb6;
  --lilac:  #d4c7ff;
  --lagoon: #0c4243;
  --white:  #ffffff;
  --sans: Inter, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lilac); color: var(--ink); }

/* -------------------------------------------------------------- shell */

.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1200px, calc(100% - 96px));
  margin: 0 auto;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

main.wrap { padding: 44px 0 72px; }

/* ---------------------------------------------------------- headings */

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 16ch;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 54ch;
  font-size: 17.5px;
  color: var(--muted);
  line-height: 1.5;
}

.hero { margin: 0 0 40px; }

/* Signup and login have to fit one laptop screen with no scrolling: a
   student who cannot see the button does not press it. */
.hero.tight { margin-bottom: 18px; }

.section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type { border-top: 0; padding-top: 0; }

.aside {
  margin: 0 0 24px;
  max-width: 62ch;
  font-size: 16px;
  color: var(--muted);
}

.meta {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.dim { color: var(--muted); }

.num { font-variant-numeric: tabular-nums; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.94em;
}

/* ------------------------------------------------------------- forms */

.stack { display: grid; gap: 15px; max-width: 440px; }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Only shown when two students share a name. */
.picks {
  margin: 0;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(212, 199, 255, .18);
}

.picks legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
}

.picks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }

.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  grid-template-columns: none;
}

.pick input { accent-color: var(--violet); width: 18px; height: 18px; }

.pick span { font-size: 16px; }

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  max-width: 520px;
}

.row input { flex: 1 1 220px; }

.inline { display: inline; margin: 0; }

label { display: grid; gap: 7px; }

label > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

label small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

input[type="text"], input[type="password"], input[type="email"], input:not([type]) {
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .2s var(--ease);
}

input[type="file"] {
  width: 100%;
  padding: 18px;
  font: inherit;
  font-size: 15px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

input:hover { border-color: #c9c5bf; }

input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

button {
  font: inherit;
  cursor: pointer;
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 22px;
  transition: background .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}

.go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  background: var(--wine);
  color: var(--white);
  border: 1px solid var(--wine);
  font-weight: 500;
  padding: 13px 24px;
}

.go::after { content: "↗"; font-size: 0.9em; opacity: .85; }

.go:hover { background: #55262f; border-color: #55262f; }

.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
}

.quiet:hover { border-color: var(--ink); }

.danger {
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
}

.danger:hover { border-color: var(--wine); }

/* -------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  gap: 28px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 0 0 11px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}

.tab:hover { color: var(--ink); }

.tab.on { color: var(--ink); border-bottom-color: var(--violet); }

/* ------------------------------------------------- the address rows */

.handle-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 26px;
}

.rename { display: flex; gap: 10px; align-items: center; }

.rename input { min-width: 220px; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.handle-line {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.02em;
}

.handle { font-weight: 500; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  border-top: 1px solid var(--line);
}

.grid form { margin: 0; display: contents; }

.slot {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 19px 2px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 0;
}

.slot-label {
  flex: 0 0 auto;
  min-width: 68px;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.slot-note {
  flex: 1 1 auto;
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot.free:hover .slot-label { color: var(--violet); }

.slot.free:hover .slot-note { color: var(--ink); }

.slot.gone { cursor: default; }

.slot.gone .slot-label { color: #b4afa8; }

.slot.gone .slot-note { color: #b4afa8; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.chip:hover { border-color: var(--violet); color: var(--violet); }

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

.url {
  color: var(--violet);
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}

.url:hover { text-decoration: underline; }

.flag {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-left: 2px solid var(--violet);
  background: rgba(212, 199, 255, .22);
  font-size: 16px;
}

.flag-bad {
  border-left-color: var(--wine);
  background: rgba(66, 29, 36, .06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin-top: 18px;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--violet);
  padding: 0 14px 12px 0;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 16px 14px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td small { color: var(--muted); }

.r { text-align: right; padding-right: 0; }

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

.actions button { min-height: 38px; padding: 6px 14px; font-size: 13.5px; }

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag.ok  { border-color: var(--violet); color: var(--violet); }
.tag.bad { border-color: var(--wine); color: var(--wine); }

/* ------------------------------------------------------------ footer */

.foot {
  background: var(--wine-2);
  color: var(--white);
  padding: 56px 0 30px;
  margin-top: 40px;
}

.foot .wrap { display: grid; gap: 32px; }

/* Signup and login keep the safety line but drop the wordmark, so the
   whole screen fits a laptop without scrolling. */
.foot.compact { padding: 16px 0; margin-top: 0; }

/* The two entry screens are sized to land inside one laptop screen. A
   student who cannot see the button does not press it. */
.entry main.wrap { padding: 24px 0 10px; }
.entry .bar { padding: 20px 0 18px; }
.entry .foot p { max-width: 74ch; font-size: 14px; }

/* The clash screen carries an extra question, so it buys the room back
   from its own padding rather than from the scroll bar. */
.picking .flag { margin-bottom: 14px; }
.picking .stack { gap: 12px; }
.picking .picks { padding: 10px 14px 12px; }
.picking .pick { min-height: 32px; }
.picking .foot.compact { padding: 12px 0; }

.foot p {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  color: rgba(255, 255, 255, .72);
}

.foot-mark {
  font-size: clamp(54px, 13vw, 150px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: .85;
  color: rgba(255, 255, 255, .92);
}

/* -------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); column-gap: 36px; }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; column-gap: 0; }
  .rename { width: 100%; }
  .rename label { flex: 1 1 auto; }
  .rename input { min-width: 0; width: 100%; }
}

@media (max-width: 820px) {
  main.wrap { padding: 56px 0 72px; }
  .hero { margin-bottom: 48px; }
  .section { padding: 36px 0; }
  .lede { font-size: 17px; }
}

@media (max-width: 560px) {
  .pair { grid-template-columns: 1fr; gap: 15px; }
}

@media (max-width: 420px) {
  .wrap, .bar { width: calc(100% - 32px); }
  body { font-size: 16px; }
  main.wrap { padding: 44px 0 60px; }
  .lede { font-size: 16px; }
  .aside { font-size: 15px; }
  .stack { max-width: none; }
  .slot { padding: 17px 2px; gap: 12px; }
  .slot-label { font-size: 19px; min-width: 58px; }
  .slot-note { font-size: 12.5px; }
  .tabs { gap: 20px; }
  .foot { padding: 40px 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
