@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,700;0,900;1,400&family=Workbench&display=swap");

*,
:before,
:after {
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
}

:before,
:after {
    --un-content: "";
}

html,
:host {
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    line-height: 1.5;
}

body {
    line-height: inherit;
    margin: 0;
}

hr {
    color: inherit;
    border-top-width: 1px;
    height: 0;
}

abbr:where([title]) {
    text-decoration: underline dotted;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp,
pre {
    font-feature-settings: normal;
    font-variation-settings: normal;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
    font-size: 1em;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    background-color: #0000;
    background-image: none;
}

:-moz-focusring {
    outline: auto;
}

:-moz-ui-invalid {
    box-shadow: none;
}

progress {
    vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

summary {
    display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
    margin: 0;
}

fieldset {
    margin: 0;
    padding: 0;
}

legend {
    padding: 0;
}

ol,
ul,
menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

dialog {
    padding: 0;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af;
}

button,
[role="button"] {
    cursor: pointer;
}

:disabled {
    cursor: default;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
}

img,
video {
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none;
}

html {
    overflow: clip auto;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Roboto, SF Pro, sans-serif;
    background-color: var(--background);
    color: var(--on-background);
    min-height: 100dvh;

    --background: #f4f4ff;
    --on-background: #223;
    --primary: #03b;
    --on-primary: #fff;
    --primary-container: #e0e0ff;
    --on-primary-container: #223;
}


header {
    display: flex;
    height: 3rem;
    font-family: Workbench, sans-serif;
    background-color: var(--on-background);
    color: var(--background);
}

header a {
    font-size: 1.25rem;
    margin-left: 1rem;
    align-self: center;
    color: inherit;
    text-decoration: none;
}

header .page {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    padding: 0 1rem;
    margin-left: auto;
}

.dropdown {
    display: flex;
    flex-direction: column;
    pointer-events: none;

    position: absolute;
    top: 0;
    right: 0;
    transform-origin: top right;
    scale: 0;
    transition: scale 200ms;

    background-color: var(--primary-container);
    color: var(--on-primary-container);
    font-family: Workbench, sans-serif;
    min-width: 10rem;
    padding: 0.5rem 1rem;
}

.dropdown.open {
    pointer-events: unset;
    scale: 1;
}

.dropdown>* {
    color: inherit;
    text-decoration: none;
    text-align: left;
    padding: 0.5rem 0;
}


main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    padding-block: 1rem;
    width: min(calc(100% - 2rem), 40rem);
    align-self: center;
}

main h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0;
}

main h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin: 1rem 0 0 0;
}

main p {
    margin: 0;
}

summary {
    cursor: pointer;
}

.quote {
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    padding: 1rem;
    border-radius: 1.5rem;
}

.quote a {
    color: var(--primary);
    text-decoration: none;
}

.quote a::before {
    content: "From \"";
}

.quote a::after {
    content: "\"";
}

.citation {
    position: relative;
    text-decoration: none;

    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--primary);
    color: var(--on-primary);
}

.citation::after {
    position: absolute;
    z-index: 1;
    top: 0.75rem;
    left: calc(100% - 0.5rem);
    display: inline-block;

    content: attr(data-name) "\00000aClick to open";
    white-space: pre;

    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--primary);
    color: var(--on-primary);

    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms;
}

.citation:hover::after {
    opacity: 1;
}