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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scrollbar-color: var(--line-2) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--primary-text);
}

::selection {
  background: var(--primary-deep);
  color: var(--on-primary-soft);
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

a {
  color: var(--primary-text);
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: auto;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code,
kbd,
samp,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
  font-variant-ligatures: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

.text-muted {
  color: var(--text-muted);
}

.text-faint,
.cell-faint {
  color: var(--text-faint);
}

.text-danger {
  color: var(--danger);
}

.text-brass {
  color: var(--brass);
}

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

.skip-link {
  position: absolute;
  left: var(--sp-5);
  top: var(--sp-5);
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow-float);
  transform: translateY(calc(-100% - 80px));
}

.skip-link:focus-visible {
  transform: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.mark {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
}

.wordmark-name {
  font: 600 17px/1 var(--font-display);
  letter-spacing: -0.03em;
}

.mark {
  border-radius: 7px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control);
  padding: 0 13px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--ring);
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), translate 160ms var(--ease-press);
}

.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 1px currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease-press) 100ms;
}

.btn:active {
  translate: 0 1px;
}

.btn:active::after {
  opacity: 0.45;
  transition: none;
}

html[data-world="harbour"] .btn {
  border-radius: var(--r-pill);
  padding: 0 18px;
}

.btn svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  box-shadow: none;
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.btn-primary:active {
  background: var(--primary-press);
}

.btn-danger {
  box-shadow: none;
  background: var(--danger-fill);
  color: #ffffff;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--danger-fill) 85%, #ffffff);
  color: #ffffff;
}

.btn-quiet {
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
}

.btn-quiet:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-small {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}

.btn-large {
  height: var(--control-lg);
  padding: 0 18px;
  font-size: 14px;
}

html[data-world="harbour"] .btn-large {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text);
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  background: none;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-label {
  font: 500 13px/1.2 var(--font-sans);
  color: var(--text);
}

.field-hint {
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
  color: var(--text-faint);
}

.field-error {
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
  color: var(--danger);
}

.input {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font: 400 13.5px/1 var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.input::placeholder {
  color: var(--text-faint);
  opacity: 1;
}

.input:hover {
  border-color: color-mix(in srgb, var(--line-strong) 70%, var(--text));
}

.input:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 38%, transparent);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[readonly] {
  background: var(--surface-1);
  color: var(--text-muted);
}

.input.mono,
.input[type="email"] {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.textarea,
textarea.input {
  height: auto;
  min-height: 96px;
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

select.input {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.notice svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--primary-text);
}

.notice-error {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.notice-error svg {
  color: var(--danger);
}

.notice-success {
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
}

.notice-success svg {
  color: var(--success);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-muted);
  font: 500 11.5px/1 var(--font-sans);
  white-space: nowrap;
  vertical-align: middle;
}

.tag-primary {
  background: var(--primary-tint);
  color: var(--primary-text);
}

.tag-brass {
  background: var(--brass-tint);
  color: var(--brass);
}

.tag-danger {
  background: var(--danger-tint);
  color: var(--danger);
}

.tag-success {
  background: var(--success-tint);
  color: var(--success-text);
}

.tag-mono {
  font-family: var(--font-mono);
  font-size: 11px;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  white-space: nowrap;
}

.state-dot,
.dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.state-off .state-dot,
.dot-off {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--text-faint);
}

.state-off {
  color: var(--text-muted);
}

.state-bad .state-dot,
.dot-bad {
  background: var(--danger);
}

.dot-brass {
  background: var(--brass);
}

.dot-primary {
  background: var(--primary-text);
}

.address-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface-1);
  color: var(--text);
  font: 400 12px/1 var(--font-mono);
  white-space: nowrap;
}

.address-chip > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-chip svg {
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--primary-text);
}

.address-chip-temp svg {
  color: var(--brass);
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--brass-tint);
  color: var(--brass);
  font: 500 11.5px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.countdown svg {
  width: 12px;
  height: 12px;
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--text-muted);
  font: 500 10.5px/1 var(--font-mono);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
