/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1.6em;
  line-height: 1.4;
}

/* @link https://utopia.fyi/type/calculator?c=375,16,1.2,1440,22,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
  /* Step -2: 11.1111px → 14.08px */
  --guideline-xp--2: clamp(0.6944rem, 0.6291rem + 0.2788vw, 0.88rem);
  /* Step -1: 13.3333px → 17.6px */
  --guideline-xp--1: clamp(0.8333rem, 0.7394rem + 0.4006vw, 1.1rem);
  /* Step 0: 16px → 22px */
  --guideline-xp-0: clamp(1rem, 0.868rem + 0.5634vw, 1.375rem);
  /* Step 1: 19.2px → 27.5px */
  --guideline-xp-1: clamp(1.2rem, 1.0173rem + 0.7793vw, 1.7188rem);
  /* Step 2: 23.04px → 34.375px */
  --guideline-xp-2: clamp(1.44rem, 1.1906rem + 1.0643vw, 2.1484rem);
  /* Step 3: 27.648px → 42.9688px */
  --guideline-xp-3: clamp(1.728rem, 1.3908rem + 1.4386vw, 2.6855rem);
  /* Step 4: 33.1776px → 53.7109px */
  --guideline-xp-4: clamp(2.0736rem, 1.6217rem + 1.928vw, 3.3569rem);
  /* Step 5: 39.8131px → 67.1387px */
  --guideline-xp-5: clamp(2.4883rem, 1.887rem + 2.5658vw, 4.1962rem);
}

h1 {
  color: #005a9c;
  font-size: var(--guideline-xp-2);
}

h2 {
  color: #005a9c;
  font-size: var(--guideline-xp-1);
}

h3 {
  font-size: var(--guideline-xp-1);
}

p {
  font-size: var(--guideline-xp-0);
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

.button {
  --button-bg: #342a21;
  --button-color: #ffffff;
  --button-hover-bg: #4b4b4a;
  --button-hover-color: #ffffff;
  --button-border-width: 3px;
  --button-border-style: solid;
  --button-border-color: var(--button-bg);
  --button-radius: 0.5em;

  display: inline-flex;
  align-items: center;
  gap: var(--button-gap, 0.5em);
  padding: var(--button-padding, 0.7em 1.2em);

  background: var(--button-bg);
  color: var(--button-color);

  border-width: var(--button-border-width);
  border-style: var(--button-border-style);
  border-color: var(--button-border-color);
  border-radius: var(--button-radius);

  text-decoration: none;
  font-weight: var(--button-font-weight, 700);
  font-size: var(--button-font-size, 1em);
  letter-spacing: 0.05ch;
  font-family: sans-serif;
  line-height: 1.1; /* Set or buttons will be different sizes (<a>/<button>) */

  cursor: pointer;
}

.button svg {
  height: var(--button-icon-size, 1.2cap);
  width: auto;
  flex: none;
}

/* Hover/focus/active */
.button:hover {
  background: var(--button-hover-bg);
  color: var(--button-hover-color);
}

.button:focus {
  outline-width: var(--button-outline-width, var(--button-border-width));
  outline-style: var(--button-outline-style, var(--button-border-style));
  outline-color: var(--button-outline-color, var(--button-border-color));
  outline-offset: var(
    --button-outline-offset,
    calc(var(--button-border-width) * 2)
  );
}

.button:active {
  transform: scale(.99);
}

/* Variants */

.button[data-button-variant="primary"] {
  --button-bg: #f3de8a;
  --button-color: #342a21;
  --button-border-color: currentColor;
  --button-hover-bg: #f1d979;
  --button-hover-color: #342a21;
}

.button[data-button-variant="positive"] {
  --button-bg: #2d936c;
  --button-border-color: #107350;
  --button-hover-bg: #359d75;
}

.button[data-button-variant="negative"] {
  --button-bg: #b33c48;
  --button-border-color: #a62f3d;
  --button-hover-bg: #c24a56;
}

/* Ghost buttons */
.button[data-ghost-button] {
  --button-bg: transparent;
  --button-border-color: currentColor;
  --button-color: currentColor;
  margin-block: 1em;
}

/* Radius variants */
.button[data-button-radius="hard"] {
  --button-radius: 0;
}

/* List styles */
/*
CLUSTER
More info: https://every-layout.dev/layouts/cluster/
A layout that lets you distribute items with consitent
spacing, regardless of their size

CUSTOM PROPERTIES AND CONFIGURATION
 --gutter (var(--space-s-m)): This defines the space
between each item.

--cluster-horizontal-alignment (flex-start) How items
should align horizontally. Can be any acceptable flexbox
aligmnent value.

--cluster-vertical-alignment How items should align
vertically. Can be any acceptable flexbox alignment value.

--cluster-direction (row) Sets the layout direction
(horizontal or vertical). Accepts any flex-direction value
(row, column, etc.).
Default: row.

--cluster-wrap (wrap) Controls item wrapping within the
cluster. Accepts flex-wrap values (nowrap, wrap, wrap-reverse).
Default: wrap.

--cluster-row-gap (var(--gutter, var(--space-s-m))) Defines
vertical spacing between rows.
Default: --gutter or var(--space-s-m).

--cluster-column-gap (var(--gutter, var(--space-s-m))) Defines
horizontal spacing between columns.
Default: --gutter or var(--space-s-m).
*/

.cluster {
  padding-left: 0px;
  display: flex;
  flex-direction: var(--cluster-direction, row);
  flex-wrap: var(--cluster-wrap, wrap);
  column-gap: var(--cluster-column-gap, var(--gutter, var(--space-s-m)));
  row-gap: var(--cluster-row-gap, var(--gutter, var(--space-s-m)));
  justify-content: var(--cluster-horizontal-alignment, flex-start);
  align-items: var(--cluster-vertical-alignment, center);
}

body {
  --gutter: 1em;
  font-family: sans-serif;
  background: #d7d9ce;
  align-content: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.cluster {
  list-style-type: none;
  max-width: 80ch;
  margin: 0 auto;
}

main {
  min-height: 84vh;
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  font-weight: normal;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

main > #output {
  padding-inline: 16px;
  max-width: 70ch;
  margin: 0px auto 0px auto; 
  display: flex;
  flex-direction: column;
  justify-content: center;
}

main > section > details {
  margin-block: 4em;
}

/* output {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
} */


footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #9abcde;
  color: white;
  padding: 20px;
  margin: 0px;
  font-size: 0.7em;
}

footer > p, footer :visited {
  color: black;
  margin-top: 2px;
  margin-bottom: 2px;
}

nav {
  color: #005a9c;
  padding: 8px;
  display: flex;
  justify-content: center;
  background: #b3d4fc;
  position: sticky; top: 0;
}

nav h2 {
  margin: 4px;
  padding-inline: 20px;
  font-size: 1.1em;
}

details {
  border: 1px solid #aaaaaa;
  border-radius: 4px;
  padding: 0.5em 0.5em 0;
}

summary {
  font-weight: bold;
  margin: -0.5em -0.5em 0;
  padding: 0.5em;
}

details[open] {
  padding: 0.5em;
}

details[open] summary {
  border-bottom: 1px solid #aaaaaa;
  margin-bottom: 0.5em;
}

.title-head {
  margin: 0px;
  padding-inline: 10px;
}

.header-icon {
  max-height: 44px;
}

.header-link {
	display: flex;
	flex-direction: row;
	align-items: center;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

