/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,::after,::before{box-sizing:border-box}html{-moz-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'}hr{height:0;color:inherit}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}


/* === BASE === */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: #fff;
  font-family: system-ui, sans-serif;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23666' opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

a {
  color: #000;
  text-decoration-color: #ccc;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (hover: hover) {
  a:hover  {
    text-decoration-color: #000;
  }
}


/* === MENU NAVIGATION === */

#menu details {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.5rem;
  border: 2px solid transparent;
}

#menu details[open] {
  background: rgba(255,255,255,0.98);
  border: 2px solid #000;
  box-shadow: 3px 3px 0 0 rgba(180,180,180,0.30);
}

#menu summary {
  list-style: none;
  cursor: pointer;
  text-align: right;
  float: right;
  padding: 0.5rem;
  margin-top: -0.5rem;
  margin-right: -0.5rem;
}

#menu summary::-webkit-details-marker {
  display: none;
}

#menu #i-close,
#menu details[open] #i-menu { display: none; }
#menu details[open] #i-close { display: block; }

#menu nav {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.25rem;
  min-width: 7rem;
}

#menu nav a {
  color: #000;
  font-size: 1.125rem;
  padding: 0.5rem 1rem;
  margin: 0 -0.75rem;
  font-weight: 400;
  text-decoration: none;
}

@media (hover: hover) {
  #menu nav a:hover {
    color: #202020;
    text-decoration: underline;
    }
}


/* === ABOUT HEADER === */

header {
  width: 100%;
  margin: 0;
  padding: 2.5rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

header > div {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

header .logo-link {
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4rem;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  header .logo-link:hover {
    text-decoration-color: #ddd;
  }
}

header svg {
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.logo-front-layer,
.logo-middle-layer,
.logo-back-layer {
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  header .logo-link:hover .logo-front-layer { transform: translate(-2px, -1px); }
  header .logo-link:hover .logo-middle-layer { transform: translate(2px, 1px); }
  header .logo-link:hover .logo-back-layer { transform: translate(6px, 3px); }
}

header h1 {
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  font-size: 2.25rem;
  line-height: 1.1;
  text-align: center;
  margin: 0.5rem 1rem 0.5rem;
  font-weight: 400;
}

header h2 {
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  margin: 0.75rem 0;
  font-weight: 600;
}

header p {
  line-height: 1.4;
  margin-top: 0;
}

#about-buttons {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem 1rem;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  gap: 0.5rem;
  justify-content: center;
  position: relative;
  font-size: 1rem;
  line-height: 1;
  font-weight: 600;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  background: #fdfdfd;
}

@media (hover: hover) {
  .btn:hover {
    border: 2px solid #aaa;
  }
}

.btn:active {
  top: 1px;
}


/* === UI ELEMENTS === */

section > h2 {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  background: #252525;
  color: #fff;
  margin: 0;
  padding: 1rem;
  border-top: 1px solid #353535;
  border-bottom: 1px solid #353535;
}

.ui-bg {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  background: #000;
  color: #fff;
}

.ui {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0 1rem;
}

.ui > div {
  flex: 1 auto;
  max-width: calc(50% - 0.5rem);
  padding: 0.75rem 0;
}

.ui div label {
  display: block;
  font-size: 0.75rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 0.5rem;
  color: #808080;
  font-weight: 600;
  white-space: nowrap;
}

.ui div input {
  width: 100%;
  appearance: none;
  background: #404040;
  height: 3px;
  border-radius: 2px;
  cursor: grab;
}

.ui div input:active {
  cursor: grabbing;
}

.ui div input::-webkit-slider-thumb {
  appearance: none;
  width: .25rem;
  height: 1.25rem;
  background: #fff;
  border-radius: 1rem;
  border: none;
}

.ui div input::-moz-range-thumb {
  width: .25rem;
  height: 1.25rem;
  background: #fff;
  border-radius: 1rem;
  border: none;
}

.ui div output {
  color: #fff;
  display: inline-block;
  min-width: 3.5rem;
}

#sizeoutput:after {
  content: "em";
  text-transform: lowercase;
}

#preview-text {
  width: 100%;
  flex: 1 auto;
  appearance: none;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0.5rem 0 1rem;
  outline: none;
}

