:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  background: #000;
  color: #f5f5f5;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #000;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

.status {
  position: fixed;
  z-index: 2;
  top: clamp(1.5rem, 3vw, 2.75rem);
  left: clamp(1.5rem, 4vw, 4rem);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  letter-spacing: -0.04em;
}

.time {
  color: #f7f7f7;
  font-size: clamp(1.65rem, 2.25vw, 2.5rem);
  font-weight: 520;
  line-height: 1;
}

.weather {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #777;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 160ms ease;
}

.weather:hover,
.weather:focus-visible {
  color: #d0d0d0;
  outline: none;
}

.weather-dot {
  width: 0.33rem;
  height: 0.33rem;
  border-radius: 999px;
  background: #575757;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 3%);
}

.weather.is-live .weather-dot {
  background: #d5d5d5;
}

.dashboard {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(90vw, 48rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 8rem 0 6rem;
  place-content: center;
}

.settings-button {
  position: fixed;
  z-index: 3;
  top: clamp(1.35rem, 2.7vw, 2.55rem);
  right: clamp(1.5rem, 4vw, 4rem);
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #565656;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 180ms ease;
}

.settings-button:hover,
.settings-button:focus-visible {
  border-color: #282828;
  background: #0a0a0a;
  color: #c8c8c8;
  outline: none;
  transform: rotate(18deg);
}

.settings-button svg {
  width: 1.16rem;
  height: 1.16rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.search-area {
  width: 100%;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  height: 4.35rem;
  border: 1px solid #242424;
  border-radius: 1.15rem;
  background: rgb(10 10 10 / 88%);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 60%), inset 0 1px 0 rgb(255 255 255 / 4%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search::after {
  position: absolute;
  right: 1.1rem;
  bottom: -1px;
  left: 1.1rem;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #8a8a8a, transparent);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 180ms ease, transform 240ms ease;
}

.search:focus-within {
  border-color: #4a4a4a;
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 65%), 0 0 0 4px rgb(255 255 255 / 3%), inset 0 1px 0 rgb(255 255 255 / 7%);
  transform: translateY(-1px);
}

.search:focus-within::after {
  opacity: 1;
  transform: scaleX(1);
}

.search-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 1.45rem;
  fill: none;
  stroke: #686868;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 1.15rem;
  background: transparent;
  color: #f2f2f2;
  caret-color: #fff;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search input::placeholder {
  color: #515151;
}

.keycap,
kbd {
  font-family: inherit;
}

.keycap {
  margin-right: 1.15rem;
  border: 1px solid #292929;
  border-radius: 0.43rem;
  padding: 0.22rem 0.48rem 0.28rem;
  color: #626262;
  font-size: 0.75rem;
  line-height: 1;
}

.search-meta {
  display: flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.45rem;
  color: #565656;
  font-size: 0.78rem;
}

.search-meta p {
  margin: 0;
}

.shortcut-hint {
  text-align: right;
}

.search-meta kbd {
  color: #787878;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.quick-links a {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid #161616;
  border-radius: 0.95rem;
  padding: 1rem 0.9rem 0.9rem;
  overflow: hidden;
  background: #080808;
  color: #777;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.quick-links a::after {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgb(255 255 255 / 2.5%));
  content: "";
  pointer-events: none;
}

.shortcut-key {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  color: #3f3f3f;
  font-size: 0.67rem;
  text-transform: uppercase;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  border-color: #383838;
  background: #0c0c0c;
  color: #dedede;
  outline: none;
  transform: translateY(-3px);
}

.quick-links a:active {
  transform: translateY(-1px) scale(0.99);
}

.link-mark {
  display: grid;
  width: 1.95rem;
  height: 1.95rem;
  place-items: center;
  border: 1px solid #242424;
  border-radius: 0.58rem;
  background: #0f0f0f;
  color: #d4d4d4;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.verge-mark {
  font-style: italic;
}

.quick-links a > span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ambient {
  position: fixed;
  top: 44%;
  left: 50%;
  width: min(70rem, 100vw);
  height: min(35rem, 60vh);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 2.8%), transparent 65%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.settings {
  width: min(92vw, 36rem);
  max-height: min(84vh, 46rem);
  border: 1px solid #2b2b2b;
  border-radius: 1.35rem;
  padding: 0;
  overflow: hidden;
  background: #080808;
  color: #eee;
  box-shadow: 0 2rem 8rem rgb(0 0 0 / 85%), inset 0 1px 0 rgb(255 255 255 / 5%);
}

.settings::backdrop {
  background: rgb(0 0 0 / 76%);
  backdrop-filter: blur(8px);
}

.settings-panel {
  max-height: min(84vh, 46rem);
  padding: 1.6rem;
  overflow-y: auto;
}

.settings-header,
.settings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.settings-header {
  margin-bottom: 1.7rem;
}

.eyebrow,
.settings h1,
.settings h2,
.settings p {
  margin: 0;
}

.eyebrow {
  margin-bottom: 0.2rem !important;
  color: #555;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.settings h1 {
  font-size: 1.55rem;
  font-weight: 540;
  letter-spacing: -0.04em;
}

.settings h2 {
  font-size: 0.95rem;
  font-weight: 520;
}

.section-copy p {
  margin-top: 0.3rem;
  color: #5f5f5f;
  font-size: 0.76rem;
}

.close-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #242424;
  border-radius: 999px;
  padding: 0 0 0.16rem;
  background: #101010;
  color: #777;
  cursor: pointer;
  font-size: 1.35rem;
}

