/* Signal look, /abstract-submission/ (loads for the `abstract` stylesheet, after look.css and looks/signal/reg.css).
   Contract: theme/LOOK-SIGNAL.md. Hooks kept: abs-form.js (.abs-file.is-set, the warn and error lines),
   forms-pending.js (the note under the button), faq.js (.faq__item.is-open), reveal.js (.reveal.is-visible). */

/* The approved page's own accent set, re-pointed at the Signal hues */
.abs-page { --ac-blue: var(--blue); --ac-teal: var(--teal); --ac-violet: var(--violet); --ac-gold: var(--amber); --ac-coral: var(--coral); }
.abs-page #faq { --acc: var(--blue); }
.abs-page #guidelines { --acc: var(--teal); }

/* ---- Submission form: one generous tile, field groups by space and a quiet rule ---- */
.abs-grid { gap: 24px; margin-top: 32px; }
.abs-form {
  gap: 16px; padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--sg-line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.abs-page .abs-form .field-row { gap: 16px; }
.abs-page .abs-form .field label { font: 600 14.5px/1.3 var(--sans); color: var(--ink-2); }
.abs-page .abs-form .field input,
.abs-page .abs-form .field select {
  min-height: 48px; padding: 12px 14px; border: 1px solid #848DA8; border-radius: 12px; font: 400 16px/1.4 var(--sans);
}
.abs-page .abs-form .field select { padding-right: 36px; }
/* Group breaks: the abstract itself, then the file */
.abs-form > .field:has(#submit-ab-abstract-title),
.abs-form > .field:has(.abs-file__input) { margin-top: 12px; padding-top: 28px; border-top: 1px solid var(--sg-line); }
.abs-file {
  min-height: 64px; padding: 12px 14px; gap: 14px;
  border: 1.5px dashed var(--sg-line-strong); border-radius: var(--r-md); background: var(--bg-tint);
}
.abs-file:hover { border-color: var(--blue); background: var(--blue-tint); }
.abs-file.is-set { border-style: solid; border-color: var(--blue); background: #fff; }
.abs-file__ic { width: 40px; height: 40px; border-radius: 12px; }
.abs-file__text { font-size: 15px; }
.abs-file__btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; background: #fff; font-size: 14px; border-color: var(--sg-line-strong); }
.abs-hint { color: var(--ink-2); font-size: 14px; }
.abs-formnote { padding: 10px 14px; border: 0; border-radius: 12px; background: var(--teal-tint); color: var(--ink-2); font-size: 14px; }
.abs-formnote svg { color: var(--sg-teal-ink); }
.btn.abs-submit { min-height: 52px; margin-top: 12px; font-size: 16px; }
.abs-altemail { color: var(--muted); font-size: 14px; }

/* Aside: what happens next, and a forest "why submit here" tile */
.abs-aside { gap: 16px; }
.abs-aside__card { padding: 24px; border: 1px solid var(--sg-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.abs-aside__title { gap: 12px; margin: 0 0 16px; font: 700 18px/1.25 var(--serif); letter-spacing: -.01em; }
.abs-aside__title svg { box-sizing: border-box; width: 36px; height: 36px; padding: 8px; border-radius: 12px; color: var(--blue); background: var(--blue-tint); }
.abs-aside__process { gap: 10px; padding-left: 22px; }
.abs-aside__process li { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.abs-aside__process li::marker { font: 700 14px var(--serif); color: var(--blue); }
.abs-aside__card--trust { background: linear-gradient(160deg, #fff 10%, var(--sg-forest-tint) 130%); box-shadow: var(--shadow-sm); }
.abs-aside__card--trust .abs-aside__title svg { color: var(--sg-forest); background: var(--sg-forest-tint); }
.abs-aside__trust li { color: var(--ink-2); font-size: 14.5px; }
.abs-aside__trust .ci { width: 22px; height: 22px; margin-top: 0; border-radius: 50%; color: var(--sg-forest-ink); background: var(--sg-forest-tint); }
.abs-aside__trust .ci svg { width: 14px; height: 14px; }

/* ---- Tracks: a compact teal tile of chips ---- */
.abs-tracks-lite {
  margin-top: 32px; padding: 28px 32px;
  background: linear-gradient(160deg, #fff 10%, var(--teal-tint) 130%);
  border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.abs-tracks-lite__themes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.abs-tracks-lite__themes li {
  flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 18px; min-width: 0;
  background: #fff; border: 1px solid color-mix(in srgb, var(--teal) 24%, transparent); border-radius: 999px;
}
.abs-tracks-lite__name { font: 700 15px/1.25 var(--serif); color: var(--sg-teal-ink); }
.abs-tracks-lite__count {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--teal-tint); color: var(--sg-teal-ink); font: 600 12.5px/1 var(--sans); letter-spacing: 0; text-transform: none;
}
.abs-page .abs-tracks-lite__link { min-height: 44px; color: var(--sg-teal-ink); font-size: 15px; }

/* ---- Review process: one tile, step nodes on an ink-blue rail that fills once on reveal ---- */
.abs-steps {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 24px;
  margin-top: 32px; padding: 32px;
  background: #fff; border: 1px solid var(--sg-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.abs-step:nth-of-type(n) { --sc: var(--teal); }
.abs-step { position: relative; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.abs-step__ic {
  position: relative; z-index: 1; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%;
  color: var(--teal); background: var(--teal-tint);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--teal) 30%, transparent), 0 0 0 6px #fff;
}
.abs-step__ic svg { width: 22px; height: 22px; }
.abs-step__no { font: 600 12px/1.2 var(--sans); letter-spacing: .1em; color: var(--sg-teal-ink); }
.abs-step__title { margin: 6px 0 8px; font: 700 18px/1.25 var(--serif); letter-spacing: -.01em; }
.abs-step__desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.abs-step:not(:last-child)::before, .abs-step:not(:last-child)::after {
  content: ""; position: absolute; top: 22px; left: 60px; width: calc(100% + 24px - 72px); height: 4px; border-radius: 4px;
}
.abs-step:not(:last-child)::before { background: var(--blue-tint); }
.abs-step:not(:last-child)::after {
  background: linear-gradient(90deg, var(--blue), color-mix(in srgb, var(--blue) 45%, #fff));
  transform-origin: left; transition: transform 1.2s var(--sg-ease) .35s;
}
html.js .abs-step.reveal:not(.is-visible)::after { transform: scaleX(0); }

/* How abstracts are judged: a teal-tinted tile (science) */
.abs-criteria {
  margin-top: 16px; padding: 28px 32px;
  background: linear-gradient(160deg, #fff 10%, var(--teal-tint) 130%);
  border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.abs-criteria__h { text-align: left; margin: 0 0 20px; font: 700 20px/1.25 var(--serif); letter-spacing: -.01em; }
.abs-criteria__check { width: 32px; height: 32px; border-radius: 10px; color: var(--teal); background: var(--teal-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 18%, transparent); }
.abs-criteria__title { font-size: 15.5px; }
.abs-criteria__desc { color: var(--ink-2); font-size: 14.5px; }
.abs-ethics { margin: 24px 0 0; max-width: 75ch; text-align: left; color: var(--ink-2); font-size: 15px; }

/* ---- Who should submit: two tiles of different widths, hue-coded icon squares ---- */
.abs-guide-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.abs-guide {
  --hue: var(--teal); --hue-ink: var(--sg-teal-ink); --tint: var(--teal-tint);
  grid-column: span 7; padding: 32px; border: 1px solid var(--sg-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--sg-ease), box-shadow .35s var(--sg-ease), border-color .35s var(--sg-ease), opacity .8s var(--spring), filter .8s var(--spring);
}
.abs-guide:nth-child(1) { background: linear-gradient(160deg, #fff 30%, var(--teal-tint) 140%); }
.abs-guide:nth-child(2) { --hue: var(--violet); --hue-ink: var(--sg-violet-ink); --tint: var(--violet-tint); grid-column: span 5; }
.abs-guide:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--hue) 55%, transparent); }
/* The icon squares are decoration drawn in the stylesheet: a document for presenters, a person for delegates */
.abs-guide::before {
  content: ""; display: block; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 18%, transparent);
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B7A75' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
.abs-guide:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A4AB7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E");
}
.abs-page #guidelines .abs-guide__kicker { margin: 0 0 8px; font: 600 12px/1.2 var(--sans); letter-spacing: .1em; color: var(--hue-ink); }
.abs-guide__title { margin: 0 0 10px; font: 800 clamp(22px, 2vw, 26px)/1.2 var(--serif); letter-spacing: -.02em; }
.abs-guide__intro { color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 62ch; }
.abs-guide__list { gap: 12px; padding-top: 18px; border-top: 1px solid var(--sg-line); }
.abs-guide__list li { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.abs-page #guidelines .abs-guide__list .ci { width: 22px; height: 22px; margin-top: 0; border-radius: 50%; color: var(--hue-ink); background: var(--tint); }
.abs-guide__list .ci svg { width: 14px; height: 14px; }

/* ---- FAQ: the home page's tile, intro on the left ---- */
.reg-faq {
  max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; padding: 32px 48px;
  background: #fff; border: 1px solid var(--sg-line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.reg-faq__head .h2 { font-size: clamp(26px, 2.6vw, 34px); }
.reg-faq .faq { display: block; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.reg-faq .faq__item:nth-child(n) { border-top: 1px solid var(--sg-line); border-bottom: 0; }
.reg-faq .faq__item:first-child { border-top: 0; }

/* ---- Tablet ---- */
@media (max-width: 1100px) {
  .abs-steps { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px; }
  .abs-step { padding-left: 68px; min-height: 48px; }
  .abs-step__ic { position: absolute; left: 0; top: 0; margin: 0; }
  .abs-step__desc { max-width: 70ch; }
  .abs-step:not(:last-child)::before, .abs-step:not(:last-child)::after { top: 60px; left: 22px; width: 4px; height: calc(100% + 28px - 72px); }
  .abs-step:not(:last-child)::after { background: linear-gradient(180deg, var(--blue), color-mix(in srgb, var(--blue) 45%, #fff)); transform-origin: top; }
  html.js .abs-step.reveal:not(.is-visible)::after { transform: scaleY(0); }
}
@media (max-width: 1024px) {
  .reg-faq { grid-template-columns: 1fr; gap: 16px; padding: 32px; }
}
@media (max-width: 820px) {
  .abs-guide:nth-child(n) { grid-column: 1 / -1; }
}

/* ---- Phone ---- */
@media (max-width: 640px) {
  .abs-aside__card, .abs-guide { padding: 24px 20px; }
  .abs-tracks-lite, .abs-criteria { padding: 24px 20px; }
  .abs-steps { padding: 24px 20px; }
  .abs-step { padding-left: 64px; }
  .abs-file { flex-wrap: wrap; }
  .abs-file__text { white-space: normal; overflow-wrap: anywhere; }
  .reg-faq { padding: 24px 20px; }
  .btn.abs-submit { white-space: normal; text-align: center; line-height: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
  .abs-guide, .abs-step:not(:last-child)::after { transition: none; }
  .abs-guide:hover { transform: none; }
}
