/* korriwan.com: the bar across the top of a page: the wordmark on the left and the round toggles on the
   right. The glass tint control beside them has a stylesheet of its own, tint.css. */
@layer header {
  .top {
    position: relative;
    flex: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 20px;
  }
  .mark {
    --lh: 1;
    --extra: .66;
    font: 500 2.25rem var(--display);
    letter-spacing: -.01em;
    white-space: nowrap;
  }
  .tools {
    display: flex;
    justify-content: flex-end;
  }
  .tools > * + * { margin-left: 8px; }
  .tool {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: var(--lift);
    cursor: pointer;
    transition: background-color .2s ease, width .4s var(--ease), margin .4s var(--ease), opacity .25s ease .1s, visibility 0s;
  }
  .tool:hover { background: var(--glass-strong); }
  /* on a narrow screen the two round toggles step aside while the tint slider is open */
  .tools[data-tight] > .tool {
    width: 0;
    margin-left: 0;
    border-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: width .4s var(--ease), margin .4s var(--ease), opacity .15s ease, visibility 0s .4s;
  }
  .tool svg,
  .tint-btn svg {
    grid-area: 1 / 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tool .sun { opacity: var(--night); }
  .tool .moon { opacity: calc(1 - var(--night)); }
  .tool .sprig, .tool .strike { transition: opacity .3s ease; }
  .tool .strike { opacity: 0; }
  .tool[aria-pressed="false"] .sprig { opacity: .4; }
  .tool[aria-pressed="false"] .strike { opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .tool, .tools[data-tight] > .tool { transition: none; }
  }
}
