/* Ink foundations */
@font-face {
  font-family: Pixel;
  src: url("/assets/GeistPixel-Square.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("/assets/Geist-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #090909;
  --field: #151515;
  --card: #1e1e1e;
  --text: #ededed;
  --muted: #a3a3a3;
  --line: #333;
  --hover: #292929;
  --chip: #2c2c2c;
  --soft: #bcbcbc;
  --edge: #4c4c4c;
  --accent: #b3d4ad;
  --action: #718b73;
  --link: #a7c7f4;
  --font-body: Geist, Arial, sans-serif;
  --font-pixel: Pixel, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--font-body);
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--bg);
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}

/* Wordmark and site header */
.wordmark {
  font-family: var(--font-pixel);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--accent);
  font-size: 24px;
}
.wordmark:hover {
  text-decoration: none;
}
.site-header {
  --header-gutter: 30px;
  padding: 20px var(--header-gutter);
}
.site-header .wordmark {
  display: flex;
  align-items: center;
  align-self: flex-start;
  flex: none;
  width: 152px;
  height: 44px;
  line-height: 28px;
}

@media (max-width: 850px) {
  .site-header {
    --header-gutter: 20px;
  }
}

/* Shared account menu */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.account-header button,
.account summary {
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.account {
  position: relative;
  min-width: 0;
}
.account summary,
#sign-in {
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 8px;
  padding: 8px 12px;
}
.account summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}
.account summary::-webkit-details-marker {
  display: none;
}
.account summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid var(--muted);
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
  flex: none;
}
.account summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.account-panel {
  position: absolute;
  z-index: 2;
  right: 0;
  top: calc(100% + 8px);
  width: min(256px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}
.account-panel p {
  margin: 0;
  overflow-wrap: anywhere;
}
.account-panel p + p {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
  margin: 2px 0 6px;
}
.account-panel :is(a, button) {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 8px 4px;
}
.account-panel :is(a, button):hover {
  background: var(--hover);
}

/* Search field and submit action */
.search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--field);
  min-height: 56px;
  padding: 5px 6px 5px 20px;
  border-radius: 999px;
  transition: border-color 120ms ease;
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  outline: none;
  box-shadow: none;
}
.search-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.search-field:focus-within,
.search-field input:focus-visible {
  outline: none;
  box-shadow: none;
}
.search-submit {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 0;
  position: relative;
  isolation: isolate;
  border-radius: 50%;
  background: transparent;
  color: var(--bg);
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition:
    opacity 140ms ease-out,
    transform 160ms ease-out,
    visibility 0s;
}
.search-field:hover,
.search-field:focus-within {
  border-color: var(--edge);
}
.search-field:focus-within input::placeholder {
  opacity: 0;
}
.search-submit::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
}
.search-submit:hover {
  background: transparent;
}
.search-submit:hover::before {
  background: #c5dfc0;
}
.search-submit svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.search-field:has(input:placeholder-shown) .search-submit,
.search-submit:disabled {
  opacity: 0;
  transform: scale(0.88);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 120ms ease-out,
    transform 140ms ease-out,
    visibility 0s linear 140ms;
}

@media (prefers-reduced-motion: reduce) {
  .search-field {
    transition: none;
  }
  .search-submit,
  .search-submit:disabled,
  .search-field:has(input:placeholder-shown) .search-submit {
    transition: none;
    transform: none;
  }
}

