/* Worksheets on the web iOS kit's page mode (/ioskit/page.css): the set-up, the page preview, the print buttons, and the
   generated pages' samples and lists. Loaded after ios.css and page.css. */
:root { --tint: #2b6fd6; --forest: #2b6fd6; --coral: #2b6fd6; --acc2: #f2a33a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint: #5b9bff; --forest: #5b9bff; --coral: #5b9bff; --acc2: #ffbe5c; } }
:root[data-theme="dark"] { --tint: #5b9bff; --forest: #5b9bff; --coral: #5b9bff; --acc2: #ffbe5c; }
html { scrollbar-gutter: stable; }
main { display: flow-root; padding-top: calc(var(--sat) + 60px); }
.pg-bar { height: calc(var(--sat) + 60px); box-sizing: border-box; margin-top: calc(-1 * (var(--sat) + 60px)); }
.note { color: var(--text2); font-size: 15px; padding: 20px 4px; }

/* ---------- the set-up ---------- */
.w-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
/* the grid's track never grows to its content: the preview canvas and its long heading must fit the phone */
.w-left, .w-side, .w-preview, .w-preview-top > div:first-child { min-width: 0; }
@media (min-width: 900px) { .w-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 26px; align-items: start; } .w-side { position: sticky; top: calc(var(--sat) + 70px); } }
.w-wrap .group { margin-top: 14px; }
.w-seg-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
.w-seg-row .segmented { flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.w-seg-full { padding-top: 8px; padding-bottom: 8px; }
.w-seg-full .segmented { width: 100%; }
.picker-row .picker-value { max-width: 66%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-code { font: 600 17px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; color: var(--text); }
#spellWords, #traceText { font-size: 16px; line-height: 1.35; }

.w-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 4px; }
.w-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 25px; background: var(--fill2); font-weight: 600; font-size: 16px; color: var(--text); }
.w-btn .sf { font-size: 20px; }
.w-btn.main { background: var(--tint); color: #fff; flex: 1 1 140px; max-width: 220px; }
.w-btn:active { transform: scale(.98); }
.w-status { flex: 1 1 100%; font-size: 14px; color: var(--text2); min-height: 18px; }

/* ---------- the preview ---------- */
.w-preview { background: var(--row); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); margin-top: 14px; }
.w-side .w-preview { margin-top: 14px; }
.w-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.w-preview-top .t { font-weight: 600; }
.w-preview-top .s { font-size: 13px; color: var(--text2); }
.w-step { display: flex; align-items: center; gap: 4px; flex: none; }
.w-step button { width: 44px; height: 44px; border-radius: 22px; background: var(--fill2); display: grid; place-items: center; font-size: 18px; }
.w-step button:disabled { opacity: .35; }
.w-paper { max-width: 100%; background: #fff; border-radius: 6px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 6px 18px rgba(0, 0, 0, .12); overflow: hidden; }
.w-page { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 595 / 842; }
.w-qs { margin-top: 10px; font-size: 13px; color: var(--text2); }
.w-qs summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.w-qs p { margin: 6px 0 0; line-height: 1.5; }

/* ---------- the generated pages ---------- */
.w-sample { margin: 8px 0 22px; }
.w-sample svg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; border-radius: 6px; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15), 0 6px 18px rgba(0, 0, 0, .1); }
.w-sample figcaption { text-align: center; font-size: 14px; color: var(--text2); margin-top: 8px; }
.w-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 18px; padding: 0; list-style: none; }
.w-links li { margin: 0; }
.w-links a { display: block; padding: 8px 0; min-height: 24px; }
.plinks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.plinks a { padding: 6px 0; }
.crumbs { font-size: 14px; color: var(--text2); margin-bottom: 14px; }
.w-printables { padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--tint) 8%, transparent); }
.w-printables a { white-space: nowrap; }
@media print { [data-yz-install] { display: none !important; } }
