/* Subpages: About, Sources, Editors, Add my paper, Collections, and the short message
 * pages after a submission (handoff, Unterseiten). Every value comes from tokens.css.
 */

/* --- shared page parts -------------------------------------------------------------- */

.page-intro .container {
  padding-block: 88px var(--s-7);
}

.page-intro h1 {
  margin-top: var(--s-4);
  font-size: var(--fs-h1);
  font-weight: var(--fw-display);
  line-height: 1.14;
}

.page-intro h1 em {
  color: var(--c-ink);
}

.page-intro__lead {
  max-width: 720px;
  margin: var(--s-5) 0 0;
  color: var(--c-muted);
  font-size: var(--fs-lead);
}

.page-section {
  padding-block: var(--s-7);
}

.page-section--last {
  padding-bottom: 90px;
}

.container--wide-text {
  max-width: calc(1040px + 2 * var(--gutter));
}

.ruled-heading {
  margin-bottom: var(--s-5);
  padding-top: var(--s-4);
  border-top: 2px solid var(--c-navy);
  font-size: 28px;
}

.panel {
  padding: 30px;
  background: var(--c-paper);
  border: var(--rule) solid var(--c-line);
}

.panel h3 {
  margin: var(--s-3) 0 var(--s-2);
  font-size: var(--fs-question);
  font-weight: var(--fw-regular);
}

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

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}

@media (min-width: 1100px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.marker-list li {
  position: relative;
  margin-bottom: var(--s-4);
  padding-inline-start: 26px;
}

.marker-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: var(--marker);
  height: var(--marker);
  background: var(--c-gold);
}

.band-sand {
  padding-block: 72px;
  background: var(--c-sand);
}

.band-sand__lead {
  max-width: 720px;
  margin: var(--s-4) 0 var(--s-6);
  color: var(--c-ink);
  font-size: var(--fs-lead);
}

.disclaimer {
  border-top: var(--rule) solid var(--c-line);
  border-bottom: var(--rule) solid var(--c-line);
}

/* a fold like "What it means for you": the chevron at the end shows that it opens */
.disclaimer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: var(--tap);
  color: var(--c-navy);
  font-weight: var(--fw-bold);
  list-style: none;
  cursor: pointer;
}

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

.disclaimer p {
  max-width: 820px;
  color: var(--c-muted);
  font-size: var(--fs-meta-lg);
}

/* --- About ------------------------------------------------------------------------------- */

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 56px;
}

@media (min-width: 1100px) {
  .about-intro {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.about-intro h1 {
  font-size: clamp(36px, 4.4vw, 52px);
}

.about-quotes {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-inline-start: var(--s-5);
  border-inline-start: 2px solid var(--c-gold);
}

.about-quotes p {
  margin: 0;
  color: var(--c-navy);
  font: var(--fw-display) 18px / 1.5 var(--f-serif);
}

.format-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--grid-gap);
}

.made-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--s-5) 0;
}

.made-steps__item {
  padding-top: var(--s-4);
  padding-inline-end: 28px;
  border-top: var(--rule-accent) solid var(--c-navy);
}

.made-steps__item--gold {
  border-top-color: var(--c-gold);
}

.made-steps__num {
  display: block;
  color: var(--c-gold-dark);
  font: var(--fw-display) 40px / 1.1 var(--f-serif);
}

.made-steps__item h3 {
  margin: var(--s-3) 0 var(--s-2);
  font: var(--fw-bold) var(--fs-lead) / 1.3 var(--f-sans);
}

.partners {
  margin: var(--s-5) 0 0;
}

.partners__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  padding-block: var(--s-3);
  border-bottom: var(--rule) solid var(--c-line);
}

.partners dt {
  color: var(--c-navy);
  font-weight: var(--fw-bold);
}

/* links set in a line of text, given a 44 px tall hit area without moving the line */
.partners dt a {
  display: inline-block;
  min-width: var(--tap);
  padding: 10px 8px;
  margin: -10px -8px;
  text-align: center;
}

.partners dd {
  margin: 0;
  color: var(--c-muted);
  font-size: var(--fs-meta-lg);
  text-align: end;
}

/* On a phone each partner is its name over its role, all three alike: wrapped, the
   two-sided row put each role somewhere else, depending on its length. */
@media (max-width: 699px) {
  .partners__row {
    flex-direction: column;
  }

  .partners dd {
    text-align: start;
  }
}

/* --- Sources --------------------------------------------------------------------------- */

.stats {
  display: flex;
  flex-wrap: wrap;
  margin: var(--s-6) 0 0;
  border-block: var(--rule) solid var(--c-line);
}

.stats__cell {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column-reverse;
  padding: 22px;
}

.stats__cell + .stats__cell {
  border-inline-start: var(--rule) solid var(--c-line);
}

.stats dd {
  margin: 0;
  color: var(--c-navy);
  font: var(--fw-display) 40px / 1.1 var(--f-serif);
}

.stats dt {
  margin-top: var(--s-1);
  color: var(--c-muted);
  font-size: var(--fs-body-sm);
}

