@charset "UTF-8";

/*
 Standard Style Sheet — topic pages

 Dottie
 https://www.gingerbeardman.com/apps/dottie/
*/

@import "common.css";

:root {
	--accent-background: light-dark(hsl(210, 60%, 97%), hsl(210, 30%, 20%));
}

img {
	max-inline-size: 100%;
}

body > h1 {
	font-size: 1.7rem;
	font-weight: 500;
	line-height: 1.2;
	margin-block-end: 1.4rem;

	display: flex;
	align-items: flex-start;
	gap: 12px;
}
body > h1::before {
	content: image-set(url(../gfx/icon_32x32@2x.png) 2x);
	display: inline-block;
	position: relative;
	inset-block-start: 1px;
}

body > section,
article {
	border-block-start: 1px solid -apple-system-separator;
	margin-block: 1.5rem;
}
h2 {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	margin-block: 1rem;
}
h3 {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.1;
	margin-block-start: 1.5rem;
}

figure {
	margin-inline: 0;
}
figure img {
	border: 0.5px solid -apple-system-tertiary-label;
	border-radius: 0.3rem;
}

ul {
	list-style-type: disc;
}
ol,
ul {
	padding-inline: 1.5rem;
}
li p {
	margin-block: 0.5rem;
}
li:first-child p {
	margin-block-start: 0;
}

dt {
	font-weight: 600;
}
dd + dt {
	margin-block-start: 0.5rem;
}

table {
	font-size: 0.95rem;
	border-collapse: collapse;
	empty-cells: show;
	margin-block: 1rem;
}
table tr {
	border-block: 1px solid -apple-system-quaternary-label;
}
table thead tr:first-child {
	border-block-start: 2.5px solid -apple-system-quaternary-label;
}
table tr > * {
	padding-block: 0.5rem;
	padding-inline: 0.6rem;
	text-align: start;
}
table tr > :first-child {
	padding-inline-start: 0;
}
table tr > :last-child {
	padding-inline-end: 0;
}
table thead th {
	padding-block: 0.4rem;
	font-weight: bold;
}
table th {
	font-weight: normal;
	white-space: nowrap;
}
table tbody {
	vertical-align: baseline;
}
table tbody td > * {
	margin-block: 0.5rem;
}
table tbody td > :first-child {
	margin-block-start: 0;
}
table tbody td > :last-child {
	margin-block-end: 0;
}
tbody td.center {
	text-align: center;
}
table.tool-table tr > :first-child {
	inline-size: 10rem;
	min-inline-size: 10rem;
}
table.tool-table tr > :nth-child(2) {
	inline-size: 4rem;
	min-inline-size: 4rem;
	text-align: start;
}


/* classes */

.na {
	color: -apple-system-tertiary-label;
}
em.tip {
	font-weight: 700;
	font-style: inherit;
}
em.tip::before {
	content: url(../gfx/lightbulb.svg);
	display: inline-block;
	position: relative;
	inset-block-start: 3px;
	padding-inline-end: 0.2em;
}

p.addition {
	padding-block: 0.8rem;
	padding-inline: 1.2rem;
	border-radius: 0.8rem;
	/* White-based with a hairline border, not the old pale blue: the per-page pastel
	   tints (see the page-background block below) made a blue callout vanish on the
	   blue-tinted canvas/zoom/view pages. White separates on every tint. */
	background: light-dark(white, hsl(0, 0%, 16%));
	border: 1px solid light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.12));
}

a.toc::before {
	display: inline-block;
	content: url(../gfx/toc_secondary.svg);
	vertical-align: -1px;
	padding-inline-end: 0.3rem;
}
a.toc {
	font-size: 15px;
	font-weight: 400;
	position: absolute;
	inset-block-start: 5px;
	color: -apple-system-secondary-label;
}
@media (prefers-color-scheme: dark) {
	a.toc::before {
		content: url(../gfx/toc_secondary-dark.svg);
	}
}

img.appicon {
	vertical-align: text-bottom;
	height: 18px;
}

