/* Selene pages: proof strip, audiences, shift pattern generator, pattern pages and guides.
   Loaded after studio.css and built on its tokens. */
.selene {
  --tone: #e6e6f6;
  --product-accent: #4b4a8f;
  --card: #fffffb;
}

/* Shift colours, shared by cycle strips, legends and calendars. */
.s-D { --shift: #f6d77a; --shift-ink: #3b2f00; }
.s-E { --shift: #cfe6b8; --shift-ink: #22380f; }
.s-L { --shift: #f6c19a; --shift-ink: #47230a; }
.s-N { --shift: #4b4a8f; --shift-ink: #ffffff; }
.s-X { --shift: #c8553d; --shift-ink: #ffffff; }
.s-O { --shift: #e9e9e1; --shift-ink: #62665d; }

/* Fourteen languages need a menu that scrolls on short screens. */
.language-menu > div {
  max-height: min(70vh, 620px);
  overflow-y: auto;
  min-width: 210px;
}
.language-menu a {
  white-space: nowrap;
}

/* Long compound words (German, Dutch, Swedish, Russian) may hyphenate rather than push a
   heading or card past its box. */
.selene h1,
.selene h2,
.selene h3,
.pattern-card strong,
.guide-links strong {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Japanese breaks between phrases, not inside a word such as カレンダー, where the browser
   can tell; Korean breaks at spaces. */
.selene:lang(ja) :is(h1, h2, h3, .lead, .hero-intro) {
  word-break: auto-phrase;
}
.selene:lang(ko) {
  word-break: keep-all;
}
.product-hero h1 {
  text-wrap: balance;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.band-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 24px;
  line-height: 1.35;
  border-radius: 999px;
  background: var(--product-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .band-link:hover {
    background: #3b3a78;
  }
}

/* Proof strip: four facts under the hero. */
.proof-strip {
  list-style: none;
  margin: 0;
  padding: 44px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.proof-strip strong {
  display: block;
  font-size: clamp(40px, 4.4vw, 60px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--product-accent);
}
.proof-strip a {
  display: block;
}
.proof-strip a:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.proof-strip span {
  display: block;
  margin-top: 14px;
  max-width: 24ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Who it is for. */
.who-section {
  padding: 100px 0 40px;
}
.who-section > h2,
.pattern-directory > h2,
.guide-links > h2 {
  font-size: clamp(30px, 3.3vw, 45px);
  max-width: 18ch;
}
.who-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
}
.who-grid article {
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
}
.who-grid p {
  margin-top: 12px;
  font-size: 17px;
  color: var(--muted);
}

/* Cycle strips. */
.cycle-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cycle-strip li {
  width: 44px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--shift);
  color: var(--shift-ink);
  font-size: 16px;
  font-weight: 650;
}
.cycle-strip.by-week {
  display: grid;
  grid-template-columns: repeat(7, 44px);
}
.cycle-strip.mini {
  gap: 3px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.cycle-strip.mini i {
  flex: 0 1 12px;
  min-width: 2px;
  height: 22px;
  border-radius: 3px;
  background: var(--shift);
}
.shift-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 15px;
  color: var(--muted);
}
.shift-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.shift-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--shift);
}
.shift-legend b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Pattern cards and the band on the product page. */
.pattern-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.pattern-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 3px rgb(32 35 30 / 6%);
}
.pattern-card:hover {
  box-shadow: 0 2px 6px rgb(32 35 30 / 8%), 0 10px 22px rgb(32 35 30 / 8%);
}
.pattern-card strong {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}
.pattern-card > span:last-child {
  font-size: 14px;
  color: var(--muted);
}
.pattern-band {
  margin-top: 60px;
  padding: 60px 45px;
  border-radius: 8px;
  background: var(--tone);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 50px;
  align-items: center;
}
.pattern-band h2 {
  font-size: 42px;
}
.pattern-band p:not(.eyebrow) {
  margin-top: 20px;
  max-width: 38ch;
}
.pattern-band .band-link {
  margin-top: 28px;
}
.pattern-band .pattern-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pattern-directory {
  padding: 80px 0 30px;
}
.pattern-directory .pattern-cards {
  margin-top: 36px;
}

/* Guide links. */
.guide-links {
  padding: 50px 0 30px;
}
.guide-links ul {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}
.guide-links li {
  border-top: 1px solid var(--line);
}
.guide-links a {
  display: block;
  padding: 24px 0 28px;
}
.guide-links strong {
  display: block;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.guide-links a:hover strong {
  color: var(--product-accent);
}
.guide-links span {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}
.product-end-download {
  display: flex;
  align-items: center;
  gap: 18px;
}
.version-note {
  font-size: 14px;
  color: var(--muted);
}

/* Generator, pattern and guide pages. */
.breadcrumbs {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumbs a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.breadcrumbs a:hover {
  color: var(--ink);
}
.tool-hero {
  padding: 36px 0 44px;
}
.tool-hero h1 {
  font-size: clamp(38px, 5vw, 68px);
  color: var(--product-accent);
  max-width: 22ch;
  text-wrap: balance;
}
.lead {
  margin-top: 22px;
  max-width: 58ch;
  font-size: 19px;
  color: var(--muted);
}

.pattern-summary {
  padding: 32px;
  border-radius: 8px;
  background: var(--tone);
  display: grid;
  gap: 22px;
}
.pattern-facts {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.pattern-facts dt {
  font-size: 14px;
  color: var(--muted);
}
.pattern-facts dd {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pattern-body {
  padding: 60px 0 20px;
  max-width: 64ch;
}
.pattern-body p + p {
  margin-top: 18px;
}
.pattern-body .text-link {
  margin-top: 22px;
}

/* The generator itself. The section keeps its height while the script starts. */
.shift-tool {
  margin-top: 40px;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.shift-tool.is-fixed {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.tool-controls {
  display: grid;
  gap: 28px;
}
.tool-controls fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.tool-field > span,
.tool-controls legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 650;
}
.tool-controls legend output {
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tool-field {
  display: block;
}
.tool-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2362665d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.tool-field select,
.tool-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
/* iOS Safari sizes a date field from its own content unless its native look is off. */
.tool-field input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 46px;
}
.tool-field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
.is-fixed .tool-field {
  max-width: 340px;
}
.tool-hint {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
/* One shift per row, so a long name (Eftermiddag, Выходной) is never cut. Chinese,
   Japanese and Korean names are short enough for two columns. */
.shift-palette {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.selene:is(:lang(zh), :lang(ja), :lang(ko)) .shift-palette {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.shift-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
}
.shift-chip:has(input[type="radio"]:checked) {
  border-color: var(--product-accent);
}
.shift-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.shift-chip:has(input[type="radio"]:focus-visible) {
  outline: 3px solid #3858f3;
  outline-offset: 3px;
}
.swatch {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--shift);
  color: var(--shift-ink);
  font-size: 14px;
  font-weight: 650;
}
.shift-chip input[type="text"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.shift-chip input[type="text"]:focus {
  outline: none;
  border-bottom-color: var(--product-accent);
}
.shift-chip input[type="text"][readonly] {
  pointer-events: none;
  text-overflow: ellipsis;
}
.shift-rename {
  flex: none;
  width: 36px;
  height: 36px;
  margin: -2px -4px -2px -6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: none;
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .shift-rename:hover {
    color: var(--ink);
    background: #f0f0e8;
  }
}
.cycle-editor {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cycle-editor button {
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  background: var(--shift);
  color: var(--shift-ink);
}
.cycle-editor small {
  font-size: 12px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
.cycle-editor span {
  font-size: 16px;
  font-weight: 650;
}
.cycle-size {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}
.cycle-size button,
.tool-range-nav button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  font-size: 20px;
  line-height: 1;
}
.cycle-size button:disabled {
  opacity: 0.35;
  cursor: default;
}
.tool-output {
  min-width: 0;
}
.tool-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.tool-range-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tool-range {
  min-width: 15ch;
  text-align: center;
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.tool-range span {
  white-space: nowrap;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.tool-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: none;
  font-size: 15px;
  font-weight: 600;
}
/* Hover styles only where there is a pointer that hovers: on touch they would stick. */
@media (hover: hover) and (pointer: fine) {
  .tool-actions button:hover {
    background: var(--ink);
    color: var(--paper);
  }
}
.tool-actions button:active {
  background: var(--ink);
  color: var(--paper);
}
/* Read to screen readers only; sighted users see the button's label change. */
.tool-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.tool-totals {
  margin-top: 20px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.year-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
}
.is-fixed .year-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.month h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.4;
}
.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.weekdays {
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.day {
  aspect-ratio: 1 / 1.2;
  border-radius: 6px;
  display: grid;
  align-content: center;
  justify-items: center;
  background: var(--shift);
  color: var(--shift-ink);
  line-height: 1.15;
}
.day b {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.day i {
  min-height: 15px;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}
.day.is-empty {
  background: none;
}
.day.is-today {
  box-shadow: 0 0 0 2px var(--ink);
}

/* App band: the invitation to install, on tool, pattern and guide pages. */
.app-band {
  margin-top: 70px;
  padding: 40px 45px;
  border-radius: 8px;
  background: var(--tone);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}
.app-band .app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.app-band h2 {
  font-size: 30px;
  color: var(--product-accent);
}
.app-band p {
  margin-top: 10px;
  max-width: 46ch;
}
.app-band-actions {
  display: grid;
  justify-items: start;
  gap: 4px;
}

/* Guides. */
.guide {
  max-width: 760px;
  margin-inline: auto;
}
.guide h1 {
  font-size: clamp(36px, 4.6vw, 60px);
  color: var(--product-accent);
}
.guide > .eyebrow {
  margin: 36px 0 20px;
}
.byline {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
.guide section {
  margin-top: 56px;
}
.guide h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.guide section > p,
.guide section > ul,
.guide section > ol {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.7;
}
.guide section > ul,
.guide section > ol {
  padding-left: 1.3em;
}
.guide section > ul > li + li,
.guide section > ol > li + li {
  margin-top: 8px;
}
.guide figure {
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 8px;
  background: var(--tone);
  display: grid;
  gap: 18px;
  justify-items: start;
}
.guide-shot {
  justify-items: center;
}
.guide-shot img {
  width: min(280px, 100%);
  border-radius: 20px;
}
.guide figcaption {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.guide .pattern-cards {
  margin-top: 24px;
}
.guide-page .app-band,
.guide-page .guide-links {
  max-width: 760px;
  margin-inline: auto;
}
.guide-page .app-band {
  margin-top: 70px;
  grid-template-columns: auto minmax(0, 1fr);
}
.guide-page .app-band-actions {
  grid-column: 2;
}
.guide-page .guide-links ul {
  grid-template-columns: 1fr;
}
.shift-page .support-section,
.guide-page .support-section {
  padding-top: 80px;
}

@media (max-width: 1000px) {
  .who-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pattern-band {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 44px 30px;
  }
  .shift-tool {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .is-fixed .year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .app-band {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 36px 30px;
  }
  .app-band-actions {
    grid-column: 2;
  }
}
@media (max-width: 650px) {
  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 20px;
    padding: 34px 0;
  }
  .proof-strip strong {
    font-size: 40px;
  }
  .who-section {
    padding: 65px 0 20px;
  }
  .who-section > h2,
  .pattern-directory > h2,
  .guide-links > h2 {
    font-size: 32px;
  }
  .who-grid {
    margin-top: 32px;
    grid-template-columns: 1fr;
  }
  .who-grid article {
    padding: 22px 0 24px;
  }
  .pattern-band {
    margin-top: 40px;
    padding: 35px 24px;
  }
  .pattern-band h2 {
    font-size: 34px;
  }
  .pattern-cards,
  .pattern-band .pattern-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pattern-card {
    padding: 14px;
  }
  .pattern-card strong {
    font-size: 16px;
  }
  .guide-links ul {
    grid-template-columns: 1fr;
  }
  .product-end-download {
    flex-wrap: wrap;
  }
  .tool-hero {
    padding: 22px 0 30px;
  }
  .lead {
    font-size: 18px;
  }
  .pattern-summary {
    padding: 24px 20px;
  }
  .cycle-strip li {
    width: 38px;
    height: 46px;
  }
  .cycle-strip.by-week {
    grid-template-columns: repeat(7, 38px);
  }
  .pattern-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .year-grid,
  .is-fixed .year-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .day {
    aspect-ratio: 1 / 0.95;
  }
  .day b {
    font-size: 13px;
  }
  .tool-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .tool-range-nav {
    justify-content: space-between;
  }
  .tool-range {
    min-width: 0;
    font-size: 17px;
    line-height: 1.35;
  }
  .tool-range span {
    display: block;
  }
  .app-band {
    margin-top: 50px;
    padding: 30px 24px;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .guide-page .app-band {
    grid-template-columns: 1fr;
  }
  .app-band-actions,
  .guide-page .app-band-actions {
    grid-column: 1;
  }
  .guide section {
    margin-top: 44px;
  }
  .guide figure {
    padding: 20px;
  }
}

@media print {
  /* One A4 page: the title, the totals and twelve months. */
  @page {
    margin: 12mm;
  }
  .masthead,
  .footer,
  .skip-link,
  .breadcrumbs,
  .tool-controls,
  .tool-actions,
  .tool-range-nav button,
  .pattern-summary,
  .pattern-directory,
  .pattern-body,
  .app-band,
  .support-section,
  .guide-links,
  .tool-hero .eyebrow,
  .lead {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .product-page {
    width: 100%;
  }
  .tool-hero {
    padding: 0 0 6px;
  }
  .tool-hero h1 {
    font-size: 20px;
    max-width: none;
  }
  .shift-tool {
    margin-top: 0;
    min-height: 0;
    display: block;
  }
  .tool-range {
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
  }
  .tool-totals {
    margin-top: 8px;
    padding: 8px 0;
    font-size: 12px;
  }
  .year-grid,
  .is-fixed .year-grid {
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 20px;
  }
  .month {
    break-inside: avoid;
  }
  .month h3 {
    font-size: 12px;
  }
  .weekdays {
    margin: 4px 0 3px;
    font-size: 9px;
  }
  .weekdays,
  .days {
    gap: 2px;
  }
  .day {
    aspect-ratio: auto;
    height: 26px;
    border-radius: 4px;
    line-height: 1.05;
  }
  .day b {
    font-size: 9px;
  }
  .day i {
    min-height: 0;
    font-size: 10px;
  }
  .day,
  .shift-legend i {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