/* Native provider picker */
.provider-picker {
  position: relative;
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  --picker-padding: 6px 30px 6px 10px;
  font: 13px/1.5 var(--font-body);
}
#provider-width {
  display: block;
  visibility: hidden;
  padding: var(--picker-padding);
  min-height: 36px;
  white-space: pre;
}
.provider-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  min-height: 36px;
  padding: var(--picker-padding);
  border: 0;
  border-radius: 8px;
  --provider-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23bcbcbc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background: transparent var(--provider-chevron) no-repeat right 10px center / 12px;
  color: var(--soft);
  font: 13px/1.5 var(--font-body);
  cursor: pointer;
}
.provider-picker select[data-pointer-focus]:focus { outline: none; }
.provider-picker select:hover {
  color: var(--text);
}
.provider-picker select:not([data-pointer-focus]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@supports selector(select:has(> option:checked)) {
  .provider-picker { --picker-padding: 6px 30px 6px 34px; }
  .provider-picker select {
    background-image: var(--provider-icon, none), var(--provider-chevron);
    background-position: left 10px center, right 10px center;
    background-size: 16px, 12px;
  }
  .provider-picker select:has(> option[value="exa"]:checked) {
    --provider-icon: url("/assets/provider-exa.png");
  }
  .provider-picker select:has(> option[value="brave"]:checked) {
    --provider-icon: url("/assets/provider-brave.png");
  }
  .provider-picker select:has(> option[value="serper"]:checked) {
    --provider-icon: url("/assets/provider-serper.png");
  }
}
@media (forced-colors: active) {
  .provider-picker select {
    appearance: auto;
    background: none;
    padding-left: 10px;
  }
}

/* Dino Assist, sources and recovery actions */
.assist-panel {
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  min-width: 0;
}
.assist-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
}
.assist-heading h2,
.assist-heading h3 {
  margin: 0;
  font: 400 16px/1.3 var(--font-pixel);
}
.assist-panel p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
}
.assist-panel p:last-child {
  margin-bottom: 0;
}
.citation {
  font-size: 11px;
  vertical-align: super;
  margin-left: 3px;
  color: var(--accent);
}
.assist-offer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.assist-offer-copy {
  min-width: 0;
}
.assist-offer .assist-heading {
  margin-bottom: 4px;
}
.assist-offer p {
  font-size: 14px;
  color: var(--muted);
}
.generate-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--action);
  color: var(--bg);
  font: 400 16px/1.25 var(--font-pixel);
  transition:
    transform 120ms ease-out,
    border-color 120ms ease-out;
}
.generate-button::after {
  content: "";
  position: absolute;
  inset: -5px 0;
}
.generate-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.generate-button:active {
  transform: translateY(0);
}
.generate-button:focus-visible,
.recovery-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.assist-panel .assist-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}
.assist-activity {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.assist-activity i {
  width: 3px;
  height: 3px;
  background: var(--action);
  animation: assist-reading 1400ms ease-in-out infinite;
}
.assist-activity i:nth-child(2) {
  animation-delay: 160ms;
}
.assist-activity i:nth-child(3) {
  animation-delay: 320ms;
}
@keyframes assist-reading {
  0%,
  70%,
  100% {
    opacity: 0.3;
  }
  35% {
    opacity: 1;
  }
}
.assist-skeleton {
  display: grid;
  gap: 10px;
  padding: 0 0 2px;
}
.assist-skeleton span {
  position: relative;
  overflow: hidden;
  display: block;
  width: 93%;
  height: 4px;
  background: var(--chip);
}
.assist-skeleton span:nth-child(2) {
  width: 72%;
}
.assist-skeleton span:nth-child(3) {
  width: 56%;
}
.assist-panel .assist-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: #cbbda8;
}
.assist-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.assist-sources a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--soft);
  font-size: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.source-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
}
.recovery-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--soft);
  font-size: 13px;
  transition: color 120ms ease-out;
}
.recovery-action svg {
  width: 16px;
  height: 16px;
  transition: transform 120ms ease-out;
}
.recovery-action:hover {
  color: var(--text);
}
.recovery-action:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.recovery-action:hover svg {
  transform: translateX(2px);
}
.recovery-action:active svg {
  transform: translateX(0);
}
/* Chromium sprite geometry is in source pixels at 2x. See dino-catalogue/CHROMIUM-LICENSE.txt. */
.assist-flyer {
  display: block;
  position: relative;
  width: 23px;
  height: 20px;
  flex-shrink: 0;
  transform: scaleX(-1);
}
.flyer-wings {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    0 100%,
    0 55%,
    30.4347826% 55%,
    30.4347826% 15%,
    0 15%
  );
}
.flyer-wings img {
  display: block;
  position: absolute;
  left: -67px;
  top: -1px;
  width: 616.5px;
  height: 50px;
  max-width: none;
  image-rendering: pixelated;
}
.assist-flyer.is-generating .flyer-wings img {
  animation: assist-wingbeat 333.333333ms steps(2, end) infinite;
}
.flyer-head {
  position: absolute;
  left: 0;
  top: 3px;
  width: 7px;
  height: 8px;
  background: url("dino-catalogue/chromium-green-outline.svg") -67px -4px / 616.5px 50px no-repeat;
  image-rendering: pixelated;
}
@keyframes assist-wingbeat {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-46px);
  }
}
.assist-skeleton span::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, var(--edge), transparent);
  transform: translateX(-100%);
  animation: assist-shimmer 2400ms ease-in-out infinite;
  pointer-events: none;
}
@keyframes assist-shimmer {
  0%,
  15% {
    transform: translateX(-100%);
  }
  75%,
  100% {
    transform: translateX(100%);
  }
}
@media (max-width: 480px) {
  .assist-panel {
    padding: 14px;
  }
  .assist-offer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .generate-button {
    max-width: 100%;
  }
  .assist-sources {
    column-gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .generate-button,
  .recovery-action,
  .recovery-action svg {
    transition: none;
  }
  .generate-button:hover,
  .generate-button:active,
  .recovery-action:hover svg,
  .recovery-action:active svg {
    transform: none;
  }
  .assist-activity i {
    animation: none;
    opacity: 0.7;
  }
  .assist-flyer.is-generating .flyer-wings img {
    animation: none;
  }
  .assist-skeleton span::after {
    animation: none;
    display: none;
  }
}

[hidden] { display: none !important; }
.account-header { flex-wrap: wrap; }
.account-header > p { flex-basis: 100%; margin: 0; color: var(--muted); }
.account-header > p:empty { display: none; }
