/************
CSS RESET
*************/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    outline: none;
    /* -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box; */
    box-sizing: border-box;
    text-decoration: none;
}

:root {
    --main: #111;
    --main-hover: #495b57;
    --text: #444;
    --h-text: #222;
    --alink: #8a0707;
    --ahover: #cd0d0d;

    --alink-dark: rgb(180, 16, 48);
    --ahover-dark: rgb(227, 44, 80);
    --aclick-dark: rgb(147, 5, 33);

    --alink-2: khaki;
    --ahover-2: lightyellow;

    --placehoder: #bbb;

    --alert-red-bg: mistyrose;
    --alert-red-text: firebrick;
    --alert-green-bg: honeydew;
    --alert-green-text: seagreen;
    --alert-blue-bg: aliceblue;
    --alert-blue-text: steelblue;

    --eg1: "Tienne";
    --eg2: "Faculty Glyphic";
    --cn1: "Noto Serif SC";
    --cn2: "Ma Shan Zheng";

    --fs-xl: clamp(3.5rem, 12vw + 1rem, 12rem);
    --fs-l: clamp(2rem, 2vw + 1rem, 3rem);
}

html {
    height: 100%;
}

html[lang="en"] {
    font-family: var(--eg1);
    letter-spacing: 0;
}
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6 {
    font-family: var(--eg2);
    line-height: 1.2;
    font-weight: bold;
}

html[lang="cn"] {
    font-family: var(--cn1);
    font-weight: normal;
}
html[lang="cn"] h1,
html[lang="cn"] h2,
html[lang="cn"] h3,
html[lang="cn"] h4,
html[lang="cn"] h5,
html[lang="cn"] h6 {
    font-family: var(--cn1);
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1.1;
}

::selection,
::-moz-selection,
::-webkit-selection {
    background: rgba(0, 0, 0, 0.6);
    color: white;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}
ol,
ul {
    list-style: none;
}
blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: "";
    content: none;
}

strong {
    font-weight: 600;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
}

a,
a:visited {
    color: var(--alink);
    text-decoration: none;
}
a:hover {
    color: var(--ahover);
}

input {
    box-sizing: border-box;
}

textarea {
    resize: none;
    box-sizing: border-box;
    padding: 10px 10px;
}

::placeholder {
    color: var(--placehoder) !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea {
    padding: 10px 15px;
    border: 0px solid var(--text);
    font-size: 1.2rem;
    color: var(--text);
    width: 100%;
    border-radius: 6px;
    font-family: var(--eg1);
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="checkbox"]:focus,
input[type="submit"]:focus,
button[type="submit"]:focus,
textarea:focus {
    outline: 1px solid var(--alink);
}

input[type="submit"],
button[type="submit"] {
    display: inline-block;
    width: auto;
    padding: 10px 30px;
    border: 0;
    border-radius: 10px;
    background-color: var(--alink-dark);
    color: white;
    font-size: 1.2rem;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--ahover-dark);
    cursor: pointer;
}

input[type="submit"]:active,
button[type="submit"]:active {
    background-color: var(--aclick-dark);
}

.label-checkbox {
    display: grid;
    grid-template-columns: 1em auto;
    gap: 15px;
    text-align: left;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text);
    border-radius: 5px;
    transform: translateY(3px);
    display: grid;
    place-content: center;
}

input[type="checkbox"]::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 3px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--alink);
    /* clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); */
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
}

input.no-change {
    color: #999;
    background-color: #ddd;
}

input.error,
textarea.error {
    border: 2px solid var(--alink-dark) !important;
}

div:has(> input:required),
div:has(> textarea:required) {
    position: relative;
}

div:has(> input:required):after,
div:has(> textarea:required):after {
    content: "*";
    position: absolute;
    top: -6px;
    left: -10px;
    color: var(--alink-dark);
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

.form-label.error::after {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: var(--alink-dark);
    border-radius: 30%;
    vertical-align: middle;
}

select {
    width: 100%;
    padding: 10px 10px;
    background-color: white;
    border: 1px solid var(--text);
    border-radius: 5px;
    font-size: 1.1rem;
    color: #666;
}

.form-label {
    display: block;
    text-align: left;
}

.win-status {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 9999999999;
    background: #fff;
    font-size: 1rem;
    opacity: 0.6;
}

/*************
BODY
************/
body {
    background-color: rgb(240, 239, 234);
    font-size: 100%;
    color: var(--text);
    line-height: 1.7;
    overscroll-behavior: contain;
    height: 100vh; /*sticky footer must have */
    /* border: 5px solid red; */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    padding: 0;
    color: var(--h-text);
}

h1 {
    font-size: 3rem;
}
h2 {
    font-size: 2.5rem;
}
h3 {
    font-size: 2.2rem;
}
h4 {
    font-size: 1.8rem;
}
h5 {
    font-size: 1.5rem;
}
h6 {
    font-size: 1.2rem;
}

p {
    font-weight: 400;
    font-size: 1.2rem;
    padding-bottom: 1.5em;
}

p a {
    color: var(--alink);
}

p a:hover {
    color: var(--ahover);
}

/* span {
  letter-spacing: 1px;
} */

section {
    flex-grow: 1;
    padding: 0;
}

hr {
    border: 1px solid #ddd;
    margin: 3em 0;
}