#preview-text::-webkit-search-cancel-button {
  appearance: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 10px;
  background:
    linear-gradient(45deg, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 43%,#ccc 45%,#ccc 55%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 100%),
    linear-gradient(135deg, transparent 0%,transparent 43%,#ccc 45%,#ccc 55%,transparent 57%,transparent 100%);
  cursor: pointer:
}


/* === SECTION: FONT STACKS === */

#font-stacks {
  text-align: center;
}

#fonts {
  max-width: 84rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-size: 2rem;
}

.font-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-bottom-width: 2px;
  border: 1px solid #888;
  box-shadow: 4px 4px 0 0 rgba(0,0,0,0.15);
  scroll-margin-top: 6rem;
}

.font-link {
  padding: 0 4px 0;
  color: #707070;
  position: relative;
  top: 4px;
  left: 2px;
  float: right;
}

@media (hover: hover) {
  .font-link:hover {
    color: #000;
  }
  
  .font-title:hover .font-link {
    display: inline-flex;
  }
}

@media (hover: none) {
  .font-title .font-link {
    display: inline-flex;
  }
}

.font-card.highlight {
  outline: 2px solid #000;
}

.font-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem .75rem;
  border-bottom: 1px solid #e5e7eb;
}

.font-title h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 400;
  text-align: left;
}

.font-callout {
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  white-space: nowrap;
  background: #eee;
  color: #505050;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  border-radius: 20px;
}

.font-preview {
  display: block;
  flex: 1 auto;
  margin: 0;
  padding: 1.5rem .75rem;
  line-height: 1.2;
  overflow: hidden;
}

.font-preview:empty:after {
  content: "ABCDEFGHIJKLM\a NOPQRSTUVWXYZ\a abcdefghijklm\a nopqrstuvwxyz\a 1234567890";
  white-space: pre;
}

.font-weights {
  display: flex;
  justify-content: space-between;
  font-size: .9375rem;
  padding: 1rem .75rem;
  border-top: 1px solid #e5e7eb;
}

.font-weights span {
  text-decoration: none;
  text-underline-offset: 3px;
  cursor: pointer;
}

.weight-100 { font-weight: 100; }
.weight-200 { font-weight: 200; }
.weight-300 { font-weight: 300; }
.weight-400 { font-weight: 400; }
.weight-500 { font-weight: 500; }
.weight-600 { font-weight: 600; }
.weight-700 { font-weight: 700; }
.weight-800 { font-weight: 800; }
.weight-900 { font-weight: 900; }

[data-weight="100"] .weight-100,
[data-weight="200"] .weight-200,
[data-weight="300"] .weight-300,
[data-weight="400"] .weight-400,
[data-weight="500"] .weight-500,
[data-weight="600"] .weight-600,
[data-weight="700"] .weight-700,
[data-weight="800"] .weight-800,
[data-weight="900"] .weight-900 { 
  text-decoration: underline;
}

.font-stack {
  display: flex;
  justify-content: start;
  align-items: center;
  min-height: 5rem;
  text-align: left;
  padding: .5rem .75rem .75rem;
  border-top: 1px solid #e5e7eb;
}

.font-stack code {
  font-family: 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13px;
  line-height: 1.66;
  font-weight: normal;
  color: #1e293b;
}

.font-stack code strong {
  font-weight: 400;
  display: block;
}

.font-stack code var {
  font-style: normal;
}

#font-stacks-key {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
  font-size: 13px;
  font-weight: 500;
  grid-column: 1 / -1;
}

#font-stacks-key > div {
  display: flex;
  flex: 1 auto;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
}

#font-stacks-key .how-to-use {
  display: none;
  gap: 0.5rem;
}

#font-stacks-key .how-to-use span {
  font-weight: normal;
}

#font-stacks-key .how-to-use code {
  font-family: 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  background: #f4f6f6;
  padding: 4px;
  border-radius: 3px;
  font-size: 12px;
  color: #1e293b;
}