.close-button:hover,
.close-button:focus-visible {
  color: #eee;
  outline: none;
}

.settings-section {
  border-top: 1px solid #1d1d1d;
  padding: 1.2rem 0;
}

.select-wrap select,
.add-shortcut input {
  border: 1px solid #292929;
  border-radius: 0.65rem;
  outline: none;
  background: #111;
  color: #d7d7d7;
}

.select-wrap select {
  min-width: 8.5rem;
  padding: 0.55rem 0.75rem;
}

.select-wrap select:focus,
.add-shortcut input:focus {
  border-color: #555;
}

.shortcuts-settings {
  display: block;
}

.shortcut-list {
  display: grid;
  gap: 0.4rem;
  max-height: 14rem;
  margin-top: 1rem;
  padding-right: 0.2rem;
  overflow-y: auto;
}

.shortcut-row {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #1e1e1e;
  border-radius: 0.7rem;
  padding: 0.58rem 0.65rem;
  background: #0c0c0c;
}

.shortcut-row-mark {
  color: #aaa;
  font-size: 0.7rem;
  font-weight: 650;
}

.shortcut-row-copy {
  min-width: 0;
}

.shortcut-row-copy strong,
.shortcut-row-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-row-copy strong {
  color: #bbb;
  font-size: 0.78rem;
  font-weight: 500;
}

.shortcut-row-copy span {
  margin-top: 0.12rem;
  color: #484848;
  font-size: 0.67rem;
}

.row-key {
  min-width: 1.55rem;
  border: 1px solid #292929;
  border-radius: 0.38rem;
  padding: 0.22rem 0.35rem;
  color: #777;
  font-size: 0.67rem;
  text-align: center;
  text-transform: uppercase;
}

.remove-link {
  border: 0;
  padding: 0.25rem;
  background: transparent;
  color: #454545;
  cursor: pointer;
  font-size: 1rem;
}

.remove-link:hover,
.remove-link:focus-visible {
  color: #d0d0d0;
  outline: none;
}

.add-shortcut {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr 3.4rem auto;
  align-items: end;
  gap: 0.55rem;
  margin-top: 1rem;
}

.add-shortcut label {
  min-width: 0;
}

.add-shortcut label > span {
  display: block;
  margin: 0 0 0.35rem 0.15rem;
  color: #555;
  font-size: 0.66rem;
}

.add-shortcut input {
  width: 100%;
  height: 2.35rem;
  padding: 0 0.65rem;
  font-size: 0.76rem;
}

.add-button {
  height: 2.35rem;
  border: 1px solid #dedede;
  border-radius: 0.65rem;
  padding: 0 0.85rem;
  background: #efefef;
  color: #080808;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
}

.add-button:hover,
.add-button:focus-visible {
  background: #fff;
  outline: none;
}

.form-message {
  min-height: 1rem;
  margin-top: 0.55rem !important;
  color: #8d8d8d;
  font-size: 0.7rem;
}

.settings-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #1d1d1d;
  padding-top: 1rem;
  color: #444;
  font-size: 0.68rem;
}

.settings-footer a {
  color: #666;
  text-decoration: none;
}

.settings-footer a:hover,
.settings-footer a:focus-visible {
  color: #bbb;
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .dashboard {
    width: min(90vw, 31rem);
    padding: 7.5rem 0 3rem;
    transform: none;
  }

  .quick-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-links a {
    min-height: 6.1rem;
  }

  .add-shortcut {
    grid-template-columns: 1fr 4rem auto;
  }

  .url-field {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 440px) {
  .search-meta {
    align-items: flex-start;
    gap: 0.45rem;
    padding-top: 0.65rem;
  }

  .search-meta p {
    max-width: 12rem;
    line-height: 1.55;
  }

  .shortcut-hint {
    display: none;
  }

  .quick-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-panel {
    padding: 1.25rem;
  }

  .settings-section:first-of-type {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
