:root {
  color-scheme: dark;

  --p: #111925;
  --p2: #172231;
  --line: #27364a;
  --txt: #eef5ff;
  --muted: #8ea1ba;
  --a: #50c8ff;
  --bg: #090d14;
  --surface: #0c121b;
  --line-strong: #33465f;
  --line-hover: #4d6988;

  --card-h: 160px;
  --icon: 64px;
  --img: 44px;
  --name-size: 16px;
  --card-gap: 13px;
  --card-scale: 1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;

  --p: #ffffff;
  --p2: #edf2f7;
  --line: #d5dde7;
  --txt: #17202b;
  --muted: #68788c;
  --a: #007fb8;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line-strong: #c1ccd9;
  --line-hover: #91a4b8;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;

    --p: #ffffff;
    --p2: #edf2f7;
    --line: #d5dde7;
    --txt: #17202b;
    --muted: #68788c;
    --a: #007fb8;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --line-strong: #c1ccd9;
    --line-hover: #91a4b8;
  }
}

* {
  box-sizing: border-box;
}

/* Elements hidden from script stay hidden, even when a class gives them a
   display value (e.g. the upgrade page's plan buttons). */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
}

.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

aside {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  -webkit-user-select: none;
  user-select: none;
}

.brandbox {
  text-align: center;
}

.brand {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
}

.brand span {
  color: var(--a);
}

.sub {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  margin: 6px 0 28px;
}

.nav {
  flex: 0 0 auto;
}

.nav button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 11px 13px;
  border-radius: 9px;
  margin: 3px 0;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav button:hover,
.nav button.active {
  background: var(--p2);
  color: var(--txt);
}

.nav button.active {
  box-shadow: inset 3px 0 var(--a);
}

#head {
  -webkit-user-select: none;
  user-select: none;
}

.dashboard-row {
  position: relative;
  margin: 3px 0;
}

.dashboard-row.dragging-live {
  margin: 0;
  z-index: 2000;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.dashboard-row.dragging-live .dashboard-main {
  background: var(--p2) !important;
  color: var(--txt) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45) !important;
  opacity: 1 !important;
}

.dashboard-row .dashboard-main {
  width: 100%;
  min-width: 0;
  margin: 0;
  position: relative;
  display: block;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 11px 34px 11px 13px;
  border-radius: 9px;
  font-weight: 650;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
}

.dashboard-row .dashboard-main:hover,
.dashboard-row .dashboard-main.active,
.dashboard-row.dragging-live .dashboard-main {
  background: var(--p2);
  color: var(--txt);
}

.sidebar-context {
  position: fixed;
  z-index: 1600;
  display: none;
  min-width: 190px;
  padding: 7px;
  background: var(--p);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.sidebar-context.show {
  display: block;
}

.sidebar-context .context-divider {
  margin: 10px 0;
}

.sidebar-context button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--txt);
  text-align: left;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.sidebar-context button:hover {
  background: var(--p2);
}

.sidebar-context .danger {
  color: #ff8585;
}

main {
  padding: 20px 38px 80px;
  min-width: 0;
  overflow-x: hidden;
}

.site-footer {
  position: fixed;
  left: 220px;
  width: calc(100vw - 220px);
  bottom: 0;
  padding: 24px 38px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--bg);
  z-index: 500;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--txt);
  text-decoration: underline;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.topright {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 30px;
}

.search-wrap {
  position: relative;
  width: 340px;
  max-width: 42vw;
}

.search {
  width: 100%;
  padding: 12px 36px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--p);
  color: var(--txt);
  outline: 0;
  transition: border-color 0.15s;
}

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

.search:focus {
  border-color: var(--line-hover);
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: none;
  padding: 0;
}

.search-wrap.has-query .search-clear {
  display: block;
}

.search-clear:hover {
  color: var(--txt);
  background: var(--p2);
}

.clock {
  flex: 0 0 auto;
  padding: 0 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
  cursor: default;
  line-height: 1.2;
  position: relative;
  top: -2px;
}

.clock.large {
  font-size: 24px;
}

.clock-time,
.clock-date {
  display: inline;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  margin: 0;
}

.clock-date::after {
  content: " · ";
}

.clock.hidden {
  display: none;
}

