/* Who it's for (views/sw_who.templ), on the kit in swiss.css. */

/* The first screen: the mono label in the 312px column beside the title and its line, then the index of the five
   kinds, each under an ink rule. 120px from the bar, 96px between the words and the index at 1440. */
.sww-intro {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 6.67vw, 96px);
  width: min(var(--sw-col), 100% - 2 * var(--sw-gutter));
  margin-inline: auto;
  padding-top: clamp(56px, 8.33vw, 120px);
}
.sww-intro__top {
  display: flex;
  gap: 24px;
}
.sww-intro__label {
  flex-shrink: 0;
  width: var(--sw-label);
  padding-top: 14px;
  font-family: var(--sw-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 16px;
  color: var(--db-fg);
}
.sww-intro__words {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.sww-intro .sw-display {
  max-width: none;
  text-wrap: initial;
}
.sww-intro .sw-sub {
  max-width: 620px;
}


.sww-body {
  gap: 48px;
}
.sww-title {
  max-width: 900px;
  font-size: clamp(30px, 1.4rem + 1.6vw, 44px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.09;
}
.sww-row {
  display: flex;
  align-items: start;
  gap: 24px;
}
.sww-needs {
  flex: 1;
  min-width: 0;
}
.sww-needs li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 18px;
  border-top: 1px solid var(--db-edge-2);
}
.sww-needs li:last-child {
  border-bottom: 1px solid var(--db-edge-2);
}
.sww-need__t {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 26px;
}
.sww-need__d {
  font-size: 15px;
  line-height: 21px;
  color: var(--db-fg-2);
}
.sww-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  width: 340px;
  padding-top: 18px;
}

/* A sample card: white, a faint edge, 14px corners; the note beside a dot in its kind's field. */
.sww-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--db-edge);
  border-radius: 14px;
  background: var(--db-raised);
}
.sww-card__t {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  line-height: 22px;
}
.sww-card__lock {
  flex-shrink: 0;
  fill: none;
  stroke: var(--db-fg);
  stroke-width: 1.5;
}
.sww-card__s {
  font-size: 14px;
  line-height: 20px;
  color: var(--db-fg-3);
}
.sww-card__n {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  font-family: var(--sw-sans);
  font-size: 14px;
  letter-spacing: -0.005em;
  line-height: 16px;
}
.sww-card__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--db-field);
}


/* Don't see yours? A ruled row to the demo, 120px under the last kind at 1440 (the page's gap is 160). */
.sww-yours {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--sw-col), 100% - 2 * var(--sw-gutter));
  margin: calc(var(--sw-gap) * -0.25) auto 0;
  padding-block: 26px;
  border-block: 1px solid var(--db-fg);
  font-size: clamp(22px, 1rem + 0.9vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.sww-yours__then {
  color: var(--db-fg-3);
}
.sww-yours__arrow {
  flex-shrink: 0;
  font-size: 24px;
  line-height: 30px;
}
.sww-yours:hover > span:first-child {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* What every business gets: its label in full ink and no number, the sentence, four promises each under its card. */
.sww-gets__label {
  color: var(--db-fg);
}
.sww-promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.sww-promises li {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sww-promise__words {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* The kinds as tabs: five in a row across the column, each topped by a bar in its kind's field, with its number,
   pictogram (its shape in the same field), name and how it books. The chosen tab takes its kind's soft colour and runs
   straight into its panel, like a folder; the others lighten to it under the pointer. */
.sww-kinds {
  width: min(var(--sw-col), 100% - 2 * var(--sw-gutter));
  margin: calc(var(--sw-gap) * -0.4) auto 0;
}
.sww-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.sww-tab {
  --sww-fill: var(--db-field);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 22px;
  border-top: 4px solid var(--db-field);
  color: var(--db-fg);
  text-decoration: none;
  cursor: pointer;
}
.sww-tab:hover {
  background: color-mix(in srgb, var(--db-field-soft) 55%, transparent);
}
.sww-tab[aria-selected="true"] {
  background: var(--db-field-soft);
}
.sww-tab:focus-visible {
  outline: 2px solid var(--db-fg);
  outline-offset: -2px;
}
.sww-tab__n {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  color: var(--db-field-text);
}
.sww-tab .sw-pict {
  width: 84px;
  height: 72px;
  margin: 6px 0 4px -8px;
}
.sww-tab .sw-pict__fill {
  fill: var(--sww-fill);
}
.sww-tab__name {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 26px;
}
.sww-tab[aria-selected="true"] .sww-tab__name {
  font-weight: 500;
}
.sww-tab__gets {
  font-size: 14px;
  letter-spacing: -0.005em;
  line-height: 19px;
  color: var(--db-fg-2);
}

/* The chosen kind's panel, in the tab's soft colour: its examples as small tags, its sentence, what it needs beside two
   sample cards, then a pill in its field to its own page. */
.sww-panel {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(28px, 4vw, 56px);
  background: var(--db-field-soft);
}
.sww-panel[hidden] {
  display: none;
}
/* without the script, a tab's link still opens its panel */
.sww-kinds:not(.is-tabs) .sww-panel[hidden]:target {
  display: flex;
}
.sww-kinds:not(.is-tabs):has(.sww-panel:target) .sww-panel:not(:target) {
  display: none;
}
.sww-panel__e {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: -16px;
}
.sww-panel__e li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--db-raised);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  color: var(--db-field-text);
}
.sww-panel .sww-needs li {
  border-color: color-mix(in srgb, var(--db-field-text) 22%, transparent);
}
.sww-panel .sww-card {
  border-color: transparent;
}
.sw-page a.sww-go {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--db-field);
  color: var(--db-field-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}
.sw-page a.sww-go:hover {
  background: var(--db-field-hover);
}

@media (max-width: 1100px) {
  .sww-tab {
    padding: 14px 14px 18px;
  }
  .sww-tab__gets {
    display: none;
  }
  .sww-tab__name {
    font-size: 19px;
    line-height: 24px;
  }
}
/* On a phone the tabs scroll sideways in one row, each a little card. */
@media (max-width: 760px) {
  .sww-tabs {
    display: flex;
    gap: 6px;
    margin-inline: calc(var(--sw-gutter) * -1);
    padding-inline: var(--sw-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--sw-gutter);
    scrollbar-width: none;
  }
  .sww-tabs::-webkit-scrollbar {
    display: none;
  }
  .sww-tab {
    flex: 0 0 auto;
    min-width: 132px;
    scroll-snap-align: start;
  }
  .sww-tab .sw-pict {
    width: 63px;
    height: 54px;
  }
}

@media (max-width: 1200px) {
  .sww-row {
    flex-direction: column;
  }
  .sww-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-top: 0;
  }
  .sww-promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }
}
@media (max-width: 900px) {
  .sww-intro__top {
    flex-direction: column;
    gap: 24px;
  }
  .sww-intro__label {
    width: auto;
    padding-top: 0;
  }
  .sww-body {
    gap: 36px;
  }
}
@media (max-width: 600px) {
  .sww-cards,
  .sww-promises {
    grid-template-columns: minmax(0, 1fr);
  }
}
