/* NEXUS Start (the new tab page as a website). Same look as the browser's new tab. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #5c5c63;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --card: rgba(255, 255, 255, 0.92);
  --hover: rgba(10, 10, 10, 0.05);
  --tile: #ffffff;
  --tile-border: #e4e4e7;
  --add: #ffffff;
  --add-text: #0a0a0a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.07);
  --dune-sky: #ffffff;
  --dune-shadow: #b4b4bb;
  --dune-light: #ffffff;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0e10;
    --text: #ededed;
    --muted: #a3a3a8;
    --border: #2a2a2e;
    --border-strong: #3a3a3e;
    --card: rgba(26, 26, 29, 0.92);
    --hover: rgba(255, 255, 255, 0.06);
    --tile: #f4f4f5;
    --tile-border: transparent;
    --add: #2a2a2d;
    --add-text: #ededed;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
    --dune-sky: #0e0e10;
    --dune-shadow: #070708;
    --dune-light: #9a9ba1;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0e10;
  --text: #ededed;
  --muted: #a3a3a8;
  --border: #2a2a2e;
  --border-strong: #3a3a3e;
  --card: rgba(26, 26, 29, 0.92);
  --hover: rgba(255, 255, 255, 0.06);
  --tile: #f4f4f5;
  --tile-border: transparent;
  --add: #2a2a2d;
  --add-text: #ededed;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
  --dune-sky: #0e0e10;
  --dune-shadow: #070708;
  --dune-light: #9a9ba1;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
/* No body background: it would paint over the dunes layer (z-index: -1). */
html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body {
  overflow-x: hidden;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.st-land {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 64vh;
  min-height: 280px;
  z-index: -1;
  pointer-events: none;
}
.st-top {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.st-top a,
.st-top button {
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(8px);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  cursor: pointer;
}
.st-top button {
  padding: 0;
}
.st-top a .short {
  display: none;
}
.st-top svg {
  width: 18px;
  height: 18px;
}
.only-dark {
  display: none !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .only-dark {
    display: inline !important;
  }
  :root:not([data-theme='light']) .only-light {
    display: none !important;
  }
}
:root[data-theme='dark'] .only-dark {
  display: inline !important;
}
:root[data-theme='dark'] .only-light {
  display: none !important;
}
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15vh 20px 40px;
  gap: 30px;
}
.st-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.26em;
  margin-right: -0.26em;
}
.st-logo svg {
  width: 46px;
  height: 46px;
}
#st-search {
  width: min(560px, 100%);
  height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 25px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
#st-search:focus-within {
  border-color: var(--border-strong);
}
#st-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 15.5px;
}
#st-search input::placeholder {
  color: var(--muted);
}
#st-search svg {
  width: 20px;
  height: 20px;
  flex: none;
}
#st-clear {
  width: 28px;
  height: 28px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
#st-clear:hover {
  background: var(--hover);
  color: var(--text);
}
#st-pins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  max-width: 560px;
}
.st-pin-wrap {
  position: relative;
}
.st-pin-wrap[draggable='true'] {
  cursor: grab;
}
.st-pin-wrap.dragging {
  opacity: 0.35;
}
.st-pin {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  box-shadow: var(--shadow);
  color: #0a0a0a;
  text-decoration: none;
  transition: transform 0.12s;
  cursor: pointer;
}
.st-pin:hover {
  transform: translateY(-2px);
}
.st-pin svg {
  width: 24px;
  height: 24px;
}
.st-letter {
  font-size: 19px;
  font-weight: 650;
}
.st-add {
  background: var(--add);
  color: var(--add-text);
  font-size: 24px;
  font-weight: 300;
}
.st-unpin {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.st-pin-wrap:hover .st-unpin,
.st-unpin:focus-visible {
  opacity: 1;
}
.st-note {
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.st-note a {
  color: var(--text);
}
dialog {
  width: min(400px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
dialog h2 {
  margin: 0 0 14px;
  font-size: 17px;
}
dialog label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
dialog input,
dialog select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
}
dialog p {
  color: var(--muted);
  font-size: 13.5px;
}
dialog details {
  margin: 4px 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}
dialog summary {
  cursor: pointer;
  color: var(--text);
}
.st-err {
  color: #d12c3f;
  font-size: 12.5px;
  margin: -6px 0 10px;
}
.st-err:empty {
  display: none;
}
.st-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.st-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
}
.st-btn.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
@media (max-width: 640px) {
  main {
    padding-top: 12vh;
  }
  .st-top a .long {
    display: none;
  }
  .st-top a .short {
    display: inline;
  }
}
