/* Fonts: Montserrat + Open Sans (variable) and IBM Plex Mono 500, served from this origin. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("fonts/open-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("fonts/open-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #2b2f2d;
  --panel: #353b38;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f3f5f4;
  --ink-2: #cbd2ce;
  --ink-3: #a5aea9;
  --green: #45e32d;
  --on-green: #10140f;
  --glow: 0 44px 90px -54px rgba(69, 227, 45, 0.42), 0 18px 40px -30px rgba(0, 0, 0, 0.55);
  --gutter: 16px;
  --head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

main {
  max-width: 30rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
  display: flex;
  flex-direction: column;
}

h1,
h2,
p {
  margin: 0;
}

/* ---------- the card ---------- */

.card {
  position: relative;
  aspect-ratio: 1.586;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--glow);
  animation: card-in 500ms ease-out both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 4px;
}

.card .logo {
  align-self: flex-end;
  flex: 0 0 auto;
}

.card-body {
  margin-top: auto;
  padding-top: 20px;
  min-width: 0;
}

.name {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1.75rem, 9.4vw, 2.65rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
  color: var(--ink);
}

mark {
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(
    transparent 60%,
    rgba(69, 227, 45, 0.38) 60%,
    rgba(69, 227, 45, 0.38) 92%,
    transparent 92%
  );
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: mark-in 800ms ease-out 500ms both;
}

@keyframes mark-in {
  from {
    background-size: 0% 100%;
  }
}

.role {
  margin-top: 12px;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.company {
  margin-top: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

/* ---------- the list ---------- */

.pick {
  margin-top: 40px;
}

.pick h2 {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.items {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.item-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
}

.check {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--ink-3);
  border-radius: 4px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.8l4.3 4.2 8.7-9.2' fill='none' stroke='%2310140f' stroke-width='3.4' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0% 0%;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, background-size 140ms ease-out;
}

.check:checked {
  background-color: var(--green);
  border-color: var(--green);
  background-size: 100% 100%;
}

.check:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity 140ms ease-out;
}

.item.off .item-text {
  opacity: 0.45;
}

.item-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.item-value {
  font-family: var(--body);
  font-size: 1.03125rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--head);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.open .t {
  padding-bottom: 2px;
  border-bottom: 2px solid var(--green);
}

.open .ico {
  font-size: 0.9375rem;
  line-height: 1;
}

.open:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 0;
}

/* ---------- foot note and sticky save ---------- */

.foot {
  margin: 24px 0 32px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

.bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}

.foot + .bar {
  margin-top: auto;
}

.bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 24px;
  background: linear-gradient(rgba(43, 47, 45, 0), var(--bg));
  pointer-events: none;
}

.note {
  padding-bottom: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.note:empty {
  display: none;
}

.save-btn {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--green);
  color: var(--on-green);
  font-family: var(--head);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 90ms ease-out;
}

.save-btn:active {
  transform: translateY(1px) scale(0.995);
}

.save-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- invalid state ---------- */

.invalid {
  padding: 56px 0;
  text-align: center;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
}

.invalid .logo {
  margin: 0 auto 24px;
  width: 64px;
  height: 64px;
}

.invalid-msg {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.3;
  text-align: center;
}

@media (hover: hover) {
  .save-btn:hover {
    filter: brightness(1.06);
  }

  .open:hover .t {
    border-bottom-color: var(--ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  mark {
    animation: none;
  }

  .check,
  .item-text,
  .save-btn {
    transition: none;
  }

  .save-btn:active {
    transform: none;
  }
}
