* { box-sizing: border-box; }

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 6% -4%, rgba(224, 106, 45, 0.07), transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(15, 143, 138, 0.1), transparent 42%),
    linear-gradient(170deg, var(--bg-1), var(--bg-2) 58%, #f2f0ea 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

::selection {
  background: rgba(15, 143, 138, 0.18);
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 8px 11px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus) {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-sunken);
  color: var(--ink-faint);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2355687a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.tiny {
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.is-hidden {
  display: none !important;
}

/* Slim, unobtrusive scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 104, 122, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(85, 104, 122, 0.3);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 104, 122, 0.5);
}

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