/* Windows 95-style chrome. Bevels are layered inset box-shadows: light top-left, dark bottom-right. */
:root {
	--face: #c0c0c0;
	--light: #dfdfdf;
	--shadow: #808080;
	--dark: #0a0a0a;
	--raised: inset -1px -1px var(--dark), inset 1px 1px #fff, inset -2px -2px var(--shadow), inset 2px 2px var(--light);
	--sunken: inset -1px -1px #fff, inset 1px 1px var(--shadow), inset -2px -2px var(--light), inset 2px 2px var(--dark);
}
* { box-sizing: border-box; }
body {
	margin: 0; padding: 16px; min-height: 100vh;
	background: #008080; color: #000;
	font: 14px/1.4 "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Geneva, sans-serif;
}
.window { max-width: 56rem; margin: 0 auto; padding: 3px; background: var(--face); box-shadow: var(--raised); }
.titlebar {
	display: flex; justify-content: space-between; gap: 1rem; padding: 3px 6px;
	background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: bold;
}
.menubar { display: flex; align-items: center; gap: 1rem; padding: 4px 6px; border-bottom: 1px solid var(--shadow); box-shadow: 0 1px #fff; }
.menubar form { margin-left: auto; }
main { padding: 8px 12px 12px; }
h1 { font-size: 1.3rem; margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; }
h3 { font-size: 1rem; }
a { color: #000080; }
p, ul { margin: 0.4rem 0; }

/* Group box: the heading sits on the etched border like a fieldset legend. */
section { position: relative; margin: 1.6rem 0 1rem; padding: 1rem 0.8rem 0.5rem; border: 1px solid var(--shadow); box-shadow: 1px 1px #fff, inset 1px 1px #fff; }
section > h2, section > h3 { position: absolute; top: -0.75em; left: 0.5rem; margin: 0; padding: 0 0.3rem; background: var(--face); }

button, .button {
	display: inline-block; min-width: 6rem; padding: 4px 12px; border: 0; background: var(--face); color: #000;
	font: inherit; text-align: center; text-decoration: none; box-shadow: var(--raised); cursor: pointer;
}
button:active, .button:active { box-shadow: var(--sunken); padding: 5px 11px 3px 13px; }
button:focus-visible, summary:focus-visible, .button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
input:not([type=hidden]), textarea {
	width: 100%; max-width: 40rem; padding: 4px 5px; margin: 2px 0 8px;
	border: 0; background: #fff; color: #000; font: inherit; box-shadow: var(--sunken);
}
input:focus, textarea:focus { outline: none; box-shadow: var(--sunken), 0 0 0 1px #000080; }
label { display: block; max-width: 40rem; }
form > br { display: none; }

/* Read-only text boxes: sunken like an input, but grey like a disabled Win95 edit control. */
.props { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 6px 10px; margin: 0 0 8px; max-width: 46rem; }
.props dt { padding-top: 4px; }
.props dd { margin: 0; }
.field { padding: 4px 6px; background: var(--face); box-shadow: var(--sunken); min-height: calc(1.4em + 8px); }
.field.title { font-weight: bold; }
.field.status.green { background: #005000; color: #fff; }
.field.status.red { background: #800000; color: #fff; }
@media (max-width: 480px) {
	.props { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.props dt { padding-top: 6px; }
}

details { margin: 1rem 0; }
summary { display: inline-block; padding: 4px 12px; background: var(--face); box-shadow: var(--raised); cursor: pointer; }
details[open] > summary { box-shadow: var(--sunken); margin-bottom: 0.6rem; }

/* Tables look like a sunken list view with raised column headers. */
.table { overflow-x: auto; background: #fff; box-shadow: var(--sunken); padding: 2px; margin: 0.4rem 0; }
table { border-collapse: collapse; width: 100%; }
th { padding: 3px 8px; text-align: left; font-weight: normal; background: var(--face); box-shadow: var(--raised); white-space: nowrap; }
td { padding: 3px 8px; vertical-align: top; }
tr + tr td { border-top: 1px dotted var(--light); }

.inline { display: inline; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Dark enough for 4.5:1 contrast on the grey face. */
.green { color: #005000; }
.red { color: #800000; }
.grey { color: #404040; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
