/*!
  * Base styles
  * Based on Milligram v1.4.1
  * https://milligram.io
  *
  * Copyright (c) 2020 CJ Patoilo
  * Licensed under the MIT license
  *
  * Modified in 2025 by Lou Huang
  */

/* ==========================================================================
   Base styles
   ========================================================================== */

*,
*:after,
*:before {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
}


/* ==========================================================================
   Grid
   ========================================================================== */

.container {
  margin: 0 auto;
  max-width: 64.0rem;
  padding: 0 1.0rem;
  position: relative;
  width: 100%;

  @media screen and (min-width: 640px) {
    padding: 0 2.0rem;
  }
}

.row {
  display: flex;
  flex-direction: column;
  padding: 0;
  width: 100%;
}

.row.row-no-padding {
  padding: 0;
}

.row.row-no-padding > .column {
  padding: 0;
}

.row.row-wrap {
  flex-wrap: wrap;
}

.row.row-top {
  align-items: flex-start;
}

.row.row-bottom {
  align-items: flex-end;
}

.row.row-center {
  align-items: center;
}

.row.row-stretch {
  align-items: stretch;
}

.row.row-baseline {
  align-items: baseline;
}

.row .column {
  display: block;
  flex: 1 1 auto;
  margin-left: 0;
  max-width: 100%;
  width: 100%;
}

.row .column.column-offset-10 {
  margin-left: 10%;
}

.row .column.column-offset-20 {
  margin-left: 20%;
}

.row .column.column-offset-25 {
  margin-left: 25%;
}

.row .column.column-offset-33, .row .column.column-offset-34 {
  margin-left: 33.3333%;
}

.row .column.column-offset-40 {
  margin-left: 40%;
}

.row .column.column-offset-50 {
  margin-left: 50%;
}

.row .column.column-offset-60 {
  margin-left: 60%;
}

.row .column.column-offset-66, .row .column.column-offset-67 {
  margin-left: 66.6666%;
}

.row .column.column-offset-75 {
  margin-left: 75%;
}

.row .column.column-offset-80 {
  margin-left: 80%;
}

.row .column.column-offset-90 {
  margin-left: 90%;
}

.row .column.column-10 {
  flex: 0 0 10%;
  max-width: 10%;
}

.row .column.column-20 {
  flex: 0 0 20%;
  max-width: 20%;
}

.row .column.column-25 {
  flex: 0 0 25%;
  max-width: 25%;
}

.row .column.column-33, .row .column.column-34 {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
}

.row .column.column-40 {
  flex: 0 0 40%;
  max-width: 40%;
}

.row .column.column-50 {
  flex: 0 0 50%;
  max-width: 50%;
}

.row .column.column-60 {
  flex: 0 0 60%;
  max-width: 60%;
}

.row .column.column-66, .row .column.column-67 {
  flex: 0 0 66.6666%;
  max-width: 66.6666%;
}

.row .column.column-75 {
  flex: 0 0 75%;
  max-width: 75%;
}

.row .column.column-80 {
  flex: 0 0 80%;
  max-width: 80%;
}

.row .column.column-90 {
  flex: 0 0 90%;
  max-width: 90%;
}

.row .column .column-top {
  align-self: flex-start;
}

.row .column .column-bottom {
  align-self: flex-end;
}

.row .column .column-center {
  align-self: center;
}

@media (min-width: 40rem) {
  .row {
    flex-direction: row;
    margin-left: -1.0rem;
    width: calc(100% + 2.0rem);
  }
  .row .column {
    margin-bottom: inherit;
    padding: 0 1.0rem;
  }
}


/* ==========================================================================
   Headings
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.4rem;
  line-height: 1;
  margin-top: 2rem;
  margin-bottom: 2rem;

  @media screen and (min-width: 640px) {
    font-size: 2.8rem;
  }
}

h2 {
  font-size: 2.0rem;
  line-height: 1.2;
  margin-top: 2rem;

  @media screen and (min-width: 640px) {
    font-size: 2.2rem;
  }
}

h3 {
  font-size: 1.6rem;
  line-height: 1.25;

  @media screen and (min-width: 640px) {
    font-size: 1.8rem;
  }
}

h4 {
  font-size: 1.4rem;
  line-height: 1.3;
}

h5 {
  font-size: 1.2rem;
  line-height: 1.4;
}

h6 {
  font-size: 1.0rem;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

/* Reset buttons to have no default appearance */
button {
  appearance: none;
  border: 0;
  background-color: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: inherit;
}


/* ==========================================================================
   Form elements
   ========================================================================== */

input[type='color'],
input[type='date'],
input[type='datetime'],
input[type='datetime-local'],
input[type='email'],
input[type='month'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='url'],
input[type='week'],
input:not([type]),
textarea,
select {
  appearance: none;
  background-color: transparent;
  border: 1px solid #b9b9b9;
  border-radius: 6px;
  padding: .5rem .75rem .5rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

select {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 8" width="30"><path fill="%23b9b9b9" d="M0,0l6,8l6-8"/></svg>') center right no-repeat;
  padding-right: 1.5rem;
}

select:focus {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 8" width="30"><path fill="%23a9a9a9" d="M0,0l6,8l6-8"/></svg>');
}

select[multiple] {
  background: none;
  height: auto;
}

textarea {
  min-height: 4rem;
}

label,
legend {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

input[type='checkbox'],
input[type='radio'] {
  display: inline;
}

.label-inline {
  display: inline-block;
  font-weight: normal;
  margin-left: .25rem;
}

/* ==========================================================================
   Table
   ========================================================================== */

table {
  border-spacing: 0;
  display: block;
  overflow-x: auto;
  text-align: left;
  width: 100%;
}

td,
th {
  border-bottom: 1px solid #d1d1d1;
  padding: 0.8rem 1rem;
}

td:first-child,
th:first-child {
  padding-left: 0;
}

td:last-child,
th:last-child {
  padding-right: 0;
}

@media (min-width: 40rem) {
  table {
    display: table;
    overflow-x: initial;
  }
}

/* ==========================================================================
   Other elements
   ========================================================================== */

/* Keep large images inside its container */
img {
  max-width: 100%;
}

/* The rest of <hr> styles is handled by boilerplate.css */
hr {
  border-color: #d1d1d1;
}

blockquote {
  border-left: 0.3rem solid #d1d1d1;
  margin-left: 0;
  margin-right: 0;
  padding: 1rem 1.5rem;
}

blockquote *:last-child {
  margin-bottom: 0;
}

code {
  background: #f4f5f6;
  border-radius: .4rem;
  margin: 0 .2rem;
  padding: .2rem .5rem;
  white-space: nowrap;
}

pre {
  background: #f4f5f6;
  border-left: 0.3rem solid #9b4dca;
  overflow-y: hidden;
}

pre > code {
  border-radius: 0;
  display: block;
  padding: 1rem 1.5rem;
  white-space: pre;
}


/* ==========================================================================
   Utility classes
   ========================================================================== */

.float-left {
  float: left;
}

.float-right {
  float: right;
}