.nope {
  color: #DC2626;
}

.yep {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #265997;
}

.yep ~ .yep {
  text-decoration-style: dotted;
  text-decoration-color: #26599799;
}


/* === SECTION : PREVIEW : ARTICLE VIEW === */

#article-viewport {
  background: #fff;
  padding-bottom: 3rem;
}

#preview .ui {
  list-style: none;
  padding: 0;
}

#preview .ui summary::-webkit-details-marker {
  display: none;
}

#preview .ui summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem;
  gap: 0.75rem;
}

#preview .ui button {
  appearance: none;
  flex: 1 auto;
  background: transparent;
  color: #ccc;
  font-size: 1.125rem;
  line-height: 1.1;
  min-height: 1.5rem;
  border: 2px solid rgba(255,255,255, 0.2);
  border-radius: 4px;
  padding: 0.5rem;
  margin: 0;
  vertical-align: top;
  cursor: pointer;
  position: relative;
}

#preview button:active {
 top: 1px; 
}

#preview button[data-on="true"] {
  border: 2px solid rgba(255,255,255, 1);
  color: #fff;
}

#preview article {
  font-size: 1.125rem;
  line-height: 1.7777778;
  max-width: 47rem;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}

#preview article .title {
  display: block;
  font-size: 2.5rem;
  margin: 4rem auto 6rem;
  max-width: 32rem;
  line-height: 1.1;
  text-align: center;
  font-weight: 200;
}

#preview article .author {
  display: block;
  font-size: 1.25rem;
  margin: 1rem auto;
  max-width: 32rem;
  line-height: 1.1;
  text-align: center;
  font-weight: 400;
  font-style: italic;
}

#preview article img {
  display: block;
  margin: 0 auto;
}

#preview article .chapter {
  display: block;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

#preview article .chapter-name {
  display: block;
  margin: 0.75rem 0 1rem;
  font-size: 1.75rem;
  line-height: 1.1;
  text-align: center;
  font-weight: 600;
}

#preview article p:first-of-type::first-letter {
  font-size: 225%;
  line-height: 1;
  margin-right: 0.1rem;
}


/* === SECTION : PREVIEW : ARTICLE VIEW === */

h2#characters {
  scroll-margin-top: 7.45rem;
}

#font-characters {
  max-width: 84rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  content-visibility: auto;
  min-height: 150vh;
}

.character-set {
  box-shadow: 4px 4px 0 0 rgba(0,0,0,0.15);
}

.character-set h3 {
  font-family: system-ui, sans-serif;
  font-weight: 500;
  padding: 1rem;
  background: #eee;
  margin: 3rem 0 0;
  border: 1px solid #888;
  width: calc(100% + 1px);
  margin-left: -1px;
}

.character-set:first-child h3 {
  margin-top: 0;
}

.character-set div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
  text-align: center;
  font-size: 1.75rem;
  line-height: 1;
  background: #f5f5f5;
}

.character-set i {
  height: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-style: normal;
  background: #fff;
  border: 1px solid #888;
  margin: -1px 0 0 -1px;
}


/* === FONT STACKS === */

.system-ui {
  font-family: system-ui, sans-serif;
}

.transitional {
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
}

.old-style {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
}

.humanist {
  font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
}

.geometric-humanist {
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
}

.classical-humanist {
  font-family: Optima, Candara, 'Noto Sans', sans-serif;
}

.neo-grotesque {
  font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
}

