carprint / web /src /styles /base.css
Azamaka's picture
CarPrint: API + site, T4 image
b2d14a6 verified
Raw History Blame Contribute Delete
4.97 kB
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
margin: 0;
background: var(--paper);
color: var(--text);
font-family: var(--font-sans);
font-size: var(--fs-body);
line-height: 1.55;
font-feature-settings: "tnum" 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
img,
video,
svg {
display: block;
max-width: 100%;
}
h1,
h2,
h3,
h4,
p,
figure,
ol,
ul {
margin: 0;
}
ol,
ul {
padding: 0;
list-style: none;
}
a {
color: var(--signal-text);
}
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
}
:focus-visible {
outline: 2px solid var(--signal);
outline-offset: 3px;
}
.mono {
font-family: var(--font-mono);
}
.label {
font-family: var(--font-mono);
font-size: var(--fs-label);
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--muted);
}
.on-ink .label {
color: var(--ink-faint);
}
.wrap {
max-width: var(--max);
margin: 0 auto;
padding-left: var(--gutter);
padding-right: var(--gutter);
}
.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.skip-link {
position: absolute;
left: 16px;
top: -60px;
z-index: 100;
padding: 10px 14px;
background: var(--signal);
color: var(--ink);
font-weight: 600;
text-decoration: none;
}
.skip-link:focus {
top: 16px;
}
/* ---------- buttons ---------- */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 12px;
height: 52px;
padding: 0 24px;
border-radius: var(--radius);
border: 1px solid transparent;
font-weight: 600;
font-size: 16px;
text-decoration: none;
white-space: nowrap;
transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn svg {
transition: transform var(--t-mid) var(--ease);
}
.btn:hover svg.arrow {
transform: translateX(4px);
}
.btn:active {
transform: translateY(1px);
}
.btn--signal {
background: var(--signal);
color: var(--ink);
}
.btn--signal:hover {
background: #ff7240;
}
.btn--ink {
background: var(--text);
color: var(--paper);
}
.btn--ink:hover {
background: #2a2c30;
}
.btn--line {
border-color: #c9c7c0;
color: var(--text);
background: transparent;
font-weight: 500;
}
.btn--line:hover {
border-color: var(--text);
}
.on-ink .btn--line {
border-color: rgba(242, 241, 237, 0.4);
color: var(--ink-text);
}
.on-ink .btn--line:hover {
border-color: var(--ink-text);
}
.btn--small {
height: 40px;
padding: 0 16px;
font-size: 14px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
opacity: 0.45;
pointer-events: none;
}
/* ---------- chips ---------- */
.chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
font-family: var(--font-mono);
font-size: 12px;
border: 1px solid currentColor;
border-radius: var(--radius);
line-height: 1.2;
white-space: nowrap;
}
.chip--same {
color: var(--same);
}
.chip--review {
color: var(--review-text);
}
.chip--different {
color: var(--different-text);
}
.on-ink .chip--same {
color: var(--same-on-ink);
}
.on-ink .chip--review {
color: var(--review-on-ink);
}
.on-ink .chip--different {
color: var(--different-on-ink);
}
.chip--new {
background: var(--signal);
border-color: var(--signal);
color: var(--ink);
}
.chip--old {
color: var(--text);
}
.chip--absent {
color: var(--muted);
border-style: dotted;
}
.chip--unknown {
color: var(--muted);
border-style: dashed;
}
/* ---------- section scaffolding ---------- */
.section {
padding: var(--s-10) 0 var(--s-9);
}
.section--sheet {
background: var(--sheet);
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
}
.section--ink {
background: var(--ink);
color: var(--ink-text);
}
.section-head {
display: flex;
align-items: center;
gap: 16px;
}
.section-head__rule {
flex: 0 0 40px;
height: 1px;
background: currentColor;
opacity: 0.9;
}
.h2 {
font-size: var(--fs-h2);
line-height: 1.04;
letter-spacing: -0.03em;
font-weight: 600;
text-wrap: balance;
}
.h3 {
font-size: var(--fs-h3);
line-height: 1.25;
letter-spacing: -0.015em;
font-weight: 600;
}
.lead {
font-size: var(--fs-lead);
line-height: 1.6;
color: var(--text-2);
}
.on-ink .lead {
color: var(--ink-muted);
}
.source {
font-family: var(--font-mono);
font-size: 11px;
color: var(--faint);
}
.on-ink .source {
color: var(--ink-faint);
}
/* anchors land below the fixed navigation */
section[id],
header[id] {
scroll-margin-top: 76px;
}