Files
toolbox-portal/src/styles.css

1043 lines
18 KiB
CSS

:root {
color-scheme: light dark;
font-family: Inter, Avenir, 'Segoe UI', ui-sans-serif, system-ui, sans-serif;
font-synthesis: none;
text-rendering: optimizeLegibility;
--bg: #f6f7fb;
--surface: #ffffff;
--surface-soft: #eff2f8;
--text: #17203b;
--muted: #667085;
--line: #dfe3ec;
--brand: #28366d;
--brand-hover: #1c2858;
--brand-soft: #e9edff;
--accent: #78d8ca;
--danger: #a63243;
--shadow: 0 16px 44px rgba(24, 34, 68, 0.08);
}
:root[data-theme='light'] {
color-scheme: light;
}
:root[data-theme='dark'] {
color-scheme: dark;
--bg: #0f1422;
--surface: #171d2d;
--surface-soft: #20283a;
--text: #edf1fb;
--muted: #a9b3ca;
--line: #303a50;
--brand: #a9b7ff;
--brand-hover: #c3ccff;
--brand-soft: #252f55;
--accent: #66cdbd;
--danger: #ff9dac;
--shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
@media (prefers-color-scheme: dark) {
:root[data-theme='system'] {
color-scheme: dark;
--bg: #0f1422;
--surface: #171d2d;
--surface-soft: #20283a;
--text: #edf1fb;
--muted: #a9b3ca;
--line: #303a50;
--brand: #a9b7ff;
--brand-hover: #c3ccff;
--brand-soft: #252f55;
--accent: #66cdbd;
--danger: #ff9dac;
--shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
}
* {
box-sizing: border-box;
}
html {
background: var(--bg);
scroll-behavior: smooth;
}
body {
margin: 0;
min-width: 320px;
min-height: 100vh;
background:
radial-gradient(
circle at 8% 4%,
color-mix(in srgb, var(--accent) 13%, transparent) 0,
transparent 28rem
),
var(--bg);
color: var(--text);
}
button,
input,
select {
color: inherit;
font: inherit;
}
button,
a,
input,
select {
-webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
outline: 3px solid color-mix(in srgb, var(--accent) 70%, var(--brand));
outline-offset: 3px;
}
.site-shell {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.skip-link {
position: fixed;
z-index: 100;
top: 0.75rem;
left: 0.75rem;
padding: 0.7rem 1rem;
border-radius: 0.55rem;
background: var(--surface);
color: var(--text);
transform: translateY(-160%);
}
.skip-link:focus {
transform: translateY(0);
}
main,
.site-footer {
width: min(100%, 90rem);
margin-inline: auto;
padding-inline: 1rem;
}
.state-card button,
.preferences-actions button {
border: 1px solid var(--line);
border-radius: 0.65rem;
background: var(--surface);
cursor: pointer;
font-weight: 600;
}
.state-card button:hover,
.preferences-actions button:hover {
border-color: var(--brand);
color: var(--brand);
}
main {
flex: 1;
}
.hero {
display: grid;
grid-template-columns: 1fr;
align-items: end;
gap: clamp(2rem, 6vw, 5rem);
padding: clamp(3.5rem, 7vw, 6.8rem) 0 clamp(2.5rem, 5vw, 4.2rem);
}
.hero-intro {
max-width: 100%;
}
.eyebrow {
margin: 0 0 1rem;
color: var(--brand);
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.hero h2 {
margin: 0;
font-family: Inter, Avenir, 'Segoe UI', ui-sans-serif, sans-serif;
font-size: clamp(2.65rem, 7vw, 5.65rem);
line-height: 0.98;
letter-spacing: -0.065em;
}
.hero h2 span {
color: var(--brand);
}
.hero-copy {
max-width: 575px;
margin: 1.75rem 0 0;
color: var(--muted);
font-size: clamp(1rem, 2vw, 1.18rem);
line-height: 1.7;
}
.tool-controls {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(8.75rem, 10.5rem);
align-items: center;
gap: 0.75rem;
}
.search-field,
.category-field {
display: flex;
min-height: 46px;
align-items: center;
border: 1px solid var(--line);
border-radius: 0.75rem;
background: var(--surface);
}
.search-field {
min-width: 0;
padding: 0 0.85rem;
gap: 0.55rem;
}
.search-field > span {
color: var(--muted);
font-size: 1.35rem;
}
.search-field input,
.category-field select {
width: 100%;
border: 0;
outline: 0;
background: transparent;
}
.search-field input::placeholder {
color: var(--muted);
}
.category-field {
min-width: 0;
padding: 0 0.65rem;
}
.category-field select {
cursor: pointer;
}
.hidden-toggle {
grid-column: 2;
display: flex;
align-items: center;
justify-self: end;
gap: 0.45rem;
color: var(--muted);
cursor: pointer;
font-size: 0.88rem;
}
.hidden-toggle--disabled {
cursor: default;
opacity: 0.58;
}
.hidden-toggle input {
width: 1.05rem;
height: 1.05rem;
accent-color: var(--brand);
}
.active-filter {
grid-column: 1;
justify-self: start;
padding: 0.4rem 0.65rem;
border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
border-radius: 999px;
background: var(--brand-soft);
color: var(--brand);
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
}
.app-sections {
display: grid;
gap: 2.4rem;
}
.app-section__header {
display: flex;
align-items: baseline;
gap: 0.65rem;
margin-bottom: 0.85rem;
}
.app-section__header h2 {
margin: 0;
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
font-size: 1.25rem;
letter-spacing: -0.025em;
}
.app-section__header span {
min-width: 1.55rem;
padding: 0.16rem 0.4rem;
border-radius: 999px;
background: var(--surface-soft);
color: var(--muted);
font-size: 0.72rem;
font-weight: 700;
text-align: center;
}
.app-grid {
display: grid;
grid-template-columns: repeat(
auto-fill,
minmax(min(10.5rem, 100%), 11.75rem)
);
align-items: start;
justify-content: start;
gap: 0.9rem;
}
.app-card {
position: relative;
aspect-ratio: 1;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
overflow: hidden;
padding: 1rem 0.85rem 0.75rem;
border: 1px solid var(--line);
border-radius: 1rem;
background: var(--surface);
box-shadow: var(--shadow);
transition:
border-color 180ms ease,
box-shadow 180ms ease;
}
.app-card--dragging {
z-index: 5;
opacity: 0.82;
box-shadow: 0 24px 65px rgba(24, 34, 68, 0.22);
}
.app-card:hover {
border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
box-shadow: 0 20px 54px rgba(24, 34, 68, 0.13);
}
.app-card--hidden {
border-style: dashed;
background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}
.app-card__face {
min-height: 0;
display: grid;
flex: 1;
align-content: center;
justify-items: center;
padding: 0.2rem 0.25rem 0;
text-align: center;
}
.app-card__icon {
width: 3.6rem;
height: 3.6rem;
display: grid;
place-items: center;
overflow: hidden;
border-radius: 0.9rem;
background: var(--brand-soft);
color: var(--brand);
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
font-size: 1.35rem;
font-weight: 700;
}
.app-card__icon img {
width: 100%;
height: 100%;
object-fit: contain;
}
.app-card__face h3 {
margin: 0.7rem 0 0;
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
font-size: 1.05rem;
letter-spacing: -0.025em;
}
.app-card__face p {
display: -webkit-box;
margin: 0.35rem 0 0;
overflow: hidden;
color: var(--muted);
font-size: 0.72rem;
line-height: 1.35;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.drag-handle {
position: absolute;
z-index: 2;
top: 50%;
left: 0.35rem;
width: 1rem;
height: 5rem;
display: grid;
place-items: center;
padding: 0;
border: 1px solid var(--line);
border-radius: 0.55rem;
background: var(--surface);
color: var(--muted);
opacity: 0;
cursor: grab;
pointer-events: none;
touch-action: none;
transform: translate(-0.2rem, -50%);
transition:
opacity 150ms ease,
color 150ms ease,
transform 150ms ease;
}
.app-card:hover .drag-handle,
.app-card:focus-within .drag-handle,
.drag-handle:focus-visible {
opacity: 1;
pointer-events: auto;
transform: translate(0, -50%);
}
.drag-handle:hover {
color: var(--brand);
}
.drag-handle:active {
cursor: grabbing;
}
.drag-handle svg {
width: calc(1rem - 2px);
height: 4rem;
fill: currentColor;
}
.app-card__actions {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
pointer-events: none;
}
.icon-button,
.close-button {
width: 2.15rem;
height: 2.15rem;
display: grid;
place-items: center;
padding: 0;
border: 1px solid var(--line);
border-radius: 50%;
background: var(--surface-soft);
color: var(--muted);
cursor: pointer;
}
.app-card__actions .icon-button {
pointer-events: auto;
}
.icon-button:hover:not(:disabled),
.icon-button.is-active {
border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
background: var(--brand-soft);
color: var(--brand);
}
.icon-button svg {
width: 1.05rem;
height: 1.05rem;
fill: none;
stroke: currentColor;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.7;
}
.pin-button svg {
transform: rotate(0);
transition: transform 180ms ease;
}
.pin-button.is-active svg {
transform: rotate(45deg);
}
.icon-button:disabled {
cursor: not-allowed;
opacity: 0.28;
}
.title-line {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.45rem;
}
.title-line h2 {
margin: 0;
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
font-size: 1.35rem;
letter-spacing: -0.025em;
}
.app-card__launch-link {
color: var(--text);
text-decoration: none;
}
.app-card__launch-link::after {
position: absolute;
z-index: 1;
inset: 0;
content: '';
}
.app-card__launch-link:focus-visible {
outline: none;
}
.app-card:has(.app-card__launch-link:focus-visible) {
outline: 3px solid color-mix(in srgb, var(--accent) 70%, var(--brand));
outline-offset: 3px;
}
.status-chip,
.tag-row button,
.category-row button {
position: relative;
z-index: 2;
border-radius: 999px;
background: var(--brand-soft);
color: var(--brand);
font-size: 0.68rem;
font-weight: 700;
}
.status-chip {
padding: 0.22rem 0.48rem;
text-transform: uppercase;
pointer-events: none;
}
.status-chip--muted {
background: var(--surface-soft);
color: var(--muted);
}
.tag-row,
.category-row {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-top: 1rem;
}
.tag-row button,
.category-row button {
padding: 0.28rem 0.52rem;
border: 0;
background: var(--surface-soft);
color: var(--muted);
font: inherit;
cursor: pointer;
}
.category-row {
margin-top: 1rem;
}
.tag-row {
margin-top: 0.55rem;
}
.tag-row button:hover,
.category-row button:hover,
.tag-row button[aria-pressed='true'] {
background: var(--brand-soft);
color: var(--brand);
}
.version {
color: var(--muted);
font-size: 0.78rem;
}
.source-link,
.site-footer a {
position: relative;
z-index: 2;
color: var(--brand);
}
.state-card {
max-width: 600px;
margin: 0 auto 5rem;
padding: 3rem 2rem;
border: 1px solid var(--line);
border-radius: 1.2rem;
background: var(--surface);
text-align: center;
box-shadow: var(--shadow);
}
.state-card h2 {
margin: 0.8rem 0 0.35rem;
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
}
.state-card p {
margin: 0;
color: var(--muted);
line-height: 1.55;
}
.state-card button {
margin-top: 1.25rem;
padding: 0.7rem 1rem;
}
.state-icon {
width: 46px;
height: 46px;
display: inline-grid;
place-items: center;
border-radius: 50%;
background: var(--brand-soft);
color: var(--brand);
font-size: 1.25rem;
font-weight: 700;
}
.state-card--error .state-icon {
background: color-mix(in srgb, var(--danger) 12%, transparent);
color: var(--danger);
}
.loader {
width: 38px;
height: 38px;
margin: 0 auto;
border: 3px solid var(--line);
border-top-color: var(--brand);
border-radius: 50%;
animation: spin 700ms linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.manifest-errors {
margin: 1.5rem 0 4rem;
padding: 1rem 1.2rem;
border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
border-radius: 0.8rem;
background: color-mix(in srgb, var(--danger) 5%, var(--surface));
color: var(--muted);
}
.manifest-errors summary {
cursor: pointer;
color: var(--text);
font-weight: 600;
}
.manifest-errors li + li {
margin-top: 0.5rem;
}
.site-footer {
min-height: 110px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-top: 5rem;
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 0.8rem;
}
.site-footer p {
display: flex;
align-items: center;
gap: 0.5rem;
}
.dialog-backdrop {
position: fixed;
z-index: 50;
inset: 0;
display: grid;
place-items: center;
overflow-y: auto;
padding: 1rem;
background: rgba(5, 9, 22, 0.56);
backdrop-filter: blur(5px);
}
.help-panel,
.app-info-panel {
max-height: calc(100vh - 2rem);
max-height: calc(100dvh - 2rem);
overflow: auto;
padding: 1.5rem;
border: 1px solid var(--line);
border-radius: 1.2rem;
background: var(--surface);
box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}
.help-panel {
width: min(560px, 100%);
}
.app-info-panel {
position: relative;
width: min(680px, 100%);
}
.help-panel > header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
}
.help-panel h2 {
margin: 0;
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
letter-spacing: -0.025em;
}
.app-info-panel__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
}
.app-info-panel__identity {
min-width: 0;
display: flex;
align-items: center;
gap: 1rem;
}
.app-info-panel__icon {
width: 4rem;
height: 4rem;
display: grid;
flex: 0 0 auto;
place-items: center;
overflow: hidden;
border-radius: 1rem;
background: var(--brand-soft);
color: var(--brand);
font-size: 1.45rem;
font-weight: 700;
}
.app-info-panel__icon img {
width: 100%;
height: 100%;
object-fit: contain;
}
.app-info-panel .eyebrow {
margin-bottom: 0.4rem;
}
.app-info-panel__body {
margin-top: 1.35rem;
padding: 1.1rem;
border: 1px solid var(--line);
border-radius: 0.85rem;
background: var(--surface);
}
.app-info-panel__description {
margin: 0;
color: var(--muted);
font-size: 1rem;
line-height: 1.6;
}
.app-info-panel__body .privacy-summary {
margin: 1rem 0 0;
color: var(--text);
font-size: 0.8rem;
font-weight: 650;
line-height: 1.5;
}
.app-info-panel__body .requirements {
margin: 0.55rem 0 0;
color: var(--muted);
font-size: 0.76rem;
line-height: 1.5;
}
.app-info-panel__footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-top: 1.25rem;
}
.app-info-panel__meta {
display: grid;
gap: 0.25rem;
}
.app-info-panel__launch {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
padding: 0.7rem 0.9rem;
border-radius: 0.7rem;
background: var(--brand);
color: var(--surface) !important;
font-size: 0.85rem;
font-weight: 700;
}
.app-info-panel__launch:hover {
background: var(--brand-hover);
text-decoration: none;
}
.help-panel .eyebrow {
margin-bottom: 0.5rem;
}
.help-steps {
display: grid;
gap: 0.85rem;
margin-top: 1.4rem;
}
.help-steps p {
margin: 0;
padding: 0.9rem 1rem;
border: 1px solid var(--line);
border-radius: 0.75rem;
background: var(--surface-soft);
color: var(--muted);
font-size: 0.9rem;
line-height: 1.55;
}
.help-steps strong {
color: var(--text);
}
.close-button {
flex: 0 0 auto;
background: var(--surface-soft);
color: var(--text);
font-size: 1.3rem;
}
.preference-summary {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.6rem;
}
.preference-summary > div {
display: grid;
gap: 0.2rem;
padding: 0.65rem;
border: 1px solid var(--line);
border-radius: 0.7rem;
text-align: center;
}
.preference-summary strong {
font-family: Inter, Avenir, 'Segoe UI', sans-serif;
font-size: 1.05rem;
}
.preference-summary span,
.preferences-copy,
.action-message {
color: var(--muted);
font-size: 0.8rem;
}
.portal-header .preferences-copy {
margin: 0.9rem 0;
padding: 0;
color: var(--toolbox-muted, var(--muted));
font-size: 0.78rem;
line-height: 1.55;
}
.preferences-actions {
display: flex;
flex-wrap: wrap;
gap: 0.55rem;
}
.preferences-actions button {
padding: 0.52rem 0.68rem;
}
.preferences-actions .danger-button {
margin-left: auto;
color: var(--danger);
}
.portal-header .action-message {
min-height: 1.2em;
margin: 0.8rem 0 0;
padding: 0;
color: var(--toolbox-muted, var(--muted));
font-size: 0.78rem;
}
.visually-hidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
@media (max-width: 700px) {
main,
.site-footer {
width: min(100%, 90rem);
padding-inline: 0.7rem;
}
.hero {
grid-template-columns: 1fr;
padding-top: 3.8rem;
}
.tool-controls {
width: 100%;
}
.search-field,
.category-field {
width: 100%;
}
.hidden-toggle {
margin: 0.25rem 0;
}
.site-footer {
min-height: 130px;
align-items: flex-start;
flex-direction: column;
justify-content: center;
}
}
@media (max-width: 520px) {
.tool-controls {
grid-template-columns: 1fr;
}
.search-field,
.category-field,
.active-filter,
.hidden-toggle {
grid-column: 1;
}
.hidden-toggle {
justify-self: start;
}
.app-info-panel__header,
.app-info-panel__footer {
align-items: flex-start;
flex-direction: column;
}
.app-info-panel__header .close-button {
position: absolute;
top: 1.1rem;
right: 1.1rem;
}
.app-info-panel__identity {
padding-right: 2.5rem;
}
}
@media (min-width: 701px) and (max-width: 960px) {
.hero {
grid-template-columns: 1fr;
}
}
@media (hover: none) {
.drag-handle {
opacity: 1;
pointer-events: auto;
transform: translate(0, -50%);
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}