@import url("https://api.fontshare.com/v2/css?f[]=switzer@400,500,600,700&display=swap");
:root {
	color-scheme: light;
	--bg: #f7f7f5;
	--card: #fff;
	--fg: #171717;
	--muted: #888;
	--sec: #555;
	--accent: #ff7043;
	--soft: #fff0eb;
	--hl: #ffe1d6;
	--border: #e7e7e7;
	--danger: #c43d2a;
	--radius: 10px;
	--space: 1rem;
	--font: "Switzer", system-ui, sans-serif;
}
h1 { font-size: 1.6rem !important; }
h2, h3 { margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 0.95rem; margin-bottom: 0.6rem; }
.muted { color: var(--muted); margin: 0; }
.pricing-wrap { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.pricing-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pricing-top .brand { text-decoration: none; color: var(--fg); display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.pricing-hero { text-align: center; padding: 2.5rem 0 1.5rem; display: grid; gap: 0.6rem; justify-items: center; }
.toggle { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-top: 0.6rem; }
.toggle button { border: 0; background: none; padding: 0.35rem 1rem; border-radius: 999px; font: inherit; cursor: pointer; color: var(--sec); }
.toggle button.on { background: var(--soft); color: var(--accent); font-weight: 600; }
.plan-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 800px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.4rem; }
.plan.featured { border-color: var(--accent) !important; box-shadow: 0 6px 24px rgba(255,112,67,.12); }
.plan-price .amt { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; margin-right: 0.2rem; }
.plan-feat { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: grid; gap: 0.5rem; flex: 1; font-size: 0.92rem; }
.plan-feat li { display: flex; gap: 0.5rem; align-items: flex-start; }
.plan-feat svg, .compare svg { color: var(--accent); flex: none; margin-top: 2px; }
.notice { background: var(--soft); border: 1px solid var(--hl); color: var(--fg); margin-top: 1rem; }
.compare { margin-top: 2.5rem; display: grid; gap: 0.8rem; }
.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.compare th, .compare td { padding: 0.7rem 0.9rem; text-align: left; white-space: nowrap; }
.compare td:first-child { white-space: normal; min-width: 180px; }
.app-foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; gap: 1rem; align-items: center; }
.small { font-size: 0.82rem; }
.btn:hover { background: #f45f35; filter: none; }
.btn:active { background: #e95630; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-secondary { background: #fff; }
.btn-secondary:hover { background: var(--soft); }
.btn.sm { padding: 0.3rem 0.6rem; font-size: 0.82rem; }
.card { background: var(--card) !important; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: none; text-align: left; }
.danger { color: var(--danger) !important; }
.between { justify-content: space-between; }
.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 10rem; width: auto; }
.auto { width: auto; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input { background: #fff; }
.app { display: flex; flex-direction: column; min-height: 100vh; }
.side { background: #fff; border-bottom: 1px solid var(--border); padding: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 0.85rem; }
.nav { display: flex; gap: 0.25rem; overflow-x: auto; width: 100%; }
.nav button { display: flex; gap: 0.6rem; align-items: center; background: none; border: 0; padding: 0.5rem 0.7rem; border-radius: 8px;
	font: inherit; font-size: 0.9rem; color: var(--sec); cursor: pointer; white-space: nowrap; }
.nav button:hover { background: #f3f3f1; }
.nav button.on { background: var(--soft); color: var(--accent); font-weight: 500; }
.side-foot { display: flex; gap: 0.75rem; align-items: center; min-width: 0; }
.content { flex: 1; padding: 1.25rem 1rem; max-width: 72rem; width: 100%; margin: 0 auto; }
@media (min-width: 56rem) {
	.app { flex-direction: row; }
	.side { width: 240px; flex: none; flex-direction: column; align-items: stretch; border-bottom: 0; border-right: 1px solid var(--border);
		position: sticky; top: 0; height: 100vh; padding: 1.1rem 0.8rem; }
	.nav { flex-direction: column; margin-top: 1rem; }
	.side-foot { margin-top: auto; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
	.content { padding: 2rem 2.5rem; }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); gap: 1rem; }
.stat span { color: var(--muted); font-size: 0.85rem; display: block; }
.stat b { font-size: 1.8rem; font-weight: 600; letter-spacing: -0.02em; }
.stat:first-child { border-top: 2px solid var(--accent); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid #f0f0ee; font-size: 0.88rem; }
.plain li span { font-size: 0.78rem; flex: none; }
.list-item { background: #fff; }
.click { width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.click:hover { border-color: #f5c3b2; }
.sel { border-color: var(--accent); background: var(--soft); }
.av { width: 40px; height: 40px; border-radius: 10px; background: var(--soft); color: var(--accent); display: grid; place-items: center;
	font-weight: 600; object-fit: cover; flex: none; }
.badge { background: #fafafa; }
.st-Active, .sh-opened, .sh-downloaded { background: var(--soft); color: var(--accent); border-color: var(--hl); }
.sh-revoked, .sh-expired { color: var(--danger); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); column-gap: 1rem; }
.profile-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.profile-head h1 { margin: 0 0 0.3rem; }
.icon-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem; flex: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--border); border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 0.3rem; z-index: 5; min-width: 11rem; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0.5rem 0.7rem; border-radius: 6px; font: inherit; cursor: pointer; }
.menu button:hover { background: #f5f5f3; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.6rem 0.8rem; font: inherit; font-size: 0.9rem;
	color: var(--sec); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 500; }
.dl { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: 0.6rem 1.25rem; margin: 0; }
.dl dt { color: var(--muted); font-size: 0.88rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; margin: 0; line-height: 1.7; }
.overlay { position: fixed; inset: 0; background: rgba(23,23,23,.35); display: grid; place-items: center; padding: 1rem; z-index: 20; }
.dialog { width: 100%; max-width: 32rem; max-height: 90vh; overflow: auto; }
.pick { max-height: 16rem; overflow: auto; }
.title-in { font-size: 1.3rem; font-weight: 600; border: 0; padding-left: 0; }
.doc-body { min-height: 22rem; line-height: 1.7; resize: vertical; }
.doc h3 { margin-bottom: 0.3rem; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em; margin-bottom: 0.6rem; }
.auth-wrap { min-height: 100vh; display: grid; gap: 2rem; padding: 2rem 1rem; max-width: 64rem; margin: 0 auto; align-items: center; }
@media (min-width: 56rem) { .auth-wrap { grid-template-columns: 1.2fr 1fr; } }
.auth-side h1 { font-size: 2.2rem !important; letter-spacing: -0.03em; margin: 1.5rem 0 0.5rem; }
.feat { padding: 0; list-style: none; margin-top: 1.5rem; }
.feat li { padding: 0.4rem 0 0.4rem 1.4rem; position: relative; color: var(--sec); }
.feat li::before { content: ""; position: absolute; left: 0; top: 0.85rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.auth-card { padding: 1.75rem; }
.auth-card .field { margin: 0; }
.share-wrap { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1rem; }
.share-wrap h1 { margin: 0; }

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.shell {
	max-width: 42rem;
	margin: 0 auto;
	padding: calc(var(--space) * 3) var(--space);
}

h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	letter-spacing: -0.02em;
}

.lede {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.hint {
	margin: 0;
	color: var(--muted);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.btn:hover {
	filter: brightness(1.05);
}

.btn-secondary {
	background: transparent;
	color: var(--fg);
	border-color: var(--border);
}

.card {
	padding: var(--space);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
}

.input,
.select,
.textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}

.field {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.35rem;
	margin-bottom: var(--space);
}

.field > label {
	font-size: 0.875rem;
	color: var(--muted);
}

/*
 * 390px-safe, like .grid below. A grid with no column list gets one implicit
 * auto column, and an auto column is never narrower than its widest item's
 * min-content width. One nowrap scrolling strip (days, time slots) anywhere
 * inside an item therefore widened the whole column past the screen: the page
 * scrolled sideways instead of the strip scrolling on its own. minmax(0, 1fr)
 * caps the column at the container; the min-width rule keeps a child from
 * bringing the same floor back if an app redefines the columns. :where() adds
 * no specificity, so a min-width the app sets on a child still wins.
 */
.stack {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space);
}

:where(.field, .stack, .list) > * {
	min-width: 0;
}

.row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/*
 * 390px-safe. An unclamped minmax track overflows a 390px viewport once the
 * shell padding is subtracted, and nothing in the pipeline ever looked at a
 * phone-width layout, so every generated app inherited the horizontal scroll.
 * min() clamps the track to the container instead.
 */
.grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th,
.table td {
	padding: 0.6rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.table th {
	font-size: 0.8125rem;
	color: var(--muted);
	font-weight: 600;
}

.empty {
	padding: calc(var(--space) * 2);
	text-align: center;
	color: var(--muted);
}

.empty-title {
	margin: 0 0 0.25rem;
	color: var(--fg);
	font-weight: 600;
}

/* Loading. Every fetch has one; without a primitive each app invented its own. */
.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: calc(var(--space) * 1.5);
	color: var(--muted);
}

.spinner {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: fab-spin 0.7s linear infinite;
}

@keyframes fab-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Placeholder for content whose shape is known before its data arrives. */
.skeleton {
	display: block;
	height: 1rem;
	border-radius: calc(var(--radius) / 2);
	background: linear-gradient(90deg, var(--border), transparent, var(--border));
	background-size: 200% 100%;
	animation: fab-shimmer 1.2s linear infinite;
}

@keyframes fab-shimmer {
	to {
		background-position: -200% 0;
	}
}

/* Error strip: a failure the user can see and retry, never a silent no-op. */
.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-left: 3px solid var(--muted);
	border-radius: var(--radius);
}

.alert-error {
	border-left-color: var(--danger);
	color: var(--danger);
}

.badge {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.8125rem;
	color: var(--muted);
}

/*
 * The scaffold had exactly one @media rule (prefers-color-scheme) and no width
 * breakpoint at all, so the shell was a 42rem column at every size.
 * Mobile-first stays the default; these only widen it.
 */
@media (min-width: 48rem) {
	.shell {
		max-width: 52rem;
		padding: calc(var(--space) * 3) calc(var(--space) * 1.5);
	}
}

@media (min-width: 64rem) {
	.shell {
		max-width: 64rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spinner,
	.skeleton {
		animation: none;
	}
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