img.toolicon {
	inline-size: 28px;
	block-size: 28px;
	object-fit: contain;
	vertical-align: middle;
	margin-inline-end: 0.35rem;
	padding: 3px;
	box-sizing: border-box;
	border: 1px solid -apple-system-quaternary-label;
	border-radius: 5px;
	background: light-dark(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.08));
}

td.tool {
	white-space: nowrap;
}

pre.source {
	background: light-dark(hsl(0, 0%, 98%), hsl(0, 0%, 10%));
	border: 1px solid -apple-system-separator;
	border-radius: 0.5rem;
	padding-block: 0.4rem;
	padding-inline: 0.8rem;
	overflow: auto;
}


/* See also */

#cf {
	border-block-start: none;
	margin-block-start: 2.5rem;
}
#cf > * {
	margin-block: 0;
}
#cf ul {
	list-style-type: none;
	padding-inline-start: 0;
}
#cf ul li {
	margin-block: 0.4rem;
}


/* Per-page background tints — very pale pastels from the Dottie website palette
   (appysite/apps/dottie/style.css), one hue per topic group. The ONLY themed
   change: everything else keeps the standard help styling. Pages are selected
   by their anchor (<a name="…">) via :has(), so no page markup changes. */

/* Drawing tools — pink */
body:has(a[name="howto_draw"]),
body:has(a[name="howto_draw_shapes"]),
body:has(a[name="howto_fill"]),
body:has(a[name="howto_clone"]),
body:has(a[name="howto_symmetry"]),
body:has(a[name="about_brushes"]),
body:has(a[name="about_color_shift"]),
body:has(a[name="about_tools"]),
body:has(a[name="about_modifiers"]) {
	background: light-dark(#FFF3F7, hsl(340, 12%, 12%));
}

/* Selection + clipboard — purple */
body:has(a[name="howto_select"]),
body:has(a[name="howto_move_selection"]),
body:has(a[name="howto_clipboard"]) {
	background: light-dark(#F6F2FB, hsl(260, 12%, 12%));
}

/* Layers, animation, undo — green */
body:has(a[name="howto_layers"]),
body:has(a[name="howto_animation"]),
body:has(a[name="howto_undo"]) {
	background: light-dark(#F0F9F0, hsl(120, 10%, 11%));
}

/* Palette + colour — yellow */
body:has(a[name="howto_palettes"]),
body:has(a[name="howto_edit_palette"]),
body:has(a[name="howto_import_palette"]),
body:has(a[name="about_color_protection"]) {
	background: light-dark(#FFFAE8, hsl(48, 14%, 11%));
}

/* Canvas, zoom, view, windows — blue */
body:has(a[name="howto_canvas"]),
body:has(a[name="howto_zoom"]),
body:has(a[name="howto_view"]),
body:has(a[name="howto_windows"]) {
	background: light-dark(#F0F7FB, hsl(200, 14%, 12%));
}

/* Tileset — mint */
body:has(a[name="howto_tileset"]) {
	background: light-dark(#EDF8F3, hsl(160, 12%, 11%));
}

/* Documents: new, save, import, export, open with — peach */
body:has(a[name="howto_create_document"]),
body:has(a[name="howto_save_document"]),
body:has(a[name="howto_import"]),
body:has(a[name="howto_export"]),
body:has(a[name="howto_open_with"]),
body:has(a[name="about_presets"]) {
	background: light-dark(#FFF5EC, hsl(25, 14%, 12%));
}

/* Getting started, tips, shortcuts — cream */
body:has(a[name="howto_first_sprite"]),
body:has(a[name="tips"]),
body:has(a[name="shortcuts"]) {
	background: light-dark(#FFF9E9, hsl(45, 14%, 12%));
}

/* Settings, AppleScript, support, troubleshooting — seafoam */
body:has(a[name="howto_settings"]),
body:has(a[name="about_applescript"]),
body:has(a[name="about_support"]),
body:has(a[name="troubleshooting"]),
body:has(a[name="about_dottie"]) {
	background: light-dark(#EFF9F5, hsl(160, 10%, 12%));
}