.monospace-slab-serif {
  font-family: 'Nimbus Mono PS', 'Courier New', monospace;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.monospace-code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

.industrial {
  font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;
}

.rounded-sans {
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
}

@font-face {
  font-family: 'Rockwell';
  src: local('Rockwell');
  ascent-override: 100%;
}

.slab-serif {
  font-family: Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif;
}

.antique {
  font-family: Superclarendon, 'Bookman Old Style', 'Sitka Heading', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif;
}

.didone {
  font-family: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.handwritten {
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive;
}

/* === Footer === */

footer {
  padding: 2rem 1rem 2.25rem;
  background: #252525;
  color: #ccc;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

footer a {
  color: inherit;
  text-decoration-color: #aaa;
  text-decoration-thickness: 1px;
}

@media (hover: hover) {
  footer a:hover {
    color: inherit;
    text-decoration-color: #fff;
  }
}

footer span {
  padding: 0 0.5rem;
  opacity: 0.5
}


/* === SM DESKTOP STYLES === */
@media (min-width: 42rem) {
  
  header h2 {
    font-size: 1.25rem;
    font-weight: 500;
  }
  
  header p {
    font-size: 1.125rem;
  }
  
  #menu details {
    position: fixed;
  }
  
  section > h2 {
    padding: 1.5rem 1rem;
  }
  
  .ui {
    min-height: 4.5rem;
    padding: 0 4rem;
  }
  
  #preview-text {
    width: auto;
    padding: 0.75rem;
    margin-left: 1rem;
    align-self: center;
    border: 2px solid #404040;
  }

  #fonts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 0 1.5rem;
    padding: 3rem 1.5rem 4rem;
  }
  
  .font-title {
    padding: 1.25rem 1rem;
  }
  
  .font-preview {
    padding: 1.5rem 1rem;
  }
  
  .font-weights {
    font-size: 1rem;
    padding: 1rem;
  }
  
  .font-stack {
    padding: 0.5rem 1rem 0.75rem;
  }
  
  #preview .ui {
    max-width: 84rem;
    min-height: 7.5rem;
  }
  
  #preview .ui summary {
    padding: 1rem 4rem;
    gap: 0.5rem
  }
  
  #preview article {
    font-size: 1.25rem;
  }
  
  #preview article .title {
    font-size: 3rem;
  }
  
  #preview article .chapter-name {
    font-size: 2rem;
  }
  
  #preview article img {
    margin: 0 -3rem 0 1.5rem;
    float: right;
  }
  
  .character-set div {
    grid-template-columns: repeat(auto-fill, minmax(3.75rem, 1fr));
    font-size: 1.5rem;
  }
  
  .character-set span {
    height: 3.75rem;
  }
  
}

/* === MD DESKTOP STYLES === */
@media (min-width: 54rem) {
  
  #font-stacks-key .how-to-use {
    display: flex;
  }

  #font-stacks-key > div {
    flex: 0 auto;
  }
  
}

/* === LG DESKTOP STYLES === */
@media (min-width: 80rem) {
  
  #font-characters {
    padding: 3rem 1.5rem 6rem;
    column-count: 2;
    column-gap: 3rem;
  }
  
  .character-set {
    break-inside: avoid;
  }
  
}


/* === MOBILE STYLES === */

@media (max-width: 42rem) {

  #preview .ui button {
    display: none;
  }
  
  #preview button[data-on="true"] {
    display: block !important;
    pointer-events: none;
  }
  
  #preview button[data-on="true"]:after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23fff' width='24' height='24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9' /%3E%3C/svg%3E%0A");
    position: absolute;
    right: 6px;
    top: 6px;
  }
  
  #preview .ui[open] button {
    display: block;
  }
  
  #preview .ui[open] button[data-on="true"]:after {
    content: none;
  }
}

/* === TOUCH ONLY STYLES === */

@media (pointer: coarse) {
  
  .ui div input::-webkit-slider-thumb {
    width: 0.25rem;
    height: 2.75rem;
    background: linear-gradient(90deg, #fff0 0%, #fff0 47%, #fff 47%, #fff 53%, #fff0 53%, #fff0 100%);
    transform: scaleX(12);
    box-shadow: none;
    border-top: 0.75rem solid #000;
    border-bottom: 0.75rem solid #000;
  }
  
  .ui div input::-moz-range-thumb {
    width: 0.25rem;
    height: 2.75rem;
    background: linear-gradient(90deg, #fff0 0%, #fff0 47%, #fff 47%, #fff 53%, #fff0 53%, #fff0 100%);
    transform: scaleX(12);
    box-shadow: none;
    border-top: 0.75rem solid #000;
    border-bottom: 0.75rem solid #000;
  }
  
}