/* Phones held sideways and small tablets: the three figures sit side by side, each on one
   line. At 40 px a range broke in a third of the row ("2009– / 2026" at 750 px), so the
   size follows the width here, 40 px again from 1000 px. */
@media (min-width: 700px) and (max-width: 1099px) {
  .stats dd {
    font-size: clamp(28px, 4vw, 40px);
    white-space: nowrap;
  }
}

.sources__heading {
  margin-bottom: var(--s-4);
  font-size: 28px;
}

/* what counts as the AIS family, above the counts by outlet */
.sources-family {
  margin-bottom: var(--s-7);
}

.outlet-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--c-navy);
}

.outlet-table th {
  padding: var(--s-3) 0;
  color: var(--c-gold-dark);
  font: var(--fw-bold) var(--fs-label) / 1.2 var(--f-sans);
  letter-spacing: 0.12em;
  text-align: start;
  text-transform: uppercase;
}

.outlet-table th:last-child,
.outlet-table td:last-child {
  width: 80px;
  text-align: end;
}

.outlet-table th:nth-child(2) {
  width: 38%;
}

.outlet-table td {
  padding: var(--s-3) 0;
  border-top: var(--rule) solid var(--c-line);
  vertical-align: middle;
}

.outlet-table td:first-child {
  padding-inline-end: var(--s-4);
}

.outlet-table__name {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--c-ink);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

a.outlet-table__name:hover {
  color: var(--c-navy);
  text-decoration: underline;
  text-decoration-color: var(--c-gold);
}

.bar {
  display: block;
  height: 12px;
  background: var(--c-sand);
}

.bar__fill {
  display: block;
  width: var(--share);
  height: 100%;
  background: var(--c-navy);
}

.outlet-table__count {
  color: var(--c-navy);
  font: var(--fw-regular) var(--fs-lead) / 1 var(--f-serif);
}

.sources__note {
  margin: var(--s-4) 0 0;
  color: var(--c-muted);
  font-size: var(--fs-meta-lg);
}

.cta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--c-navy);
  color: var(--c-on-navy);
}

.cta-box h2 {
  color: var(--c-white);
  font-size: 26px;
}

.cta-box p {
  margin: var(--s-2) 0 0;
}

@media (max-width: 699px) {
  .outlet-table th:nth-child(2) {
    width: 30%;
  }

  /* A translated header may be a longer word than the column ("Participación"): let it
     break rather than push the counts off the screen. English keeps its layout. Not the
     count's header: one short word that fits its 80 px, and allowed to break, it let the
     table squeeze that column to 16 px ("Beiträge" stuck out by 20 px at 320). */
  .outlet-table th:not(:last-child):not(:lang(en)) {
    overflow-wrap: anywhere;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .cta-box {
    padding: var(--s-5);
  }

  /* The figures stack: a rule between them across, not down the side, and no indent
     from the text above. Side by side they need about 630 px. */
  .stats__cell {
    flex-basis: 100%;
    padding-inline: 0;
  }

  .stats__cell + .stats__cell {
    border-inline-start: 0;
    border-top: var(--rule) solid var(--c-line);
  }
}

/* --- Editors ---------------------------------------------------------------------------- */

.people-group + .people-group {
  margin-top: var(--s-8);
}

.people-group .ruled-heading {
  margin-bottom: var(--s-3);
  padding-top: 28px;
}

/* a group without an intro (Managing Director): the portraits keep their distance */
.people-group .ruled-heading + .people {
  margin-top: var(--s-5);
}

.people-group__intro {
  max-width: 760px;
  margin-bottom: var(--s-6);
  color: var(--c-muted);
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 40px var(--grid-gap);
}

.person {
  margin: 0;
  text-align: center;
}

/* round duotone portraits, 168 px, with a 3 px gold ring (handoff, Porträtfotos) */
.person__photo {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
  object-fit: cover;
  border: var(--rule-accent) solid var(--c-gold);
  border-radius: 50%;
  background: var(--c-sand);
}

.person__initials {
  display: grid;
  place-items: center;
  width: 168px;
  max-width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
  border: var(--rule-accent) solid var(--c-gold);
  border-radius: 50%;
  background: var(--c-sand);
  color: var(--c-navy);
  font: var(--fw-display) 34px / 1 var(--f-serif);
}

.person figcaption {
  margin-top: var(--s-4);
}

.person__language {
  display: block;
  margin-bottom: var(--s-1);
  color: var(--c-gold-dark);
  font: var(--fw-bold) var(--fs-label) / 1.2 var(--f-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.person__name {
  display: block;
  color: var(--c-navy);
  font-size: 18px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.person__affiliation {
  display: block;
  margin-top: var(--s-1);
  color: var(--c-muted);
  font-size: var(--fs-meta-lg);
  line-height: 1.4;
}

/* --- Add my paper ------------------------------------------------------------------------- */

.submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding-top: var(--s-9);
}

@media (min-width: 1100px) {
  .submit {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
    align-items: start;
  }
}

.submit__intro h1 {
  margin-top: var(--s-4);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: var(--fw-display);
  line-height: 1.14;
}

.submit-steps {
  margin-top: var(--s-6);
}

.submit-steps li {
  display: flex;
  gap: var(--s-4);
  padding-block: 18px;
  border-top: var(--rule) solid var(--c-line);
}

.submit-steps__num {
  flex: none;
  width: 26px;
  color: var(--c-gold-dark);
  font: var(--fw-display) 26px / 1 var(--f-serif);
}

.submit-steps h2 {
  color: var(--c-navy);
  font: var(--fw-bold) var(--fs-body) / 1.3 var(--f-sans);
}

.submit-steps p {
  margin: var(--s-1) 0 0;
  color: var(--c-muted);
  font-size: var(--fs-meta-lg);
}

.submit__authors-only {
  margin-top: var(--s-5);
  padding: 18px 20px;
  background: var(--c-sand);
  font-size: var(--fs-meta-lg);
}

.submit__authors-only p:last-child {
  margin: var(--s-2) 0 0;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 40px;
  background: var(--c-paper);
  border: var(--rule) solid var(--c-line);
  border-top: var(--rule-heavy) solid var(--c-navy);
}

.submit-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.submit-form__group legend {
  margin-bottom: var(--s-4);
  padding: 0;
  color: var(--c-navy);
  font: var(--fw-bold) var(--fs-h3) / 1.3 var(--f-serif);
}

.submit-form .input {
  min-height: 48px;
  background: var(--c-white);
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-6) 20px;
  background: var(--c-cream);
  border: 2px dashed var(--c-field-line);
  color: var(--c-navy);
  text-align: center;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--c-navy);
}

/* the file input is hidden inside its drop zone, which shows its focus instead */
.dropzone:focus-within {
  outline: var(--focus-width) solid var(--c-focus);
  outline-offset: var(--focus-offset);
}

.dropzone__title {
  font-weight: var(--fw-bold);
}

.dropzone__hint {
  color: var(--c-muted);
  font-size: var(--fs-meta);
}

.dropzone__file {
  /* a file name has no spaces to break at: it wraps inside the zone anywhere rather than
     run off both sides of the page */
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--c-ink);
  font-size: var(--fs-meta);
  font-weight: var(--fw-semibold);
}

