/* Trial accounts and the starter motions (trial.js).

   Loaded after theme.css and built from its tokens. Home: the motion chooser
   (every account) and the trial banner. Login: the trial note. Round page, for
   a trial account only: the quota notice on the recorder. Also the small page
   that answers a quota refusal. */

/* ---- Home: trial banner ---------------------------------------------------- */
.trial-banner {
	padding: .75rem 1.1rem; border: 1px solid var(--hairline); border-left: 3px solid var(--gold);
	border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft);
	font-size: .88rem; line-height: 1.65;
}
.trial-banner p { margin: 0; }
.trial-banner .trial-usage { margin-top: .25rem; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
/* The banner takes the first row of the home grid; the cards move down one. */
.page-home main:has(> .trial-banner) { grid-template-rows: auto auto 1fr; }
.page-home .trial-banner { grid-column: 1 / -1; grid-row: 1; }
.page-home main:has(> .trial-banner) .hero-card { grid-row: 2; }
.page-home main:has(> .trial-banner) .upload-card { grid-row: 3; }
.page-home main:has(> .trial-banner) .recent-card { grid-row: 2 / span 2; }

/* ---- Home: starter motions ------------------------------------------------- */
/* Folded under the start button, so the motion field and the button stay on
   the first screen; a pick fills the field above (trial.js). */
.page-home .motion-chooser { margin: 1.2rem 0 0; padding-top: .9rem; border-top: 1px solid var(--hairline); }
.page-home .motion-chooser > summary { color: var(--ink); font-weight: 600; }
.page-home .motion-chooser > summary:hover { color: var(--lapis); }
.motion-chooser-hint { margin: .45rem 0 .55rem; font-size: .82rem; }
.motion-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.motion-list li + li { border-top: 1px solid #f0ebe0; }
.page-home .motion-pick {
	display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); column-gap: .75rem; row-gap: .05rem; align-items: start; justify-content: stretch;
	width: 100%; min-height: 0; margin: 0; padding: .6rem .85rem; border: 0; border-radius: 0;
	background: transparent; box-shadow: none; color: var(--ink);
	font-size: .95rem; font-weight: 400; line-height: 1.45; text-align: left;
}
.page-home .motion-pick:hover { background: var(--lapis-tint); color: var(--ink); }
.page-home .motion-pick:active { transform: none; }
.page-home .motion-pick:focus-visible { outline-offset: -2px; box-shadow: none; }
.page-home .motion-pick[aria-pressed="true"] { background: var(--gold-tint); box-shadow: inset 3px 0 0 var(--gold-deep); }
.motion-tag {
	grid-column: 1; grid-row: 1 / span 2; justify-self: start; margin-top: .12rem; padding: .02rem .5rem; border-radius: 1rem;
	background: var(--success-tint); color: var(--success-ink); font-size: .72rem; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.motion-tag[data-level="进阶"] { background: var(--lapis-tint); color: var(--lapis); }
.motion-pick[aria-pressed="true"] .motion-tag[data-level="进阶"] { background: var(--surface); }
.motion-text { grid-column: 2; color: var(--ink); font-weight: 600; }
.motion-gloss { grid-column: 2; color: var(--muted); font-size: .84rem; }
.motion-note { margin-left: .25rem; padding: .02rem .45rem; border-radius: .7rem; background: var(--gold-tint); color: var(--warning-ink); font-size: .74rem; white-space: nowrap; }
.motion-solo { margin: .65rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.65; }

/* ---- Login: trial note ------------------------------------------------------- */
.page-login .trial-note {
	margin: 1rem 0 0; padding: .65rem .85rem; border: 1px solid var(--hairline); border-left: 3px solid var(--gold);
	border-radius: var(--radius-xs); background: var(--paper); color: var(--ink-soft);
	font-size: .82rem; line-height: 1.7; text-align: left;
}

/* ---- Round page: quota notice above the recorder --------------------------- */
.trial-strip { margin: .6rem 0 0; }
.trial-notice {
	margin: 0 0 .5rem; padding: .7rem .95rem; border: 1px solid #ecd9a8; border-radius: var(--radius-sm);
	background: var(--warning-tint); color: var(--warning-ink); font-size: .92rem; font-weight: 600; line-height: 1.6;
	scroll-margin-top: calc(var(--bar-h) + .75rem);
}
.trial-meter { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; font-variant-numeric: tabular-nums; }

/* ---- The page that answers a quota refusal --------------------------------- */
.page-notice main { max-width: 36rem; padding-top: 3rem; }
.page-notice .notice-card { border-top: 3px solid var(--gold); }
.page-notice h1 { margin: 0 0 .6rem; font-size: 1.35rem; }
.page-notice .notice-card p { margin: 0; font-size: 1rem; line-height: 1.75; }
.page-notice .notice-actions { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.3rem; font-weight: 600; }

/* ---- Small screens ----------------------------------------------------------- */
@media (max-width: 999px) {
	.page-home main:has(> .trial-banner) { grid-template-rows: none; }
	.page-home .trial-banner { grid-column: 1; grid-row: auto; }
	.page-home main:has(> .trial-banner) .hero-card,
	.page-home main:has(> .trial-banner) .upload-card,
	.page-home main:has(> .trial-banner) .recent-card { grid-row: auto; }
}
@media (max-width: 760px) {
	.page-home .motion-pick { grid-template-columns: minmax(0, 1fr); padding: .6rem .75rem; }
	.motion-tag { grid-column: 1; grid-row: auto; margin: 0 0 .15rem; }
	.motion-text, .motion-gloss { grid-column: 1; }
}