.gear {
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--p);
  color: var(--txt);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.gear svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

.gear:hover {
  border-color: var(--line-hover);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 20px;
}

.card {
  width: calc(var(--card-h) * var(--card-scale));
  height: calc(var(--card-h) * var(--card-scale));
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--p2), var(--p));
  color: var(--txt);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--card-gap);
  transition: 0.15s;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-hover);
}

.card.card-faded {
  opacity: 0.28;
  filter: saturate(0.4);
}

.card.card-faded:hover {
  opacity: 0.55;
  filter: saturate(0.7);
}

.icon {
  width: calc(var(--icon) * var(--card-scale));
  height: calc(var(--icon) * var(--card-scale));
  flex-shrink: 0;
  border-radius: 14px;
  background: #202c3c;
  display: grid;
  place-items: center;
  color: var(--a);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-weight: 900;
  font-size: calc(var(--icon) * 0.6);
  line-height: 1;
}

.icon.initials-white {
  color: #ffffff;
}

.icon.initials-black {
  color: #000000;
}

.icon.initials-terracotta {
  color: #c9795f;
}

.icon.initials-light-mustard {
  color: #d0ae52;
}

.icon.initials-sage-green {
  color: #88a86f;
}

.icon.initials-dusty-blue {
  color: #6f97c1;
}

.icon.initials-soft-plum {
  color: #9270a8;
}