.dropzone__file:empty {
  display: none;
}

/* the real file input stays focusable and in the form; the whole zone is its label */
.dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.submit-form__pair {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}

.submit-form__pair .field {
  flex: 1 1 220px;
}

.field__error {
  margin: 0;
  color: var(--c-error);
  font-size: var(--fs-meta);
}

.field__error:empty {
  display: none;
}

.submit-form__rights {
  padding: 22px 24px;
  background: var(--c-sand);
  font-size: var(--fs-meta-lg);
}

.submit-form__rights p:last-child {
  margin-bottom: 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--c-navy);
}

.submit-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-top: var(--s-5);
  border-top: var(--rule) solid var(--c-line);
}

.submit-form__foot p {
  margin: 0;
}

.submit-form__send {
  min-height: 52px;
  padding: 14px 28px;
}

@media (max-width: 699px) {
  .submit {
    padding-top: var(--s-7);
  }

  .submit-form {
    padding: var(--s-5);
  }
}

/* --- messages after a submission, collections ---------------------------------------------- */

.message-page {
  max-width: calc(640px + 2 * var(--gutter));
  padding-block: var(--s-9);
}

.message-page h1 {
  margin: var(--s-4) 0 var(--s-5);
  font-size: var(--fs-h2);
}

.message-page p {
  color: var(--c-muted);
  font-size: var(--fs-lead);
}

.message-page .error-text {
  color: var(--c-error);
}

.collection-list {
  display: grid;
  gap: var(--s-4);
}

.collection-list a {
  display: block;
  padding: var(--s-5);
  background: var(--c-paper);
  border: var(--rule) solid var(--c-line);
  color: var(--c-ink);
  text-decoration: none;
}

.collection-list a:hover {
  border-color: var(--c-navy);
}

.collection-list h2 {
  font-size: var(--fs-h3);
}

.collection-list p {
  margin: var(--s-2) 0 0;
  color: var(--c-muted);
}

/* The authors' "Share it on LinkedIn" page (/share/<token>, frontend/partials/share.html) */
.share-page__title { margin: 0.25em 0 0.5em; }
.share-page__lede { font-size: var(--fs-lead); }
.share-page__steps { margin: 1.25rem 0 1.5rem; padding-left: 1.25rem; }
.share-page__steps li { margin-bottom: 0.4rem; }
.share-page__label { display: block; font-weight: var(--fw-semibold); margin-bottom: 0.4rem; }
.share-page__text { width: 100%; min-height: 22rem; font-family: var(--f-sans); line-height: 1.5; }
.share-page__count { font-size: var(--fs-small); color: var(--c-muted); margin: 0.4rem 0 1rem; }
.share-page__count.is-over { color: var(--c-error); font-weight: var(--fw-semibold); }
.share-page__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.share-page__status { min-height: 1.5em; margin: 0.75rem 0; }
.share-page__note { font-size: var(--fs-small); color: var(--c-muted); }
