* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f7;
    padding: 2rem;
}

main {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0071e3;
  color: white;
  padding: 8px;
  z-index: 100;
}
.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #0071e3;
  outline-offset: 2px;
  border-radius: 4px;
}

.wide-page main {
    max-width: 950px;
}

h1 {
    color: #1d1d1f;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    color: #1d1d1f;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #3f3f60;
    font-size: 1.1rem;
}

section {
    margin-top: 2rem;
}

ul {
    list-style-position: inside;
    margin-left: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: #515154;
}

a {
    color: #0071e3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

abbr {
    text-decoration: underline dotted;
    cursor: pointer;
}

abbr[title] {
    position: relative;
    cursor: pointer;
}

abbr[data-show]::after {
    content: attr(title);
    position: absolute;
    top: -1.8em;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f8f8;
    color: #000;
    border: 1px solid #bbb;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    z-index: 9999;
}

.preview-section {
    margin-top: 3rem;
}

.preview-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.preview-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.preview-scroll::-webkit-scrollbar {
    display: none;
}

.preview-scroll img {
    flex-shrink: 0;
    width: 300px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-scroll::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, white, transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.3s;
}

.preview-scroll.at-start::before {
    opacity: 0;
}

.preview-scroll::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to left, white, transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.3s;
}

.preview-scroll.at-end::after {
    opacity: 0;
}

.preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.preview-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.preview-nav.prev {
    left: 10px;
}

.preview-nav.next {
    right: 10px;
}

/* Confirmation boxes */
.confirmation-box {
    text-align: center;
    padding: 2rem;
}

.success-box .icon-container {
    margin-bottom: 1.5rem;
}

.checkmark {
    width: 80px;
    height: 80px;
}

.checkmark-circle {
    stroke: #4CAF50;
    stroke-width: 2;
    stroke-miterlimit: 10;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: #4CAF50;
    stroke-width: 2;
    stroke-miterlimit: 10;
    fill: none;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-message {
    color: #4CAF50;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.error-box .icon-container {
    margin-bottom: 1.5rem;
}

.error-icon {
    width: 80px;
    height: 80px;
}

.error-circle {
    stroke: #f44336;
    stroke-width: 2;
    stroke-miterlimit: 10;
}

.error-cross {
    stroke: #f44336;
    stroke-width: 2;
    stroke-miterlimit: 10;
}

.error-message {
    color: #f44336;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.app-link-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0071e3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.app-link-button:hover {
    background-color: #0077ed;
    text-decoration: none;
}

.app-link-button.secondary {
    background-color: #86868b;
}

.app-link-button.secondary:hover {
    background-color: #6e6e73;
}

.small-spacer {
    height: 30px;
}

.fallback-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #86868b;
}

#confirmation-success,
#password-reset-success,
#password-reset-error,
#password-reset-form,
#password-reset-complete,
#confirmation-error,
#match-error,
#submit-error {
    display: none;
}

/* Reset Form Styling */
.reset-form-container {
    display: none;
    max-width: 500px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header .icon-container {
    margin-bottom: 1rem;
}

.lock-icon {
    display: inline-block;
}

.form-header h2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #86868b;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="password"]:focus {
    outline: none;
    border-color: #0071e3;
}

.requirements-list {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #86868b;
}

.requirement.met {
    color: #34c759;
}

.requirement.met .requirement-icon {
    color: #34c759;
}

.requirement.met .requirement-icon::before {
    content: '✓';
}

.requirement.unmet {
    color: #ff3b30;
}

.requirement.unmet .requirement-icon {
    color: #ff3b30;
}

.requirement.unmet .requirement-icon::before {
    content: '✗';
}

.requirement-icon {
    width: 20px;
    font-weight: bold;
}

.requirement-text {
    flex: 1;
}

.error-text {
    display: none;
    color: #ff3b30;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.submit-error {
    margin-bottom: 1rem;
}

.submit-button {
    width: 100%;
    padding: 14px;
    background-color: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover:not(:disabled) {
    background-color: #0077ed;
}

.submit-button:disabled {
    background-color: #d2d2d7;
    cursor: not-allowed;
}

.help-text {
    text-align: center;
    color: #86868b;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .checkmark-circle, .checkmark-check { animation: none; stroke-dashoffset: 0; }
}


@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .preview-scroll img {
        width: 250px;
    }
}