.icon img {
  width: calc(var(--img) * var(--card-scale));
  height: calc(var(--img) * var(--card-scale));
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.card > div:last-child {
  width: 100%;
  min-width: 0;
}

.name {
  font-weight: 800;
  font-size: calc(var(--name-size) * var(--card-scale));
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.empty {
  display: none;
  color: var(--muted);
  padding: 30px 0;
}

.context-menu {
  position: fixed;
  z-index: 1000;
  display: none;
  min-width: 210px;
  padding: 10px;
  background: var(--p);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.context-menu.show {
  display: block;
}

.context-title {
  font-weight: 800;
  padding: 4px 5px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-menu .context-title-input {
  height: 35px;
  padding: 9px 10px;
  margin-bottom: 7px;
}

.context-menu label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 5px;
}

.context-menu .dropdown {
  margin-bottom: 7px;
}

.context-menu select,
.context-menu input,
.context-menu button,
.context-menu .dropdown,
.settings select,
.settings input,
.settings button {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  margin-bottom: 7px;
}

.context-menu button,
.settings button {
  cursor: pointer;
}

.context-menu .delete,
.danger {
  color: #ff8585;
}

.context-icon-option {
  display: grid;
  grid-template-columns: 18px 58px 1fr;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  height: 44px;
  padding: 0 5px;
}

.context-menu .context-icon-option > input[type="radio"] {
  cursor: pointer;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--a);
}

.context-menu .context-icon-option > label {
  cursor: pointer;
  padding: 0;
  color: var(--txt);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.context-menu .context-icon-option > input:not([type="radio"]) {
  width: 100%;
  margin: 0;
  padding: 7px 8px;
}

.initials-color-control {
  margin-top: 7px;
}

.initials-color-dots {
  display: flex;
  gap: 8px;
  padding: 4px 5px 2px;
}

.context-menu .initials-color-dot {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.context-menu .initials-color-dot.selected {
  border-color: #e8eef6;
  box-shadow: 0 0 0 2px #111925, 0 0 0 3px #e8eef6;
}

.initials-color-control.disabled {
  opacity: 0.35;
}

.initials-color-control.disabled .initials-color-dot {
  cursor: default;
}

.initials-color-dot.initials-white {
  color: #ffffff;
}

.initials-color-dot.initials-terracotta {
  color: #c9795f;
}

.initials-color-dot.initials-black {
  color: #000000;
}

.initials-color-dot.initials-light-mustard {
  color: #d0ae52;
}

.initials-color-dot.initials-sage-green {
  color: #88a86f;
}

.initials-color-dot.initials-dusty-blue {
  color: #6f97c1;
}

.initials-color-dot.initials-soft-plum {
  color: #9270a8;
}

.context-divider {
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.context-divider-icon {
  margin-bottom: 10px;
}

.context-menu .delete {
  margin-top: 0 !important;
}

.drop-ready {
  outline: 2px dashed var(--a);
  outline-offset: -10px;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.58);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.show {
  display: flex;
}

.settings,
.login-dialog {
  background: var(--p);
  border: 1px solid var(--line-strong);
  padding: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
}

.settings {
  width: min(500px, 100%);
  overflow: visible;
  border-radius: 16px;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings h2 {
  margin: 0;
}

.settings-divider {
  border-top: 1px solid var(--line);
  margin: 15px 0;
}

.settings-group-title {
  margin: 0 0 8px;
  padding: 0 5px;
  color: var(--txt);
  font-size: 13px;
  font-weight: 400;
}

#settingsDashTitle {
  font-weight: 500;
}

.settings-section + .settings-section {
  margin-top: 15px;
}

.settings-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.settings-fields-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.setting-label {
  display: block;
  margin: 0;
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.settings-hint {
  margin-top: 6px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.close {
  width: auto !important;
  margin: 0 !important;
  font-size: 18px;
  padding: 6px 10px !important;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  cursor: pointer;
  transition: none !important;
}

.close:hover,
.close:focus-visible {
  border-color: var(--line-hover);
  outline: 0;
}

.card:active {
  cursor: grabbing !important;
}

html.dragging-now,
html.dragging-now *,
body.dragging-now,
body.dragging-now * {
  cursor: grabbing !important;
}

.dragging-live {
  cursor: grabbing !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45) !important;
  opacity: 0.96 !important;
}

.card-placeholder {
  border: 1px dashed #3a4d65 !important;
  background: rgba(255, 255, 255, 0.025) !important;
  border-radius: 15px;
  flex: 0 0 auto;
}

.drag-placeholder {
  pointer-events: none;
}

@media (max-width: 700px) {
  :root {
    --card-scale: 0.82;
  }

  .app {
    grid-template-columns: 1fr;
  }

  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px;
    min-height: 0;
  }

  .nav {
    display: flex;
    overflow: auto;
    gap: 5px;
  }

  .nav button {
    width: auto;
    white-space: nowrap;
  }

  .sub {
    margin-bottom: 14px;
  }

  .account-area {
    margin-top: 16px;
    padding-top: 0;
  }

  main {
    padding: 24px 20px;
  }

  .top {
    flex-direction: column;
    align-items: stretch;
  }

  .topright {
    width: 100%;
  }

  .search-wrap {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }

  .clock {
    text-align: left;
    padding: 0 10px 0 0;
  }

  .gear {
    flex: 0 0 43px;
  }
}

.dialog {
  width: min(420px, 100%);
  background: var(--p);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
}

.dialog h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.dialog-message {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 16px;
  white-space: pre-line;
}

.dialog-input-wrap {
  margin-bottom: 16px;
}

.dialog input {
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  outline: 0;
}

.dialog input:focus {
  border-color: var(--line-hover);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.dialog-actions button {
  min-width: 92px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  cursor: pointer;
}

.dialog-actions button:hover {
  border-color: var(--line-hover);
}

.dialog-actions .danger-button {
  color: #ff8585;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-btn {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 30px 0 10px !important;
  margin: 0 !important;
  text-align: left;
  position: relative;
  line-height: normal;
}

.dropdown-btn:after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--muted);
  pointer-events: none;
}

.dropdown-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  z-index: 1300;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow: auto;
}

.dropdown.open .dropdown-list {
  display: block;
}

.dropdown.drop-up .dropdown-list {
  top: auto;
  bottom: calc(100% + 3px);
}

.dropdown-option {
  display: block;
  width: 100%;
  border: 0 !important;
  margin: 0 !important;
  padding: 8px 9px !important;
  background: transparent !important;
  color: var(--txt) !important;
  text-align: left;
  border-radius: 6px !important;
  cursor: pointer;
}

.dropdown-option:hover,
.dropdown-option.selected {
  background: var(--p2) !important;
}

/* Account controls */

.account-area {
  margin-top: auto;
  padding-top: 18px;
}

.login-button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--txt);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

/* Same look as the Log in / Log out button, as a link. */
.account-link {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  text-decoration: none;
}

.login-button:hover {
  background: var(--p2);
  border-color: var(--line-hover);
}

.login-dialog {
  width: min(420px, 100%);
  border-radius: 16px;
}

/* The form only groups the fields; it adds no layout of its own. */
.login-form {
  display: contents;
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.login-head h2 {
  margin: 0;
}

.login-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-dialog input {
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  outline: 0;
}

.login-dialog input:focus {
  border-color: var(--line-hover);
}

.login-submit {
  width: 100%;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  font-weight: 700;
  cursor: pointer;
}

.login-submit:hover {
  border-color: var(--line-hover);
}

.login-link {
  border: 0;
  background: transparent;
  color: var(--a);
  padding: 0;
  margin-top: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.login-link.inline {
  margin: 0;
}

.login-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.login-signup {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Standalone pages */

.page-shell {
  width: min(920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 28px 40px;
  overflow-x: visible;
}

.page-back {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.page-back:hover {
  color: var(--txt);
  text-decoration: underline;
}

.page-brand {
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
}

.page-brand span {
  color: var(--a);
}

.page-content {
  line-height: 1.65;
}

.page-content h1 {
  margin: 0 0 10px;
  font-size: 30px;
}

.page-content h2 {
  margin: 30px 0 8px;
  font-size: 19px;
}

.page-content p,
.page-content li {
  color: var(--muted);
}

.page-content a {
  color: var(--a);
}

.page-lead {
  margin: 0 0 26px;
  color: var(--txt) !important;
  font-size: 17px;
}

.page-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  .page-shell {
    padding: 24px 20px 32px;
  }
}

/* Signup */

.signup-content {
  width: min(460px, 100%);
  margin: 50px auto 0;
  padding: 28px;
  background: var(--p);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.signup-content h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.signup-content .page-lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.signup-form {
  margin: 0;
}

.signup-field {
  margin-bottom: 14px;
}

.signup-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.signup-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--txt);
  font: inherit;
  outline: 0;
}

.signup-field input:focus {
  border-color: var(--line-hover);
}

.signup-submit {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--txt);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.signup-submit:hover {
  border-color: var(--line-hover);
}

.signup-terms {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.signup-terms a,
.signup-login a {
  color: var(--a);
  text-decoration: none;
}

.signup-terms a:hover,
.signup-login a:hover {
  text-decoration: underline;
}

.signup-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.signup-login {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.signup-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Upgrade page */

.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.billing-toggle button {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.billing-toggle button.selected {
  border-color: #00cfff;
  color: #00cfff;
  box-shadow: 0 0 0 1px #00cfff;
}

.annual-regular-price {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 400;
  text-decoration: line-through;
}

.billing-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.9em;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.15s ease;
}

.plan-card:hover {
  border-color: #00cfff;
  box-shadow: 0 0 0 1px #00cfff;
}

.plan-action {
  display: inline-block;
  margin-top: auto;
  padding: 10px 16px;
  border: 1px solid #00cfff;
  border-radius: 8px;
  color: #00cfff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.plan-action:hover {
  background: #00cfff;
  color: #0c121b;
}

.plan-action.current-plan {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
  opacity: 0.65;
}

.plan-action.current-plan:hover {
  background: transparent;
  color: var(--muted);
}

.plan-card h2 {
  margin-top: 0;
}

.plan-card ul {
  flex: 1;
}

@media (max-width: 700px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

/* Ad column (Guest and LITE only) */

.ad-rail {
  display: none;
}

body.has-ads .app {
  grid-template-columns: 220px minmax(0, 1fr) 200px;
}

body.has-ads .ad-rail {
  display: block;
  padding: 28px 20px 0 0;
}

.ad-unit {
  display: block;
  position: sticky;
  top: 28px;
  width: 160px;
  height: 600px;
}

body.has-ads .site-footer {
  width: calc(100vw - 220px - 200px);
}

/* Not enough room for a side ad: hide it rather than squeeze the cards. */
@media (max-width: 1000px) {
  body.has-ads .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  body.has-ads .ad-rail {
    display: none;
  }

  body.has-ads .site-footer {
    width: calc(100vw - 220px);
  }
}

@media (max-width: 700px) {
  body.has-ads .app {
    grid-template-columns: 1fr;
  }
}
